Player class refactoring and improved logic.