Resolved #2. Removed the workaround section.
Converted the main menu to a function.
Added reboot item to main menu.
Moved mode selection into the functions.
Corrected formatting.