extract preferences menu item and window into Preferences module