Index: guiframe/data_loader.py
===================================================================
--- guiframe/data_loader.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
+++ guiframe/data_loader.py	(revision 7a078643f880a7d4151c32547cc839eb098db2f3)
@@ -8,6 +8,6 @@
 from DataLoader.loader import Loader
 from load_thread import DataReader
-from sans.perspectives.invariant import InvStateUpdateEvent
-from perspectives.fitting import FitStateUpdateEvent
+from sans.guicomm.events import FitStateUpdateEvent
+from sans.guicomm.events import InvStateUpdateEvent
 
 from sans.guicomm.events import NewPlotEvent, StatusEvent
Index: guiframe/gui_manager.py
===================================================================
--- guiframe/gui_manager.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
+++ guiframe/gui_manager.py	(revision 7a078643f880a7d4151c32547cc839eb098db2f3)
@@ -50,7 +50,6 @@
 from sans.guicomm.events import EVT_NEW_PLOT,EVT_SLICER_PARS_UPDATE
 from sans.guicomm.events import EVT_ADD_MANY_DATA
-
-
 from data_manager import DataManager
+STATE_FILE_EXT = ['.inv','.fitv','.prv']
 
 def quit_guiframe(parent=None):
@@ -720,12 +719,13 @@
              if  basename.endswith('.svs'):
              	#remove panels for new states
-                 for item in self.panels:
-                     try:
-                         self.panels[item].clear_panel()
-                     except: pass
-                 plot_data(self, path,'.inv')
-                 plot_data(self, path,'.prv')
-                 plot_data(self, path,'.fitv')
+                for item in self.panels:
+                    try:
+                        self.panels[item].clear_panel()
+                    except: pass
+                #reset states and plot data 
+                for item in STATE_FILE_EXT:
+                    exec "plot_data(self, path,'%s')"% str(item)
              else: plot_data(self,path)
+             
         if self.defaultPanel is not None and \
             self._mgr.GetPane(self.panels["default"].window_name).IsShown():
@@ -755,34 +755,33 @@
         for item in self.panels:
             try:
-                if self.panels[item].window_name == 'Invariant' or self.panels[item].window_name == 'pr_control' or self.panels[item].window_name == 'Fit panel':
-                    if self.panels[item].window_name == 'Invariant':
-                        data = self.panels[item]._data
-                        if data != None:
-                            state = self.panels[item].state
-                            new_doc =self.panels[item]._manager.state_reader.write_toXML(data,state)
-                            if hasattr(doc, "firstChild"):
-                                doc.firstChild.appendChild (new_doc.firstChild.firstChild)  
+                if self.panels[item].window_name == 'Invariant':
+                    data = self.panels[item]._data
+                    if data != None:
+                        state = self.panels[item].state
+                        new_doc =self.panels[item]._manager.state_reader.write_toXML(data,state)
+                        if hasattr(doc, "firstChild"):
+                            doc.firstChild.appendChild (new_doc.firstChild.firstChild)  
+                        else:
+                            doc = new_doc 
+                elif self.panels[item].window_name == 'pr_control':
+                    data = self.panels[item].manager.current_plottable
+                    if data != None:
+                        state = self.panels[item].get_state()
+                        new_doc =self.panels[item].manager.state_reader.write_toXML(data,state)
+                        if hasattr(doc, "firstChild"):
+                            doc.firstChild.appendChild (new_doc.firstChild.firstChild)  
+                        else:
+                            doc = new_doc 
+                elif self.panels[item].window_name == 'Fit panel':
+                    for index in range(self.panels[item].GetPageCount()):
+                        selected_page = self.panels[item].GetPage(index) 
+                        if hasattr(selected_page,"get_data"):
+                            data = selected_page.get_data()
+                            state = selected_page.state
+                            new_doc =selected_page.manager.state_reader.write_toXML(data,state)
+                            if doc != None and hasattr(doc, "firstChild"):
+                                doc.firstChild.appendChild (new_doc.firstChild.firstChild)
                             else:
