map state

-changed the way state machine switching works
-each state/mode has a initMode and endMode NEED TO IMPLEMENTED