Index: sasview/cx_setup.py
===================================================================
--- sasview/cx_setup.py	(revision 990996701799755a0c1a27f850ba6f8ac0ffd1f0)
+++ sasview/cx_setup.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -72,4 +72,5 @@
 data_files.append("test/")
 data_files.append("plugin_models/")
+data_files.append("compiled_models/")
 
 def append_data(tups):
Index: src/sas/qtgui/Calculators/GenericScatteringCalculator.py
===================================================================
--- src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision 4d1eff238dcef0bfc7d404012981e4300436ee80)
+++ src/sas/qtgui/Calculators/GenericScatteringCalculator.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -8,18 +8,14 @@
 from PyQt4 import QtCore
 from twisted.internet import threads
-from mpl_toolkits.mplot3d import Axes3D
 
 import sas.qtgui.Utilities.GuiUtils as GuiUtils
-
 from sas.qtgui.Utilities.GenericReader import GenReader
-
 from sas.sascalc.dataloader.data_info import Detector
 from sas.sascalc.dataloader.data_info import Source
 from sas.sascalc.calculator import sas_gen
-
-from sas.qtgui.Plotting.Arrow3D import Arrow3D
 from sas.qtgui.Plotting.PlotterBase import PlotterBase
 from sas.qtgui.Plotting.Plotter2D import Plotter2D
 from sas.qtgui.Plotting.Plotter import Plotter
+
 from sas.qtgui.Plotting.PlotterData import Data1D
 from sas.qtgui.Plotting.PlotterData import Data2D
@@ -704,4 +700,6 @@
         if data is None:
             return
+        # This import takes forever - place it here so the main UI starts faster
+        from mpl_toolkits.mplot3d import Axes3D
         color_dic = {'H': 'blue', 'D': 'purple', 'N': 'orange',
                      'O': 'red', 'C': 'green', 'P': 'cyan', 'Other': 'k'}
@@ -781,4 +779,6 @@
         if has_arrow and len(pos_x) > 0:
             def _draw_arrow(input=None, update=None):
+                # import moved here for performance reasons
+                from sas.qtgui.Plotting.Arrow3D import Arrow3D
                 """
                 draw magnetic vectors w/arrow
Index: src/sas/qtgui/MainWindow/DataExplorer.py
===================================================================
--- src/sas/qtgui/MainWindow/DataExplorer.py	(revision 38eb4333d5860a0b0cd2a67d14482ca79a181bf4)
+++ src/sas/qtgui/MainWindow/DataExplorer.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -451,5 +451,10 @@
         model = self.model if plot_to_show.is_data else self.theory_model
         plots = GuiUtils.plotsFromFilename(filename, model)
-        _ = [self.plotData([(None, plot)]) for plot in plots]
+        for plot in plots:
+            plot_id = plot.id
+            if plot_id in self.active_plots.keys():
+                self.active_plots[plot_id].replacePlot(plot_id, plot_to_show)
+            else:
+                self.plotData([(None, plot)])
 
     def addDataPlot2D(self, plot_set, item):
Index: src/sas/qtgui/MainWindow/GuiManager.py
===================================================================
--- src/sas/qtgui/MainWindow/GuiManager.py	(revision b0c5e8c49a3e4e82f4f885ba7ad4d73fb8d6c59f)
+++ src/sas/qtgui/MainWindow/GuiManager.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -11,16 +11,16 @@
 
 from twisted.internet import reactor
-
 # General SAS imports
 from sas.qtgui.Utilities.ConnectionProxy import ConnectionProxy
 from sas.qtgui.Utilities.SasviewLogger import XStream
-from sas.qtgui.Utilities.IPythonWidget import IPythonWidget
+
 import sas.qtgui.Utilities.LocalConfig as LocalConfig
 import sas.qtgui.Utilities.GuiUtils as GuiUtils
+
 import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary
-
 from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements
 from sas.qtgui.MainWindow.AboutBox import AboutBox
 from sas.qtgui.MainWindow.WelcomePanel import WelcomePanel
+
 from sas.qtgui.MainWindow.DataManager import DataManager
 
@@ -96,4 +96,5 @@
         self._helpView = QtWebKit.QWebView()
         # Needs URL like path, so no path.join() here
+        GuiUtils._init()
         self._helpLocation = GuiUtils.HELP_DIRECTORY_LOCATION + "/index.html"
 
@@ -568,4 +569,6 @@
         Display the Jupyter console as a docked widget.
         """
