JS improvements.
Fixing up states of the mainmenu.