Refactor player management