Index: sansguiframe/src/sans/guiframe/data_panel.py
===================================================================
--- sansguiframe/src/sans/guiframe/data_panel.py	(revision 5e5704d5237b5071e2300dab8f6b4e8853525c14)
+++ sansguiframe/src/sans/guiframe/data_panel.py	(revision d4d4c8a798d229468481a0354bc6d86d77a2e688)
@@ -100,10 +100,10 @@
         """
         # Get the item data
-        data1 = self.GetItemText(item1)
-        data2 = self.GetItemText(item2)
+        data_1 = self.GetItemText(item1)
+        data_2 = self.GetItemText(item2)
         # Compare the item data
-        if data1 < data2:
+        if data_1 < data_2:
             return -1
-        elif data1 > data2:
+        elif data_1 > data_2:
             return 1
         else:
@@ -239,5 +239,5 @@
         wx.EVT_COMBOBOX(self.selection_cbox, -1, self._on_selection_type)
         self.sizer5.AddMany([(select_txt, 0, wx.ALL,5), 
-                            (self.selection_cbox,0, wx.ALL,5)])
+                            (self.selection_cbox, 0, wx.ALL,5)])
         self.enable_selection()
         
@@ -403,5 +403,5 @@
         """
         data = None
-        selection = event.GetSelection()
+        #selection = event.GetSelection()
         id, _, _ = self.FindFocus().GetSelection().GetData()
         data_list, theory_list = \
@@ -467,5 +467,5 @@
         """
         data = self._get_data_selection(event)
-        path = None
+        #path = None
         default_name = data.name
         if default_name.count('.') > 0:
@@ -541,6 +541,5 @@
             id, data_class_name, _ = \
                             self.tree_ctrl_theory.GetSelection().GetData()
-            data_list, _ = \
-                            self.parent.get_data_manager().get_by_id(id_list=[id])
+            _, _ = self.parent.get_data_manager().get_by_id(id_list=[id])
         except:
             return
@@ -667,5 +666,5 @@
                         data_ctrl_list =  self.list_cb_data[state_id]
                         #This state is already display replace it contains
-                        data_c, d_i_c, d_t_c, r_n_c,  i_c_c, p_c_c, d_p_c, t_c \
+                        data_c, d_i_c, d_t_c, r_n_c,  i_c_c, p_c_c, d_p_c, _ \
                                 = data_ctrl_list
                         self.tree_ctrl.SetItemText(data_c, data_name) 
@@ -774,5 +773,5 @@
             theory_list_ctrl = {}
             for theory_id, item in theory_list.iteritems():
-                theory_data, theory_state = item
+                theory_data, _ = item
                 if theory_data is not None:
                     name = theory_data.name
@@ -897,5 +896,5 @@
         #remove theory  references independently of data
         for key in theory_key:
-            for t_key, theory_dict in self.list_cb_theory.iteritems():
+            for _, theory_dict in self.list_cb_theory.iteritems():
                 if key in theory_dict:
                     for  key, value in theory_dict.iteritems():
@@ -1119,4 +1118,5 @@
     def check_theory_to_freeze(self):
         """
+        Check_theory_to_freeze
         """
     def enable_freeze(self):
@@ -1288,6 +1288,5 @@
    
     
-from sans.guiframe.dataFitting import Data1D
-from sans.guiframe.dataFitting import Data2D, Theory1D
+from sans.guiframe.dataFitting import Theory1D
 from sans.guiframe.data_state import DataState
 
@@ -1332,5 +1331,5 @@
         path = "path1"
         state1 = State()
-        data_list1['1'] = set_data_state(data1, path,theory, state1)
+        data_list1['1'] = set_data_state(data1, path, theory, state1)
         #state 2
         data1 = Data2D()
@@ -1343,5 +1342,5 @@
         #state3
         state1 = State()
-        data_list1['2'] = set_data_state(data1, path,theory, state1)
+        data_list1['2'] = set_data_state(data1, path, theory, state1)
         data1 = Data1D()
         data1.id = 3
@@ -1357,9 +1356,9 @@
         process1 = data1.process[len(data1.process)-1]
         process1.data = "07/22/2010"
-        data_list1['4'] = set_data_state(data1, path,theory, state1)
+        data_list1['4'] = set_data_state(data1, path, theory, state1)
         #state 4
         temp_data_list = {}
         data1.name = "data5 erasing data2"
-        temp_data_list['4'] = set_data_state(data1, path,theory, state1)
+        temp_data_list['4'] = set_data_state(data1, path, theory, state1)
         #state 5
         data1 = Data2D()
@@ -1367,5 +1366,5 @@
         data1.id = 5
         data1.append_empty_process()
-        process1 = data.process[len(data1.process)-1]
+        process1 = data1.process[len(data1.process)-1]
         process1.data = "07/01/2010"
         theory = Theory1D()
@@ -1373,14 +1372,14 @@
         path = "path2"
         state1 = State()
-        dstate= set_data_state(data, path,theory, state1)
+        dstate1= set_data_state(data1, path, theory, state1)
         theory = Theory1D()
         theory.id = 6
         theory.name = "CoreShell"
-        dstate.set_theory(theory)
+        dstate1.set_theory(theory)
         theory = Theory1D()
         theory.id = 6
         theory.name = "CoreShell replacing coreshell in data3"
-        dstate.set_theory(theory)
-        data_list1['3'] = dstate
+        dstate1.set_theory(theory)
+        data_list1['3'] = dstate1
         #state 6
         data_list1['6'] = set_data_state(None, path, theory, state1)
