Moved the menu creation code for the OS X app delegate into smaller methods