Refactored menu bar code, added keyboard shortcuts.