anchor.diff:        Player ! {player_id, Player_id},
         Room ! {player_add, {Player_id, Player}},
         New_state = State#state{player_id = Player_id, room_id = Room_id},
  -      reply([<<"room_id">>, Room_id], Req, New_state);
  +      reply([<<"room_id">>, Room_id], New_state);
       "action_earth_collision" ->
         global_rooms_state ! {action_earth_collision, State#state.room_id, State#state.player_id},
  -      reply_ok(Req, State);
  +      reply_ok(State);
       "game_master_asteroids_position" ->
         global_rooms_state ! {game_master_asteroids_position, Data, State#state.room_id},
  -      reply_ok(Req, State);
  +      reply_ok(State);
       "game_ship_position" ->
         global_rooms_state ! {ship_position, Data, State#state.room_id},
  -      reply_ok(Req, State);
  +      reply_ok(State);
       "action_ship_move" ->
         global_rooms_state ! {ship_move, Data, State#state.room_id},
  -      reply_ok(Req, State);
  +      reply_ok(State);
       "action_ship_shoot" ->
         global_rooms_state ! {ship_shoot, Data, State#state.room_id},
  -      reply_ok(Req, State);
  +      reply_ok(State);
       "ping" ->
  -      reply([<<"pong">>], Req, State);
  +      reply([<<"pong">>], State);
       Unknown ->
         io:format("Warning: websocket_handle can not handle event:~n~p~n", [Unknown]),
  -      reply_ok(Req, State)
  +      reply_ok(State)
     end;
  -websocket_handle(_Data, Req, State) ->
  -  {ok, Req, State}.
  +websocket_handle(_Data, State) ->
  +  {ok, State}.
   
   % Send/Internal message Handler
   % Server that send messages to the client
  -websocket_info({Event, Data}, Req, State) ->
  +websocket_info({Event, Data}, State) ->
     case Event of
       player_id ->
  -      reply([<<"player_id">>, Data], Req, State);
  +      reply([<<"player_id">>, Data], State);
       rooms_list ->
  -      reply([<<"rooms_list">>, Data], Req, State);
  +      reply([<<"rooms_list">>, Data], State);
       room_players_number ->
  -      reply([<<"room_players_number">>, Data], Req, State);
  +      reply([<<"room_players_number">>, Data], State);
       game_life ->
  -      reply([<<"game_life">>, Data], Req, State);
  +      reply([<<"game_life">>, Data], State);
       asteroid_position ->
  -      reply([<<"asteroid_position">>, Data], Req, State);
  +      reply([<<"asteroid_position">>, Data], State);
       asteroid_position_set ->
  -      reply([<<"asteroid_position_set">>, Data], Req, State);
  +      reply([<<"asteroid_position_set">>, Data], State);
       ship_position_set ->
  -      reply([<<"ship_position_set">>, Data], Req, State);
  +      reply([<<"ship_position_set">>, Data], State);
       ship_shoot ->
  -      reply([<<"ship_shoot">>, Data], Req, State);
  +      reply([<<"ship_shoot">>, Data], State);
       Unknown ->
         io:format("Warning: websocket_info can not handle event:~n~p~n", [Unknown]),
  -      reply_ok(Req, State)
  +      reply_ok(State)
     end.
   
   % Reason con be: remote, crash or normal
   % In case the process websocket_handler crashes the terminate function will be executed
  -terminate({crash, _, _}, _Req, _State) ->
  -  io:format("Warning: process 'websocket_handler' crashed: ~nRequest:~n~p~nState:~n~p~n", [_Req, _State]),
  +terminate({crash, _, _}, _State) ->
  +  io:format("Warning: process 'websocket_handler' crashed: ~nState:~n~p~n", [_State]),
     global_rooms_state ! {player_remove, {_State#state.room_id, _State#state.player_id}};
  -terminate(_Reason, _Req, _State) ->
  +terminate(_Reason, _State) ->
     global_rooms_state ! {player_remove, {_State#state.room_id, _State#state.player_id}}.
   
   % Utilities
  -reply(Data, Req, State) ->
  +reply(Data, State) ->
     io:format("Sending message:~n~s~n", [jiffy:encode(Data)]),
  -  {reply, {text, jiffy:encode(Data)}, Req, State}.
  -reply_ok(Req, State) -> {ok, Req, State}.
  +  {reply, {text, jiffy:encode(Data)}, State}.
  +reply_ok(State) -> {ok, State}.
  
positive.code:       New_state = State#state{player_id = Player_id, room_id = Room_id},
        global_rooms_state ! {room_player_add, Room_id = Room_id, {Player_id, Player}},
        global_rooms_state ! {action_new_player_join, New_state#state.room_id},
        reply_ok(Req, New_state);
      "room_add" ->
        Room_id = uuid:generate(),
        io:format("Room id:~n~p~n", [Room_id]),
  
negative.code: -include("config.hrl").
  
  -export([init/2]).
  -export([websocket_handle/2]).
  -export([websocket_info/2]).
  -export([terminate/2]).
  
  -record(state, {player_id, room_id}).
  
  