A hefty commit to try to clean up MainWindow

This is an attempt to clean up the menu action code. The code was confused between object names and titles, and didn't keep the various structures up to date when one changed.

With the change there is a lot less code duplication, and you can now reliably rename custom widgets.