refactors editor menubar as preparation for undo/redo mechanism