Fixes to the menu method definition which also significantly cleaned up the code.