Index: src/sas/sasview/local_config.py
===================================================================
--- src/sas/sasview/local_config.py	(revision c6bdb3b56ff2c1bf95baa3241ca1df10d74a79d7)
+++ src/sas/sasview/local_config.py	(revision b963b2066d6a76fe5073000c5a596a6fd0130ac4)
@@ -145,7 +145,4 @@
 UPDATE_TIMEOUT = 2
 
-#OpenCL option
-SAS_OPENCL = None
-
 # Time out for updating sasview
 UPDATE_TIMEOUT = 2
Index: src/sas/sasview/sasview.py
===================================================================
--- src/sas/sasview/sasview.py	(revision 169314183480fb2569cb35a048869a2ac32476a0)
+++ src/sas/sasview/sasview.py	(revision b277220d283b4b3a50fdf0ab73bad4c8beb4e313)
@@ -21,4 +21,6 @@
 sys.setdefaultencoding("iso-8859-1")
 
+import sas
+
 APP_NAME = 'SasView'
 PLUGIN_MODEL_DIR = 'plugin_models'
@@ -43,4 +45,15 @@
         # modules. We load the fitting module here
         # to ensure a complete Windows executable build.
+
+        # Rebuild .sasview/categories.json.  This triggers a load of sasmodels
+        # and all the plugins.
+        try:
+            from sas.sascalc.fit.models import ModelManager
+            from sas.sasgui.guiframe.CategoryInstaller import CategoryInstaller
+            model_list = ModelManager().cat_model_list()
+            CategoryInstaller.check_install(model_list=model_list)
+        except Exception:
+            logger.error("%s: could not load SasView models")
+            logger.error(traceback.format_exc())
 
         # Fitting perspective
@@ -160,8 +173,7 @@
 
 
-def setup_mpl(backend='WXAgg'):
-    import sas.sasgui
+def setup_mpl(backend=None):
     # Always use private .matplotlib setup to avoid conflicts with other
-    mplconfigdir = os.path.join(sas.sasgui.get_user_dir(), '.matplotlib')
+    mplconfigdir = os.path.join(sas.get_user_dir(), '.matplotlib')
     if not os.path.exists(mplconfigdir):
         os.mkdir(mplconfigdir)
@@ -171,5 +183,6 @@
     # we are running may not actually need it; also, putting as little on the
     # path as we can
-    os.environ['MPLBACKEND'] = backend
+    if backend:
+        os.environ['MPLBACKEND'] = backend
 
     # TODO: ... so much for not importing matplotlib unless we need it...
@@ -181,11 +194,11 @@
     Prepare sasmodels for running within sasview.
     """
-    import sas.sasgui
     # Set SAS_MODELPATH so sasmodels can find our custom models
-    plugin_dir = os.path.join(sas.sasgui.get_user_dir(), PLUGIN_MODEL_DIR)
+    plugin_dir = os.path.join(sas.get_user_dir(), PLUGIN_MODEL_DIR)
     os.environ['SAS_MODELPATH'] = plugin_dir
-    # TODO: SAS_OPENCL flag belongs in setup_sasmodels
-    # this will require restructuring of the config management so that it
-    # can occur outside of sasgui.
+    #Initiliaze enviromental variable with custom setting but only if variable not set
+    SAS_OPENCL = sas.get_custom_config().SAS_OPENCL
+    if SAS_OPENCL and "SAS_OPENCL" not in os.environ:
+        os.environ["SAS_OPENCL"] = SAS_OPENCL
 
 def run_gui():
@@ -196,5 +209,5 @@
     freeze_support()
     setup_logging()
-    setup_mpl()
+    setup_mpl(backend='WXAgg')
     setup_sasmodels()
     setup_wx()
@@ -206,5 +219,8 @@
     freeze_support()
     setup_logging()
-    setup_mpl(backend='Agg')
+    # Use default matplotlib backend on mac/linux, but wx on windows.
+    # The problem on mac is that the wx backend requires pythonw.  On windows
+    # we are sure to wx since it is the shipped with the app.
+    setup_mpl(backend='WXAgg' if os.name == 'nt' else None)
     setup_sasmodels()
     if len(sys.argv) == 1:
Index: src/sas/sasview/welcome_panel.py
===================================================================
--- src/sas/sasview/welcome_panel.py	(revision d66dbcc8e869f27ec52bbe59173bde142f2c4a60)
+++ src/sas/sasview/welcome_panel.py	(revision b963b2066d6a76fe5073000c5a596a6fd0130ac4)
@@ -10,5 +10,5 @@
 from wx.lib.scrolledpanel import ScrolledPanel
 
-from sas.sasgui import get_local_config
+from sas import get_local_config
 from sas.sasgui.guiframe.panel_base import PanelBase
 config = get_local_config()
