Index: sansguiframe/src/sans/guiframe/CategoryInstaller.py
===================================================================
--- sansguiframe/src/sans/guiframe/CategoryInstaller.py	(revision df7a7e3fc9ea2f467d069e36f0552fc12e622178)
+++ sansguiframe/src/sans/guiframe/CategoryInstaller.py	(revision ea5fa581cac321a89f39dd537af704582947a6a9)
@@ -6,5 +6,5 @@
 
 @author kieranrcampbell@gmail.com
-
+@modified by NIST/MD sanview team
 """
 
@@ -14,5 +14,5 @@
 from collections import defaultdict
 
-user_file = 'serialized_cat.p'
+USER_FILE = 'serialized_cat.p'
 
 class CategoryInstaller:
@@ -47,6 +47,7 @@
         returns the dir where default_cat.p should be
         """
-        import sans.dataloader.readers
-        return sans.dataloader.readers.get_data_path()
+        from sans import sansview as sasview
+        app_path = os.path.dirname(sasview.__file__)
+        return app_path
 
     @staticmethod
@@ -55,6 +56,5 @@
         returns the users sansview config dir
         """
-        return os.path.join(os.path.expanduser("~"),
-                            ".sansview")
+        return os.path.join(os.path.expanduser("~"), ".sasview")
 
     @staticmethod
@@ -95,8 +95,8 @@
     def get_user_file():
         """
-        returns the user data file, eg .sansview/serialized_cat.p
+        returns the user data file, eg .sasview/serialized_cat.p
         """
         return os.path.join(CategoryInstaller._get_home_dir(),
-                            user_file)
+                            USER_FILE)
 
     @staticmethod
@@ -107,6 +107,5 @@
         """
         return os.path.join(\
-            CategoryInstaller._get_default_cat_p_dir, 
-            "default_categories.p")
+            CategoryInstaller._get_default_cat_p_dir(), "default_categories.p")
         
     @staticmethod
@@ -128,5 +127,5 @@
             serialized_file = CategoryInstaller.get_user_file()
         else:
-            serialized_file = os.path.join(homedir, user_file)
+            serialized_file = os.path.join(homedir, USER_FILE)
 
         if os.path.exists(serialized_file):
Index: sansguiframe/src/sans/guiframe/CategoryManager.py
===================================================================
--- sansguiframe/src/sans/guiframe/CategoryManager.py	(revision df7a7e3fc9ea2f467d069e36f0552fc12e622178)
+++ sansguiframe/src/sans/guiframe/CategoryManager.py	(revision ea5fa581cac321a89f39dd537af704582947a6a9)
@@ -16,4 +16,5 @@
 import wx
 import sys
+import os
 from wx.lib.mixins.listctrl import CheckListCtrlMixin, ListCtrlAutoWidthMixin
 from collections import defaultdict
@@ -290,6 +291,5 @@
         cat_file = open(CategoryInstaller.get_user_file(), 'wb')
 
-        pickle.dump( self.master_category_dict,
-                     cat_file )
+        pickle.dump( self.master_category_dict, cat_file )
 
    
@@ -299,8 +299,11 @@
         """
         try:
-            cat_file = open(CategoryInstaller.get_user_file(),
-                            'rb')
-            self.master_category_dict = pickle.load(cat_file)
-    
+    		file = CategoryInstaller.get_user_file()
+    		if os.path.isfile(file):
+	            cat_file = open(file, 'rb')
+	            self.master_category_dict = pickle.load(cat_file)
+	        else:
+	        	cat_file = open(CategoryInstaller.get_default_file(), 'rb')
+        		self.master_category_dict = pickle.load(cat_file)
         except IOError:
             print 'Problem reading in category file. Please review'
@@ -421,7 +424,7 @@
         vbox.Add(self.ok_button, flag = wx.ALL | wx.ALIGN_RIGHT, 
                  border = 10)
-
-
-        self.current_categories.SetSelection(0)
+        
+        if self.current_categories.GetCount() > 0:
+        	self.current_categories.SetSelection(0)
         self.new_text.Disable()
         self.SetSizer(vbox)
@@ -494,8 +497,4 @@
         return ret
 
-
-
-
-
 if __name__ == '__main__':
         
@@ -510,3 +509,2 @@
         app.MainLoop()
 
-
Index: sansguiframe/src/sans/guiframe/__init__.py
===================================================================
--- sansguiframe/src/sans/guiframe/__init__.py	(revision df7a7e3fc9ea2f467d069e36f0552fc12e622178)
+++ sansguiframe/src/sans/guiframe/__init__.py	(revision ea5fa581cac321a89f39dd537af704582947a6a9)
@@ -70,7 +70,4 @@
     for f in findall(path):
         data_files.append(('media/guiframe_media', [f]))
-    path = get_media_path(media="catdata")
-    for f in findall(path):
-        data_files.append(('.', [f]))
 
     return data_files
Index: sansguiframe/src/sans/guiframe/customdir.py
===================================================================
--- sansguiframe/src/sans/guiframe/customdir.py	(revision 94d6752c44d06be3ad3ef28a0f58b198efc95ba7)
+++ sansguiframe/src/sans/guiframe/customdir.py	(revision ea5fa581cac321a89f39dd537af704582947a6a9)
@@ -3,7 +3,16 @@
 import os.path
 import shutil
+from sans.guiframe.CategoryInstaller import CategoryInstaller
 
 CONF_DIR = 'config' 
 APPLICATION_NAME = 'sasview'
+
+def _find_usersasview_dir():
+    """
+    Find and return user/.sasview dir
+    """
+    dir = os.path.join(os.path.expanduser("~"), 
+                       ("." + APPLICATION_NAME))
+    return dir
 
 def _find_customconf_dir():
@@ -12,6 +21,6 @@
     The plugin directory is located in the user's home directory.
     """
-    dir = os.path.join(os.path.expanduser("~"), 
-                       ("." + APPLICATION_NAME), CONF_DIR)
+    u_dir = _find_usersasview_dir()
+    dir = os.path.join(u_dir, CONF_DIR)
     
     return dir
@@ -19,5 +28,5 @@
 def _setup_conf_dir(path):
     """
-    Setup the custom config dir
+    Setup the custom config dir and cat file
     """
     dir = _find_customconf_dir()
@@ -26,4 +35,17 @@
         os.makedirs(dir)
     file = os.path.join(dir, "custom_config.py")
+    u_dir = _find_usersasview_dir()
+    cat_file = os.path.join(u_dir, "serialized_cat.p")
+    # Place example user models as needed
+    if not os.path.isfile(cat_file):
+        try:
+            default_cat_file = CategoryInstaller.get_default_file()
+            if os.path.isfile(default_cat_file):
+                shutil.copyfile(default_cat_file, cat_file)
+            else:
+                print "Unable to find/copy default cat file"
+        except:
+            print "Unable to copy default cat file to the user dir."
+
     # Place example user models as needed
     try:
