removed unneeded code and refactored the Player class