Refactor player class