Revival. State changes working, framework rdy.

Cleaned the code up and enabled switching between states - modes
----------
Right now the only two ones working are Main and Menu, with switching
working through the keys X and C (Main and Menu respectively). Exit from
anywhere with ESC.