Refactor player controller a bit.