-                                doc = new_doc 
-                    elif self.panels[item].window_name == 'pr_control':
-                        data = self.panels[item].manager.current_plottable
-                        if data != None:
-                            state = self.panels[item].get_state()
-                            new_doc =self.panels[item].manager.state_reader.write_toXML(data,state)
-                            if hasattr(doc, "firstChild"):
-                                doc.firstChild.appendChild (new_doc.firstChild.firstChild)  
-                            else:
-                                doc = new_doc 
-                    elif self.panels[item].window_name == 'Fit panel':
-                        for index in range(self.panels[item].GetPageCount()):
-                            selected_page = self.panels[item].GetPage(index) 
-                            if hasattr(selected_page,"get_data"):
-                                data = selected_page.get_data()
-                                state = selected_page.state
-                                new_doc =selected_page.manager.state_reader.write_toXML(data,state)
-                                if doc != None and hasattr(doc, "firstChild"):
-                                    doc.firstChild.appendChild (new_doc.firstChild.firstChild)
-                                else:
-                                    doc = new_doc
+                                doc = new_doc
 
             except: 
Index: invariantview/perspectives/invariant/invariant.py
===================================================================
--- invariantview/perspectives/invariant/invariant.py	(revision 9b187350a27b63e0f6acf1eba38d6f445fbe7eae)
+++ invariantview/perspectives/invariant/invariant.py	(revision 7a078643f880a7d4151c32547cc839eb098db2f3)
@@ -26,5 +26,5 @@
 from DataLoader.loader import Loader
 from invariant_panel import InvariantPanel
-(InvStateUpdateEvent, EVT_STATE_UPDATE)   = wx.lib.newevent.NewEvent()
+from sans.guicomm.events import EVT_INVSTATE_UPDATE
 
 class Plugin:
@@ -98,5 +98,5 @@
         #add error back to the data
         self.parent.Bind(ERR_DATA, self._on_data_error)
-        self.parent.Bind(EVT_STATE_UPDATE, self.on_set_state_helper)
+        self.parent.Bind(EVT_INVSTATE_UPDATE, self.on_set_state_helper)
         
         self.invariant_panel = InvariantPanel(parent=self.parent)
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision b63dc6e69334f4bebbc94688bce123aa816c1c32)
+++ sansview/perspectives/fitting/fitting.py	(revision 7a078643f880a7d4151c32547cc839eb098db2f3)
@@ -35,4 +35,5 @@
 from sans.guicomm.events import EVT_SLICER_PANEL,ERR_DATA,EVT_REMOVE_DATA
 from sans.guicomm.events import EVT_SLICER_PARS_UPDATE
+from sans.guicomm.events import EVT_FITSTATE_UPDATE
 
 from sans.fit.AbstractFitEngine import Model
@@ -51,5 +52,5 @@
 
 (PageInfoEvent, EVT_PAGE_INFO)   = wx.lib.newevent.NewEvent()
-(FitStateUpdateEvent, EVT_STATE_UPDATE)   = wx.lib.newevent.NewEvent()
+#(FitStateUpdateEvent, EVT_STATE_UPDATE)   = wx.lib.newevent.NewEvent()
 from fitpage import Chi2UpdateEvent
 
@@ -238,5 +239,5 @@
         """
         self.parent = parent
-        self.parent.Bind(EVT_STATE_UPDATE, self.on_set_state_helper)
+        self.parent.Bind(EVT_FITSTATE_UPDATE, self.on_set_state_helper)
         # Creation of the fit panel
         self.fit_panel = FitPanel(self.parent, -1)
@@ -320,6 +321,6 @@
         : event: FitStateUpdateEvent called by dataloader.plot_data from guiframe
         """
-        if len(self.temp_state) == 0 and self.sfile_ext =='.svs':
-            if self.state_index==0 and len(self.mypanels) <= 0:
+        if len(self.temp_state) == 0:
+            if self.state_index==0 and len(self.mypanels) <= 0 and self.sfile_ext =='.svs':
                 self.fit_panel.add_default_pages()
                 self.temp_state = []
