Refactor player class.