Apply to-map to menu action events.
Modified the close tab icon.
Added docstring and reorganized namespace.