More reorganisation.
refactor
Began refactoring menus into an AA.
Finish refactoring menus into AA.
Move submenus into AA too.
Minor logic correction.
Mem leak fix, global var -> local, formatting.
Remove unused function.
Menu draw functions.