+        # Import moved here for startup performance reasons
+        from sas.qtgui.Utilities.IPythonWidget import IPythonWidget
         terminal = IPythonWidget()
 
Index: src/sas/qtgui/Plotting/Arrow3D.py
===================================================================
--- src/sas/qtgui/Plotting/Arrow3D.py	(revision dc5ef150e8b37e01a3b7e253eb5b66d3b82de99c)
+++ src/sas/qtgui/Plotting/Arrow3D.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
Index: src/sas/qtgui/Plotting/Fittings.py
===================================================================
--- src/sas/qtgui/Plotting/Fittings.py	(revision dc5ef150e8b37e01a3b7e253eb5b66d3b82de99c)
+++ src/sas/qtgui/Plotting/Fittings.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -14,7 +14,4 @@
 
 """
-from scipy import optimize
-
-
 class Parameter(object):
     """
@@ -84,6 +81,8 @@
             sum += item * item
         return sum
-
+    # This import takes a long time, which is why it's here not in the top of file
+    from scipy.optimize import leastsq
     p = [param() for param in pars]
+    #out, cov_x, info, mesg, success = optimize.leastsq(f, p, full_output=1)
     out, cov_x, info, mesg, success = optimize.leastsq(f, p, full_output=1)
     # Calculate chi squared
Index: src/sas/qtgui/Plotting/Plotter.py
===================================================================
--- src/sas/qtgui/Plotting/Plotter.py	(revision dc5ef150e8b37e01a3b7e253eb5b66d3b82de99c)
+++ src/sas/qtgui/Plotting/Plotter.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -3,10 +3,7 @@
 import functools
 import copy
-
 import matplotlib.pyplot as plt
 from matplotlib.font_manager import FontProperties
-
 from sas.qtgui.Plotting.PlotterData import Data1D
-
 from sas.qtgui.Plotting.PlotterBase import PlotterBase
 from sas.qtgui.Plotting.AddText import AddText
