Refactor player manager