Refactored player controller and player component.