Added get_player_from_entity_id.

Also fixed unit tests.