Finished state machine implementation
InputHandler is now a singleton