Move all menuitem and action code not related to main window into app delegate