Created player_controller.js and moved relevant methods into it

More minor refactoring and cleaning up after myself.
Slight improvement in the temporary sidebar UI.