Refactor code in player control class