Fixed bad cast, added more structure for handling multiple players.