Day one

Implemented a key state system to hide away all of those nasty checks in
the main state code, I also made a statemanager and default states for
switching between.