@@ -390,5 +387,5 @@
         Deletes the selected plot from the chart
         """
-        if id not in self.plot_dict:
+        if id not in self.plot_dict.keys():
             return
 
Index: src/sas/qtgui/Plotting/PlotterData.py
===================================================================
--- src/sas/qtgui/Plotting/PlotterData.py	(revision dc5ef150e8b37e01a3b7e253eb5b66d3b82de99c)
+++ src/sas/qtgui/Plotting/PlotterData.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
Index: src/sas/qtgui/Utilities/GuiUtils.py
===================================================================
--- src/sas/qtgui/Utilities/GuiUtils.py	(revision 38eb4333d5860a0b0cd2a67d14482ca79a181bf4)
+++ src/sas/qtgui/Utilities/GuiUtils.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -18,14 +18,17 @@
 
 from periodictable import formula as Formula
-
 from sas.qtgui.Plotting import DataTransform
 from sas.qtgui.Plotting.ConvertUnits import convertUnit
-
 from sas.qtgui.Plotting.PlotterData import Data1D
 from sas.qtgui.Plotting.PlotterData import Data2D
-
 from sas.sascalc.dataloader.loader import Loader
 from sas.qtgui.Utilities import CustomDir
 
+## TODO: CHANGE FOR SHIPPED PATH IN RELEASE
+if os.path.splitext(sys.argv[0])[1].lower() != ".py":
+        HELP_DIRECTORY_LOCATION = "doc"
+else:
+        HELP_DIRECTORY_LOCATION = "docs/sphinx-docs/build/html"
+IMAGES_DIRECTORY_LOCATION = HELP_DIRECTORY_LOCATION + "/_images"
 
 def get_app_dir():
@@ -91,116 +94,93 @@
     return config_module
 
-# Get APP folder
-PATH_APP = get_app_dir()
-DATAPATH = PATH_APP
-
-## TODO: CHANGE FOR SHIPPED PATH IN RELEASE
-if os.path.splitext(sys.argv[0])[1].lower() != ".py":
-     HELP_DIRECTORY_LOCATION = "doc"
-else:
-     HELP_DIRECTORY_LOCATION = "docs/sphinx-docs/build/html"
-IMAGES_DIRECTORY_LOCATION = HELP_DIRECTORY_LOCATION + "/_images"
-
-# GUI always starts from the App folder
-#os.chdir(PATH_APP)
-# Read in the local config, which can either be with the main
-# application or in the installation directory
-config = _find_local_config('local_config', PATH_APP)
-
-if config is None:
-    config = _find_local_config('local_config', os.getcwd())
-    #if config is None:
-    #    # Didn't find local config, load the default
-    #    import sas.sasgui.guiframe.config as config
-    #    #logging.info("using default local_config")
-    #else:
-    #    pass
-    #    #logging.info("found local_config in %s", os.getcwd())
-else:
-    pass
-    #logging.info("found local_config in %s", PATH_APP)
-
-c_conf_dir = CustomDir.setup_conf_dir(PATH_APP)
-
-custom_config = _find_local_config('custom_config', c_conf_dir)
-if custom_config is None:
-    custom_config = _find_local_config('custom_config', os.getcwd())
-    if custom_config is None:
-        msgConfig = "Custom_config file was not imported"
-        #logging.info(msgConfig)
+def _init():
+    # Get APP folder
+    PATH_APP = get_app_dir()
+    DATAPATH = PATH_APP
+
+    # Read in the local config, which can either be with the main
+    # application or in the installation directory
+    config = _find_local_config('local_config', PATH_APP)
+
+    if config is None:
+        config = _find_local_config('local_config', os.getcwd())
     else:
         pass
-        #logging.info("using custom_config in %s", os.getcwd())
-else:
-    pass
-    #logging.info("using custom_config from %s", c_conf_dir)
-
-#read some constants from config
-APPLICATION_STATE_EXTENSION = config.APPLICATION_STATE_EXTENSION
-APPLICATION_NAME = config.__appname__
-SPLASH_SCREEN_PATH = config.SPLASH_SCREEN_PATH
-WELCOME_PANEL_ON = config.WELCOME_PANEL_ON
-SPLASH_SCREEN_WIDTH = config.SPLASH_SCREEN_WIDTH
-SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT
-SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME
-if not WELCOME_PANEL_ON:
-    WELCOME_PANEL_SHOW = False
-else:
-    WELCOME_PANEL_SHOW = True
-try:
-    DATALOADER_SHOW = custom_config.DATALOADER_SHOW
-    TOOLBAR_SHOW = custom_config.TOOLBAR_SHOW
-    FIXED_PANEL = custom_config.FIXED_PANEL
-    if WELCOME_PANEL_ON:
-        WELCOME_PANEL_SHOW = custom_config.WELCOME_PANEL_SHOW
-    PLOPANEL_WIDTH = custom_config.PLOPANEL_WIDTH
-    DATAPANEL_WIDTH = custom_config.DATAPANEL_WIDTH
-    GUIFRAME_WIDTH = custom_config.GUIFRAME_WIDTH
-    GUIFRAME_HEIGHT = custom_config.GUIFRAME_HEIGHT
-    CONTROL_WIDTH = custom_config.CONTROL_WIDTH
-    CONTROL_HEIGHT = custom_config.CONTROL_HEIGHT
-    DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE
-    CLEANUP_PLOT = custom_config.CLEANUP_PLOT
-    # custom open_path
-    open_folder = custom_config.DEFAULT_OPEN_FOLDER
-    if open_folder != None and os.path.isdir(open_folder):
-        DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder)
+
+    c_conf_dir = CustomDir.setup_conf_dir(PATH_APP)
+
+    custom_config = _find_local_config('custom_config', c_conf_dir)
+    if custom_config is None:
+        custom_config = _find_local_config('custom_config', os.getcwd())
+        if custom_config is None:
+            msgConfig = "Custom_config file was not imported"
+
+    #read some constants from config
+    APPLICATION_STATE_EXTENSION = config.APPLICATION_STATE_EXTENSION
+    APPLICATION_NAME = config.__appname__
+    SPLASH_SCREEN_PATH = config.SPLASH_SCREEN_PATH
+    WELCOME_PANEL_ON = config.WELCOME_PANEL_ON
+    SPLASH_SCREEN_WIDTH = config.SPLASH_SCREEN_WIDTH
+    SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT
+    SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME
+    if not WELCOME_PANEL_ON:
+        WELCOME_PANEL_SHOW = False
     else:
+        WELCOME_PANEL_SHOW = True
+    try:
+        DATALOADER_SHOW = custom_config.DATALOADER_SHOW
+        TOOLBAR_SHOW = custom_config.TOOLBAR_SHOW
+        FIXED_PANEL = custom_config.FIXED_PANEL
+        if WELCOME_PANEL_ON:
+            WELCOME_PANEL_SHOW = custom_config.WELCOME_PANEL_SHOW
+        PLOPANEL_WIDTH = custom_config.PLOPANEL_WIDTH
+        DATAPANEL_WIDTH = custom_config.DATAPANEL_WIDTH
+        GUIFRAME_WIDTH = custom_config.GUIFRAME_WIDTH
+        GUIFRAME_HEIGHT = custom_config.GUIFRAME_HEIGHT
+        CONTROL_WIDTH = custom_config.CONTROL_WIDTH
+        CONTROL_HEIGHT = custom_config.CONTROL_HEIGHT
+        DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE
+        CLEANUP_PLOT = custom_config.CLEANUP_PLOT
+        # custom open_path
+        open_folder = custom_config.DEFAULT_OPEN_FOLDER
+        if open_folder != None and os.path.isdir(open_folder):
+            DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder)
+        else:
+            DEFAULT_OPEN_FOLDER = PATH_APP
+    except AttributeError:
+        DATALOADER_SHOW = True
+        TOOLBAR_SHOW = True
+        FIXED_PANEL = True
+        WELCOME_PANEL_SHOW = False
+        PLOPANEL_WIDTH = config.PLOPANEL_WIDTH
+        DATAPANEL_WIDTH = config.DATAPANEL_WIDTH
+        GUIFRAME_WIDTH = config.GUIFRAME_WIDTH
+        GUIFRAME_HEIGHT = config.GUIFRAME_HEIGHT
+        CONTROL_WIDTH = -1
+        CONTROL_HEIGHT = -1
+        DEFAULT_PERSPECTIVE = None
+        CLEANUP_PLOT = False
         DEFAULT_OPEN_FOLDER = PATH_APP
-except AttributeError:
-    DATALOADER_SHOW = True
-    TOOLBAR_SHOW = True
-    FIXED_PANEL = True
-    WELCOME_PANEL_SHOW = False
-    PLOPANEL_WIDTH = config.PLOPANEL_WIDTH
-    DATAPANEL_WIDTH = config.DATAPANEL_WIDTH
-    GUIFRAME_WIDTH = config.GUIFRAME_WIDTH
-    GUIFRAME_HEIGHT = config.GUIFRAME_HEIGHT
-    CONTROL_WIDTH = -1
-    CONTROL_HEIGHT = -1
-    DEFAULT_PERSPECTIVE = None
-    CLEANUP_PLOT = False
-    DEFAULT_OPEN_FOLDER = PATH_APP
-
-#DEFAULT_STYLE = config.DEFAULT_STYLE
-
-PLUGIN_STATE_EXTENSIONS = config.PLUGIN_STATE_EXTENSIONS
-OPEN_SAVE_MENU = config.OPEN_SAVE_PROJECT_MENU
-VIEW_MENU = config.VIEW_MENU
-EDIT_MENU = config.EDIT_MENU
-extension_list = []
-if APPLICATION_STATE_EXTENSION is not None:
-    extension_list.append(APPLICATION_STATE_EXTENSION)
-EXTENSIONS = PLUGIN_STATE_EXTENSIONS + extension_list
-try:
-    PLUGINS_WLIST = '|'.join(config.PLUGINS_WLIST)
-except AttributeError:
-    PLUGINS_WLIST = ''
-APPLICATION_WLIST = config.APPLICATION_WLIST
-IS_WIN = True
-IS_LINUX = False
-CLOSE_SHOW = True
-TIME_FACTOR = 2
-NOT_SO_GRAPH_LIST = ["BoxSum"]
+
+    #DEFAULT_STYLE = config.DEFAULT_STYLE
+
+    PLUGIN_STATE_EXTENSIONS = config.PLUGIN_STATE_EXTENSIONS
+    OPEN_SAVE_MENU = config.OPEN_SAVE_PROJECT_MENU
+    VIEW_MENU = config.VIEW_MENU
+    EDIT_MENU = config.EDIT_MENU
+    extension_list = []
+    if APPLICATION_STATE_EXTENSION is not None:
+        extension_list.append(APPLICATION_STATE_EXTENSION)
+    EXTENSIONS = PLUGIN_STATE_EXTENSIONS + extension_list
+    try:
+        PLUGINS_WLIST = '|'.join(config.PLUGINS_WLIST)
+    except AttributeError:
+        PLUGINS_WLIST = ''
+    APPLICATION_WLIST = config.APPLICATION_WLIST
+    IS_WIN = True
+    IS_LINUX = False
+    CLOSE_SHOW = True
+    TIME_FACTOR = 2
+    NOT_SO_GRAPH_LIST = ["BoxSum"]
 
 class Communicate(QtCore.QObject):
Index: src/sas/qtgui/Utilities/IPythonWidget.py
===================================================================
--- src/sas/qtgui/Utilities/IPythonWidget.py	(revision 985ad940d8f3156c26adff72d2f0c45da491177d)
+++ src/sas/qtgui/Utilities/IPythonWidget.py	(revision fef38e8f19a097daafbdbdd6edb786c11fb2b995)
@@ -1,9 +1,8 @@
+from PyQt4 import QtCore, QtGui, QtSvg
+
 def new_load_qt(api_options):
-    from PyQt4 import QtCore, QtGui, QtSvg
     return QtCore, QtGui, QtSvg, 'pyqt'
 
 def qtconsole_new_load_qt(api_options):
-    from PyQt4 import QtCore, QtGui, QtSvg
-
     # Alias PyQt-specific functions for PySide compatibility.
     QtCore.Signal = QtCore.pyqtSignal
@@ -11,16 +10,12 @@
     return QtCore, QtGui, QtSvg, 'pyqt'
 
+from IPython.external import  qt_loaders
+from qtconsole import qt_loaders as qtconsole_qt_loaders
 # Do some monkey patching to satisfy pyinstaller complaining
 # about pyside/pyqt confusion
-from IPython.external import  qt_loaders
 qt_loaders.load_qt = new_load_qt
-
-from qtconsole import qt_loaders as qtconsole_qt_loaders
 qtconsole_qt_loaders.load_qt = qtconsole_new_load_qt
 
-
 from qtconsole.rich_jupyter_widget import RichJupyterWidget
-from qtconsole.inprocess import QtInProcessKernelManager
-from IPython.lib import guisupport
 
 MODULES_TO_IMPORT = [
@@ -32,7 +27,9 @@
     def __init__(self, parent=None, **kwargs):
         super(self.__class__, self).__init__(parent)
+        from qtconsole.inprocess import QtInProcessKernelManager
+        from IPython.lib import guisupport
         app = guisupport.get_app_qt4()
 
-       # Create an in-process kernel
+        # Create an in-process kernel
         kernel_manager = QtInProcessKernelManager()
         kernel_manager.start_kernel()
