Refactor player