Refactored menu

While looking into #1219 I accidentally ended up refactoring some stuff.

Tested in emulator and on H2O, but be wary because I might have overlooked something.