refactored the UI code to have different files for parsing, menus and menuitems, refs #601