Index: calculatorview/perspectives/calculator/aperture_editor.py
===================================================================
--- calculatorview/perspectives/calculator/aperture_editor.py	(revision 6d4891903c99abb2165866455c2ba14f67d6293f)
+++ calculatorview/perspectives/calculator/aperture_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -31,5 +31,31 @@
         self._reset_aperture = deepcopy(aperture)
         self._notes = ""
-        self_description = "Edit aperture"
+        #self_description = "Edit aperture"
+        
+        #Attributes for panel
+        self.aperture_name_tcl = None
+        self.main_sizer = None
+        self.box_aperture = None
+        self.boxsizer_aperture = None
+        self.name_sizer = None
+        self.name_sizer = None
+        self.size_name_tcl  = None
+        self.type_sizer = None
+        self.distance_sizer = None
+        self.size_name_sizer = None
+        self.aperture_size_unit_tcl = None
+        self.aperture_size_sizer = None
+        self.button_sizer = None
+        self.aperture_name_tcl = None
+        self.type_tcl = None
+        self.distance_tcl = None
+        self.distance_unit_tcl = None
+        self.x_aperture_size_tcl = None
+        self.y_aperture_size_tcl = None
+        self.z_aperture_size_tcl = None
+        self.bt_apply = None
+        self.bt_cancel = None
+        self.bt_close = None
+        
         self._do_layout()
         self.set_values()
Index: calculatorview/perspectives/calculator/calculator.py
===================================================================
--- calculatorview/perspectives/calculator/calculator.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/perspectives/calculator/calculator.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,3 +1,5 @@
-
+"""
+Calculator Module
+"""
 ################################################################################
 #This software was developed by the University of Tennessee as part of the
@@ -10,5 +12,5 @@
 ################################################################################
 
-import wx
+#import wx
 import logging
 
@@ -18,5 +20,4 @@
     for calculator perspective
     """
-    
     def __init__(self, standalone=True):
         """
@@ -25,5 +26,6 @@
         ## Plug-in name. It will appear on the application menu.
         self.sub_menu = "Calculator"        
-        
+        #standalone flag
+        self.standalone = standalone
         ## Reference to the parent window. Filled by get_panels() below.
         self.parent = None
@@ -78,5 +80,6 @@
         frame = HelpWindow(None, -1)    
         frame.Show(True)
-      
+        evt.Skip()
+        
     def get_context_menu(self, graph=None):
         """
@@ -117,5 +120,5 @@
         sld_help = "Provides computation related to Scattering Length Density"
         slit_length_help = "Provides computation related to Slit Length Density"
-        data_editor_help = "Meta Data Editor"
+        #data_editor_help = "Meta Data Editor"
         return [("SLD Calculator", sld_help, self.on_calculate_sld),
                 ("Slit Size Calculator", slit_length_help,
@@ -130,6 +133,8 @@
         """
         from data_editor import DataEditorWindow
-        frame = DataEditorWindow(parent=self.parent, data=[], title="Data Editor")
+        frame = DataEditorWindow(parent=self.parent, data=[],
+                                  title="Data Editor")
         frame.Show(True)
+        event.Skip()
 
     def on_calculate_kiessig(self, event):
@@ -140,5 +145,5 @@
         frame = KiessigWindow()
         frame.Show(True) 
-    
+        event.Skip()
        
     def on_calculate_sld(self, event):
@@ -149,5 +154,6 @@
         frame = SldWindow(base=self.parent)
         frame.Show(True) 
-    
+        event.Skip()
+        
     def on_calculate_slit_size(self, event):
         """
@@ -157,4 +163,5 @@
         frame = SlitLengthCalculatorWindow(parent=self.parent)    
         frame.Show(True)
+        event.Skip()
         
     def on_perspective(self, event):
@@ -168,6 +175,6 @@
         """
         self.parent.set_perspective(self.perspective)
-       
-    
+        event.Skip()
+        
     def post_init(self):
         """
Index: calculatorview/perspectives/calculator/calculator_widgets.py
===================================================================
--- calculatorview/perspectives/calculator/calculator_widgets.py	(revision b7e0ffff7f6eae27852d3df00dfd5a8704844789)
+++ calculatorview/perspectives/calculator/calculator_widgets.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -9,5 +9,5 @@
 """
 import wx
-import os
+#import os
 
 class InputTextCtrl(wx.TextCtrl):
@@ -20,6 +20,7 @@
         wx.TextCtrl.__init__(self, *args, **kwds)
         
-        ## Set to True when the mouse is clicked while the whole string is selected
-        full_selection = False
+        ## Set to True when the mouse is clicked while the whole 
+        #string is selected
+        self.full_selection = False
         ## Call back for EVT_SET_FOCUS events
         _on_set_focus_callback = None
@@ -52,6 +53,6 @@
                 # if not, select the whole string
                 (start, end) = control.GetSelection()
-                if start==end:
-                    control.SetSelection(-1,-1)
+                if start == end:
+                    control.SetSelection(-1, -1)
 
     
Index: calculatorview/perspectives/calculator/collimation_editor.py
===================================================================
--- calculatorview/perspectives/calculator/collimation_editor.py	(revision 6137b1500635c6fedd6d779d3ae59748933c5e73)
+++ calculatorview/perspectives/calculator/collimation_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,3 +1,4 @@
-
+"""
+"""
 import wx
 import sys
@@ -28,5 +29,5 @@
         """
         """
-        kwds['size'] =(PANEL_WIDTH, PANEL_HEIGHT)
+        kwds['size'] = (PANEL_WIDTH, PANEL_HEIGHT)
         kwds['title'] = "Collimation Editor"
         wx.Dialog.__init__(self, parent=parent, *args, **kwds)
@@ -37,4 +38,10 @@
         self._notes = ""
         self._description = "Edit collimation"
+        #layout attributes
+        self.main_sizer = None
+        self.box_collimation = None
+        self.boxsizer_collimation = None
+        
+        
         self._do_layout()
         self.set_values()
@@ -45,6 +52,8 @@
         """
         self.main_sizer = wx.BoxSizer(wx.VERTICAL)
-        self.box_collimation = wx.StaticBox(self, -1,str("Edit Selected Collimation"))
-        self.boxsizer_collimation = wx.StaticBoxSizer(self.box_collimation, wx.VERTICAL)
+        self.box_collimation = wx.StaticBox(self, -1,
+                                            str("Edit Selected Collimation"))
+        self.boxsizer_collimation = wx.StaticBoxSizer(self.box_collimation,
+                                                       wx.VERTICAL)
         
         collimation_box = wx.StaticBox(self, -1, "Edit Number of Collimations")
@@ -80,16 +89,21 @@
         
         self.bt_remove_collimation = wx.Button(self, -1, "Remove")
-        self.bt_remove_collimation.SetToolTipString("Remove data's collimation.")
+        hint = "Remove data's collimation."
+        self.bt_remove_collimation.SetToolTipString(hint)
         self.bt_remove_collimation.Bind(wx.EVT_BUTTON, self.remove_collimation)
       
-        self.collimation_button_sizer.AddMany([(collimation_name_txt, 0, wx.LEFT, 15),
+        self.collimation_button_sizer.AddMany([(collimation_name_txt, 0,
+                                                 wx.LEFT, 15),
                                      (self.collimation_cbox, 0, wx.LEFT, 5),
                                      (self.bt_add_collimation, 0, wx.LEFT, 10),
-                                     (self.bt_remove_collimation, 0, wx.LEFT, 5)])
+                                     (self.bt_remove_collimation,
+                                       0, wx.LEFT, 5)])
         collimation_hint_txt = 'No collimation is available for this data.'
         self.collimation_txt = wx.StaticText(self, -1, collimation_hint_txt) 
         self.collimation_hint_sizer.Add(self.collimation_txt, 0, wx.LEFT, 10)
-        self.collimation_sizer.AddMany([(self.collimation_button_sizer, 0, wx.ALL, 10),
-                                     (self.collimation_hint_sizer, 0, wx.ALL, 10)])
+        self.collimation_sizer.AddMany([(self.collimation_button_sizer,
+                                          0, wx.ALL, 10),
+                                     (self.collimation_hint_sizer,
+                                       0, wx.ALL, 10)])
      
         self.fill_collimation_combox()
@@ -115,5 +129,6 @@
         self.length_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
         length_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.length_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
+        self.length_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),
+                                           style=0)  
         self.length_sizer.AddMany([(length_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.length_tcl, 0, wx.LEFT, 12),
@@ -165,10 +180,11 @@
         self.aperture_txt = wx.StaticText(self, -1, aperture_hint_txt) 
         self.aperture_hint_sizer.Add(self.aperture_txt, 0, wx.LEFT, 10)
-        self.aperture_sizer.AddMany([(self.aperture_button_sizer, 0, wx.ALL, 10),
+        self.aperture_sizer.AddMany([(self.aperture_button_sizer,
+                                       0, wx.ALL, 10),
                                      (self.aperture_hint_sizer, 0, wx.ALL, 10)])
         self.fill_aperture_combox()
         self.enable_aperture()
     
-    def _do_layout(self, data=None):
+    def _do_layout(self):
         """
         Draw the current panel
@@ -265,5 +281,6 @@
     def on_select_collimation(self, event):
         """
-        fill the control on the panel according to the current  selected collimation 
+        fill the control on the panel according to 
+        the current  selected collimation 
         """
         self.set_values()
@@ -275,9 +292,11 @@
         Enable /disable widgets related to collimation
         """
-        if self._collimation is not None and self.collimation_cbox.GetCount() > 0:
+        if self._collimation is not None and \
+            self.collimation_cbox.GetCount() > 0:
             self.collimation_cbox.Enable()
             self.bt_remove_collimation.Enable()
             n_collimation = self.collimation_cbox.GetCount()
-            collimation_hint_txt = 'collimations available: %s '%str(n_collimation)
+            collimation_hint_txt = "collimations"
+            collimation_hint_txt += " available: %s "% str(n_collimation)
             if len(self._collimation) > 0:
                 self.bt_remove_collimation.Enable()
@@ -491,6 +510,6 @@
                     collimation.length  = float(length)
             else:
-                self._notes += "Error: Expected a float for collimation length "
-                self._notes += "won't changes length from "
+                self._notes += "Error: Expected a float for collimation length"
+                self._notes += " won't changes length from "
                 self._notes += "%s to %s"%(collimation.length, length)
         #change length  unit
@@ -518,8 +537,8 @@
         self.set_values()
         if self.manager is not None:
-             self.manager.set_collimation(self._collimation)
+            self.manager.set_collimation(self._collimation)
        
  
-if __name__ =="__main__":
+if __name__ == "__main__":
 
     app  = wx.App()
Index: calculatorview/perspectives/calculator/console.py
===================================================================
--- calculatorview/perspectives/calculator/console.py	(revision 91f151aa297ca6be7a92ce3c4ba7905d318441cf)
+++ calculatorview/perspectives/calculator/console.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,6 +1,5 @@
-import wx
-CONSOLE_WIDTH = 340
-CONSOLE_HEIGHT = 240
-
+"""
+Console Module display message of a dialog
+"""
 import wx
 import sys
@@ -8,5 +7,6 @@
 
 _BOX_WIDTH = 60
-
+CONSOLE_WIDTH = 340
+CONSOLE_HEIGHT = 240
 if sys.platform.count("win32")>0:
     _STATICBOX_WIDTH = 450
@@ -22,7 +22,7 @@
 
 class ConsoleDialog(wx.Dialog):
-    def __init__(self, parent=None, id=-1, manager=None, data=None,
-                        title="Data Summary",size=(PANEL_WIDTH, PANEL_HEIGHT)):
-        wx.Dialog.__init__(self, parent=parent, id=id, title=title, size=size)
+    def __init__(self, parent=None, manager=None, data=None,
+                    title="Data Summary", size=(PANEL_WIDTH, PANEL_HEIGHT)):
+        wx.Dialog.__init__(self, parent=parent, title=title, size=size)
    
         self.parent = parent
@@ -43,4 +43,5 @@
     def set_manager(self, manager):
         """
+        Set the manager of this window
         """
         self._manager = manager
@@ -48,8 +49,9 @@
     def set_message(self, msg=""):  
         """
+        Display the message received 
         """
         self.msg_txt.SetValue(str(msg))
  
-if __name__ =="__main__":
+if __name__ == "__main__":
    
     app  = wx.App()
@@ -57,6 +59,6 @@
     loader = Loader()
     # Load data 
-    data = loader.load("MAR07232_rest.ASC")
-    dlg = ConsoleDialog(data=data)
+    test_data = loader.load("MAR07232_rest.ASC")
+    dlg = ConsoleDialog(data=test_data)
     dlg.ShowModal()
     app.MainLoop()
Index: calculatorview/perspectives/calculator/data_editor.py
===================================================================
--- calculatorview/perspectives/calculator/data_editor.py	(revision c5dca876b23923d1c26b4f53976aeb2c1461d888)
+++ calculatorview/perspectives/calculator/data_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -6,10 +6,13 @@
 
 from DataLoader.loader import Loader
-from DataLoader.data_info import DataInfo, Detector, Collimation, Data2D
+#from DataLoader.data_info import DataInfo
+#from DataLoader.data_info import  Detector
+#from DataLoader.data_info import Collimation
+from DataLoader.data_info import Data2D
 from detector_editor import DetectorDialog
 from collimation_editor import CollimationDialog
 from console import ConsoleDialog
 
-from sans.guiframe.utils import check_float
+#from sans.guiframe.utils import check_float
 from sans.guicomm.events import StatusEvent
 
@@ -19,5 +22,5 @@
 _NPTS_DEFAULT = 50
 #Control panel width 
-if sys.platform.count("darwin")==0:
+if sys.platform.count("darwin") == 0:
     PANEL_WIDTH = 500
     PANEL_HEIGTH = 350
@@ -43,7 +46,9 @@
     
     if error is not None:
-        message += "When contacting the DANSE team, mention the following:\n%s" % str(error)
-    
-    dial = wx.MessageDialog(None, message, 'Error Loading File', wx.OK | wx.ICON_EXCLAMATION)
+        message += "When contacting the DANSE team,"
+        message += " mention the following:\n%s" % str(error)
+    
+    dial = wx.MessageDialog(None, message, 
+                            'Error Loading File', wx.OK | wx.ICON_EXCLAMATION)
     dial.ShowModal() 
     
@@ -51,28 +56,29 @@
 class DataEditorPanel(wx.ScrolledWindow):
     """
-        @param data: when not empty the class can same information into a dat object
+    :param data: when not empty the class can 
+                same information into a dat object
         and post event containing the changed data object to some other frame
     """
     def __init__(self, parent, data=[], *args, **kwds):
-         kwds['name'] = "Data Editor"
-         kwds["size"]= (PANEL_WIDTH, PANEL_HEIGTH)
-         wx.ScrolledWindow.__init__(self, parent, *args, **kwds)
-         self.parent = parent
-         self._data = data
-         self._reset_data = deepcopy(data)
-         self.reader = None
-         self._notes = ""
-         self_description = "Edit Data"
-         self._default_save_location = os.getcwd()
-         self._do_layout()
-         self.reset_panel()
-         self.bt_apply.Disable()
-         if data:
-             self.complete_loading(data=data)
-             self.bt_apply.Enable()
+        kwds['name'] = "Data Editor"
+        kwds["size"] = (PANEL_WIDTH, PANEL_HEIGTH)
+        wx.ScrolledWindow.__init__(self, parent, *args, **kwds)
+        self.parent = parent
+        self._data = data
+        self._reset_data = deepcopy(data)
+        self.reader = None
+        self._notes = ""
+        self._description = "Edit Data"
+        self._default_save_location = os.getcwd()
+        self._do_layout()
+        self.reset_panel()
+        self.bt_apply.Disable()
+        if data:
+            self.complete_loading(data=data)
+            self.bt_apply.Enable()
              
     def _define_structure(self):
         """
-            define initial sizer 
+        define initial sizer 
         """
         self.main_sizer = wx.BoxSizer(wx.VERTICAL)
@@ -91,5 +97,5 @@
     def _layout_name(self):
         """
-            Do the layout for data name related widgets
+        Do the layout for data name related widgets
         """
         #data name [string]
@@ -110,5 +116,5 @@
     def _layout_title(self):
         """
-            Do the layout for data title related widgets
+        Do the layout for data title related widgets
         """
         #title name [string]
@@ -123,9 +129,10 @@
     def _layout_run(self):
         """
-            Do the layout for data run related widgets
+        Do the layout for data run related widgets
         """
         data_run_txt = wx.StaticText(self, -1, 'Run : ') 
         data_run_txt.SetToolTipString('') 
-        self.data_run_tcl = wx.TextCtrl(self, -1, size=(PANEL_WIDTH*3/5, -1), style=wx.TE_MULTILINE)
+        self.data_run_tcl = wx.TextCtrl(self, -1, size=(PANEL_WIDTH*3/5, -1),
+                                         style=wx.TE_MULTILINE)
         hint_run = "Data's run."
         self.data_run_tcl.SetToolTipString(hint_run)
@@ -135,5 +142,5 @@
     def _layout_instrument(self):
         """
-            Do the layout for instrument related widgets
+        Do the layout for instrument related widgets
         """
         instrument_txt = wx.StaticText(self, -1, 'Instrument : ') 
@@ -148,5 +155,5 @@
     def _layout_editor(self):
         """
-            Do the layout for sample related widgets
+        Do the layout for sample related widgets
         """
         self.detector_rb = wx.RadioButton(self, -1, "Detector",
@@ -186,5 +193,6 @@
             Layout widgets related to data's summary
         """
-        self.data_summary = wx.TextCtrl(self, -1, style=wx.TE_MULTILINE|wx.HSCROLL,
+        self.data_summary = wx.TextCtrl(self, -1,
+                                         style=wx.TE_MULTILINE|wx.HSCROLL,
                                         size=(-1, 200))
         summary = 'No data info available...'
@@ -196,21 +204,21 @@
             Do the layout for the button widgets
         """ 
-        self.bt_summary = wx.Button(self, -1, "View", size=(_BOX_WIDTH,-1))
+        self.bt_summary = wx.Button(self, -1, "View", size=(_BOX_WIDTH, -1))
         self.bt_summary.SetToolTipString("View final changes on data.")
         self.bt_summary.Bind(wx.EVT_BUTTON, self.on_click_view)
         
-        self.bt_save = wx.Button(self, -1, "Save As", size=(_BOX_WIDTH,-1))
+        self.bt_save = wx.Button(self, -1, "Save As", size=(_BOX_WIDTH, -1))
         self.bt_save.SetToolTipString("Save changes in a file.")
         self.bt_save.Bind(wx.EVT_BUTTON, self.on_click_save)
         
-        self.bt_apply = wx.Button(self, -1, "Apply", size=(_BOX_WIDTH,-1))
+        self.bt_apply = wx.Button(self, -1, "Apply", size=(_BOX_WIDTH, -1))
         self.bt_apply.SetToolTipString("Save changes into the imported data.")
         self.bt_apply.Bind(wx.EVT_BUTTON, self.on_click_apply)
       
-        self.bt_reset = wx.Button(self, -1,'Reset', size=(_BOX_WIDTH,-1))
+        self.bt_reset = wx.Button(self, -1, 'Reset', size=(_BOX_WIDTH, -1))
         self.bt_reset.Bind(wx.EVT_BUTTON, self.on_click_reset)
         self.bt_reset.SetToolTipString("Reset data to its initial state.")
         
-        self.bt_close = wx.Button(self, -1,'Close', size=(_BOX_WIDTH,-1))
+        self.bt_close = wx.Button(self, -1, 'Close', size=(_BOX_WIDTH, -1))
         self.bt_close.Bind(wx.EVT_BUTTON, self.on_close)
         self.bt_close.SetToolTipString("Close this panel.")
@@ -222,7 +230,7 @@
                                    (self.bt_close, 0, wx.RIGHT, 10)])
         
-    def _do_layout(self, data=None):
-        """
-            Draw the current panel
+    def _do_layout(self):
+        """
+        Draw the current panel
         """
         self._define_structure()
@@ -244,10 +252,10 @@
                                           wx.EXPAND|wx.TOP|wx.BOTTOM, 5)])
         self.SetSizer(self.main_sizer)
-        self.SetScrollbars(20,20,25,65)
+        self.SetScrollbars(20, 20, 25, 65)
         self.SetAutoLayout(True)
         
     def fill_data_combox(self):
         """
-            fill the current combobox with the available data
+        fill the current combobox with the available data
         """
         if not self._data:
@@ -275,5 +283,5 @@
         """
         """
-        data, data_name, position = self.get_current_data()
+        data, _, _ = self.get_current_data()
         self.reset_panel()
         if data is None:
@@ -322,7 +330,7 @@
     def set_sample(self, sample, notes=None):
         """
-            set sample for data
-        """
-        data, data_name, position = self.get_current_data()
+        set sample for data
+        """
+        data, _, _ = self.get_current_data()
         if data is None:
             return 
@@ -333,5 +341,5 @@
     def set_source(self, source, notes=None):
         """
-            set source for data
+        set source for data
         """
         data, data_name, position = self.get_current_data()
@@ -344,5 +352,5 @@
     def set_detector(self, detector, notes=None):
         """
-            set detector for data
+        set detector for data
         """
         data, data_name, position = self.get_current_data()
@@ -355,5 +363,5 @@
     def set_collimation(self, collimation, notes=None):
         """
-            set collimation for data
+        set collimation for data
         """
         data, data_name, position = self.get_current_data()
@@ -366,5 +374,5 @@
     def edit_collimation(self):
         """
-            Edit the selected collimation
+        Edit the selected collimation
         """
         data, data_name, position = self.get_current_data()
@@ -377,5 +385,5 @@
     def edit_detector(self):
         """
-            Edit the selected detector
+        Edit the selected detector
         """
         data, data_name, position = self.get_current_data()
@@ -388,7 +396,7 @@
     def edit_sample(self):
         """
-            Open the dialog to edit the sample of the current data
-        """
-        data, data_name, position = self.get_current_data()
+        Open the dialog to edit the sample of the current data
+        """
+        data, _, _ = self.get_current_data()
         if data is None:
             return
@@ -400,5 +408,5 @@
     def edit_source(self):
         """
-            Open the dialog to edit the saource of the current data
+        Open the dialog to edit the saource of the current data
         """
         data, data_name, position = self.get_current_data()
@@ -412,5 +420,5 @@
     def choose_data_file(self, location=None):
         """
-            Open a file dialog to allow loading a file
+        Open a file dialog to allow loading a file
         """
         path = None
@@ -432,5 +440,5 @@
     def complete_loading(self, data=None, filename=''):
         """
-            Complete the loading and compute the slit size
+        Complete the loading and compute the slit size
         """
         self.done = True
@@ -438,5 +446,6 @@
         if data is None:
             msg = "Couldn't load data"
-            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, info="warning",type='stop'))
+            wx.PostEvent(self.parent.parent, StatusEvent(status=msg,
+                                             info="warning",type='stop'))
             return 
         if not  data.__class__.__name__ == "list":
@@ -450,10 +459,11 @@
             return 
         msg = "Load Complete"
-        wx.PostEvent(self.parent.parent, StatusEvent(status=msg,info="info",type='stop'))
+        wx.PostEvent(self.parent.parent, StatusEvent(status=msg,
+                                                info="info",type='stop'))
   
     def set_values(self):
         """
-            take the aperture values of the current data and display them
-            through the panel
+        take the aperture values of the current data and display them
+        through the panel
         """
         if self._data:
@@ -463,5 +473,5 @@
     def get_data(self):
         """
-            return the current data
+        return the current data
         """
         return self._data
@@ -469,5 +479,5 @@
     def get_notes(self):
         """
-            return notes
+        return notes
         """
         return self._notes
@@ -475,8 +485,8 @@
     def on_change_run(self, event=None):
         """
-            Change run
+        Change run
         """
         run = []
-        data, data_name, position = self.get_current_data()
+        data, _, _ = self.get_current_data()
         for i in range(self.data_run_tcl.GetNumberOfLines()):
             text = self.data_run_tcl.GetLineText(i).lstrip().rstrip()
@@ -485,12 +495,14 @@
         if data.run != run:
             self._notes += "Change data 's "
-            self._notes += "run from %s to %s \n"%(data.run, str(run))
+            self._notes += "run from %s to %s \n" % (data.run, str(run))
             data.run = run
-            
+        if event is not None:
+            event.Skip()
+                 
     def on_change_title(self, event=None):
         """
-            Change title
-        """
-        data, data_name, position = self.get_current_data()
+        Change title
+        """
+        data, _, _ = self.get_current_data()
         #Change data's name
         title = self.data_title_tcl.GetValue().lstrip().rstrip()
@@ -498,11 +510,13 @@
         if data.title != title:
             self._notes += "Change data 's "
-            self._notes += "title from %s to %s \n"%(data.title, str(title))
+            self._notes += "title from %s to %s \n" % (data.title, str(title))
             data.title = title
-           
+        if event is not None:
+            event.Skip()
+            
     def on_click_browse(self, event):
         """
-            Open a file dialog to allow the user to select a given file.
-            Display the loaded data if available.
+        Open a file dialog to allow the user to select a given file.
+        Display the loaded data if available.
         """
         path = self.choose_data_file(location=self._default_save_location)
@@ -510,6 +524,6 @@
             return 
         if self.parent.parent is not None:
-            wx.PostEvent(self.parent.parent, StatusEvent(status="Loading...",info="info",
-                                type="progress"))
+            wx.PostEvent(self.parent.parent, StatusEvent(status="Loading...",
+                                        info="info", type="progress"))
         
         self.done = False
@@ -526,7 +540,8 @@
             self.reader.queue()
         except:
-            msg = "Data Editor: %s"%(sys.exc_value)
+            msg = "Data Editor: %s" % (sys.exc_value)
             load_error(msg)
             return 
+        event.Skip()
          
     def on_edit(self, event):
@@ -541,10 +556,11 @@
         if self.collimation_rb.GetValue():
             self.edit_collimation()
+        event.Skip()
             
     def on_click_apply(self, event):
         """   
-            changes are saved in data object imported to edit
-        """
-        data, data_name, position = self.get_current_data()
+        changes are saved in data object imported to edit
+        """
+        data, _, _ = self.get_current_data()
         if data is None:
             return
@@ -552,8 +568,9 @@
         self.on_change_title(event=None)
         #must post event here
+        event.Skip()
         
     def on_click_save(self, event):
         """
-            Save change into a file
+        Save change into a file
         """
         if not self._data:
@@ -579,5 +596,5 @@
                     loader = Loader() 
                     format = ".xml"
-                    if os.path.splitext(mypath)[1].lower() ==format:
+                    if os.path.splitext(mypath)[1].lower() == format:
                         loader.save( path, data, format)
                     try:
@@ -586,8 +603,9 @@
                         pass    
                     dlg.Destroy()
+        event.Skip()
         
     def on_click_view(self, event):
         """
-            Display data info 
+        Display data info 
         """
         data, data_name, position = self.get_current_data()
@@ -598,4 +616,5 @@
         dlg = ConsoleDialog(data=data)
         dlg.ShowModal()
+        event.Skip()
     
     def on_click_reset(self, event):
@@ -605,16 +624,18 @@
         if data is None:
             return
-        self._data[position]= deepcopy(self._reset_data[position])
+        self._data[position] = deepcopy(self._reset_data[position])
         self.set_values()
+        event.Skip()
         
     def on_close(self, event):
         """
-            leave data as it is and close
+        leave data as it is and close
         """
         self.parent.Close()
+        event.Skip()
         
 class DataEditorWindow(wx.Frame):
     def __init__(self, parent, data=None, *args, **kwds):
-        kwds["size"]= (PANEL_WIDTH, PANEL_HEIGTH)
+        kwds["size"] = (PANEL_WIDTH, PANEL_HEIGTH)
         wx.Frame.__init__(self, parent, *args, **kwds)
         self.parent = parent
@@ -628,5 +649,5 @@
         return self.panel.get_data()
     
-if __name__ =="__main__":
+if __name__ == "__main__":
    
     app  = wx.App()
Index: calculatorview/perspectives/calculator/detector_editor.py
===================================================================
--- calculatorview/perspectives/calculator/detector_editor.py	(revision ad6f597281ffdc10ba61293ef7a8566da1421213)
+++ calculatorview/perspectives/calculator/detector_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -5,7 +5,7 @@
 from DataLoader.data_info import Detector
 from sans.guiframe.utils import check_float
+
 _BOX_WIDTH = 60
-
-if sys.platform.count("win32")>0:
+if sys.platform.count("win32") > 0:
     _STATICBOX_WIDTH = 465
     PANEL_WIDTH = 500
@@ -19,6 +19,7 @@
     
 class DetectorDialog(wx.Dialog):
-    def __init__(self, parent=None, id=-1, manager=None, detector=None,
-                        title="Detector Editor",size=(PANEL_WIDTH, PANEL_HEIGHT)):
+    def __init__(self, parent=None, manager=None, detector=None,
+                        title="Detector Editor",
+                        size=(PANEL_WIDTH, PANEL_HEIGHT)):
         wx.Dialog.__init__(self, parent=parent, id=id, title=title, size=size)
         try:
@@ -86,5 +87,6 @@
         self.detector_txt = wx.StaticText(self, -1, detector_hint_txt) 
         self.detector_hint_sizer.Add(self.detector_txt, 0, wx.LEFT, 10)
-        self.detector_sizer.AddMany([(self.detector_button_sizer, 0, wx.ALL, 10),
+        self.detector_sizer.AddMany([(self.detector_button_sizer, 0,
+                                       wx.ALL, 10),
                                      (self.detector_hint_sizer, 0, wx.ALL, 10)])
      
@@ -98,7 +100,9 @@
         #Instrument
         instrument_name_txt = wx.StaticText(self, -1, 'Instrument Name : ')  
-        self.instrument_name_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH*5, 20), style=0) 
-        self.instrument_sizer.AddMany([(instrument_name_txt, 0, wx.LEFT|wx.RIGHT, 10),
-                                       (self.instrument_name_tcl, 0, wx.EXPAND)])
+        self.instrument_name_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH*5, 20), style=0) 
+        self.instrument_sizer.AddMany([(instrument_name_txt, 0, 
+                                        wx.LEFT|wx.RIGHT, 10),
+                                    (self.instrument_name_tcl, 0, wx.EXPAND)])
     def _layout_distance(self):
         """
@@ -106,7 +110,9 @@
         """
         distance_txt = wx.StaticText(self, -1, 'Sample to Detector Distance : ')  
-        self.distance_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)
+        self.distance_tcl = wx.TextCtrl(self, -1,
+                                         size=(_BOX_WIDTH, 20), style=0)
         distance_unit_txt = wx.StaticText(self, -1, 'Unit: ')  
-        self.distance_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)  
+        self.distance_unit_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0)  
         self.distance_sizer.AddMany([(distance_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.distance_tcl, 0, wx.RIGHT, 10),
@@ -121,11 +127,15 @@
         offset_txt = wx.StaticText(self, -1, 'Offset:') 
         x_offset_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_offset_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.x_offset_tcl = wx.TextCtrl(self, -1, 
+                                        size=(_BOX_WIDTH, 20), style=0) 
         y_offset_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_offset_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.y_offset_tcl = wx.TextCtrl(self, -1,
+                                         size=(_BOX_WIDTH, 20), style=0) 
         z_offset_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_offset_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)  
+        self.z_offset_tcl = wx.TextCtrl(self, -1,
+                                         size=(_BOX_WIDTH, 20), style=0)  
         offset_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.offset_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)
+        self.offset_unit_tcl = wx.TextCtrl(self, -1, 
+                                           size=(_BOX_WIDTH, 20), style=0)
         self.offset_sizer.AddMany([(offset_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (x_offset_txt, 0, wx.LEFT, 30),
@@ -145,12 +155,17 @@
         orientation_txt = wx.StaticText(self, -1, 'Orientation:') 
         x_orientation_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.x_orientation_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0) 
         y_orientation_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.y_orientation_tcl = wx.TextCtrl(self, -1, 
+                                             size=(_BOX_WIDTH, 20), style=0) 
         z_orientation_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)  
+        self.z_orientation_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0)  
         orientation_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.orientation_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
-        self.orientation_sizer.AddMany([(orientation_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.orientation_unit_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)  
+        self.orientation_sizer.AddMany([(orientation_txt, 0,
+                                          wx.LEFT|wx.RIGHT, 10),
                                      (x_orientation_txt, 0, wx.LEFT, 7),
                                      (self.x_orientation_tcl, 0, wx.RIGHT, 10),
@@ -160,5 +175,5 @@
                                      (self.z_orientation_tcl, 0, wx.RIGHT, 10),
                                      (orientation_unit_txt, 0, wx.EXPAND),
-                                     (self.orientation_unit_tcl, 0, wx.RIGHT, 10)]) 
+                            (self.orientation_unit_tcl, 0, wx.RIGHT, 10)]) 
         
     def _layout_beam_center(self):
@@ -169,11 +184,15 @@
         beam_center_txt = wx.StaticText(self, -1, 'Beam Center:') 
         x_beam_center_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_beam_center_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.x_beam_center_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0) 
         y_beam_center_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_beam_center_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0) 
+        self.y_beam_center_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0) 
         z_beam_center_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_beam_center_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)  
+        self.z_beam_center_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH, 20), style=0)  
         beam_center_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.beam_center_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)
+        self.beam_center_unit_tcl = wx.TextCtrl(self, -1,
+                                                 size=(_BOX_WIDTH, 20), style=0)
         self.beam_sizer.AddMany([(beam_center_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (x_beam_center_txt, 0, wx.EXPAND),
@@ -184,5 +203,5 @@
                                      (self.z_beam_center_tcl, 0, wx.RIGHT, 10),
                                      (beam_center_unit_txt, 0, wx.EXPAND),
-                                     (self.beam_center_unit_tcl, 0,wx.RIGHT, 10)])   
+                                (self.beam_center_unit_tcl, 0,wx.RIGHT, 10)])   
     
     def _layout_pixel_size(self):
@@ -193,11 +212,15 @@
         pixel_size_txt = wx.StaticText(self, -1, 'Pixel Size:') 
         x_pixel_size_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_pixel_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.x_pixel_size_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH,20), style=0) 
         y_pixel_size_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_pixel_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.y_pixel_size_tcl = wx.TextCtrl(self, -1, 
+                                            size=(_BOX_WIDTH,20), style=0) 
         z_pixel_size_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_pixel_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.z_pixel_size_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH,20), style=0)  
         pixel_size_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.pixel_size_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.pixel_size_unit_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH,20), style=0)  
         self.pixel_sizer.AddMany([(pixel_size_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (x_pixel_size_txt, 0, wx.LEFT, 17),
@@ -208,5 +231,5 @@
                                      (self.z_pixel_size_tcl, 0, wx.RIGHT, 10),
                                      (pixel_size_unit_txt, 0, wx.EXPAND),
-                                     (self.pixel_size_unit_tcl, 0, wx.RIGHT, 10)])
+                                (self.pixel_size_unit_tcl, 0, wx.RIGHT, 10)])
     
     def _layout_slit_length(self):
@@ -216,11 +239,13 @@
         #slit length
         slit_length_txt = wx.StaticText(self, -1, 'Slit Length: ')  
-        self.slit_length_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)
+        self.slit_length_tcl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH,20), style=0)
         slit_length_unit_txt = wx.StaticText(self, -1, 'Unit: ')  
-        self.slit_length_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)   
+        self.slit_length_unit_tcl = wx.TextCtrl(self, -1,
+                                                 size=(_BOX_WIDTH,20), style=0)   
         self.slit_sizer.AddMany([(slit_length_txt, 0, wx.LEFT, 10),
                                      (self.slit_length_tcl, 0, wx.RIGHT, 10),
                                      (slit_length_unit_txt, 0, wx.EXPAND),
-                                     (self.slit_length_unit_tcl, 0,wx.RIGHT, 10)])
+                            (self.slit_length_unit_tcl, 0,wx.RIGHT, 10)])
         
     def _layout_button(self):  
@@ -413,5 +438,6 @@
         self.offset_unit_tcl.SetValue(str(detector.offset_unit))
         #Orientation
-        x, y, z = detector.orientation.x, detector.orientation.y, detector.orientation.z
+        x, y = detector.orientation.x, detector.orientation.y
+        z = detector.orientation.z
         self.x_orientation_tcl.SetValue(str(x))  
         self.y_orientation_tcl.SetValue(str(y)) 
@@ -419,5 +445,6 @@
         self.orientation_unit_tcl.SetValue(str(detector.orientation_unit))
         #Beam center
-        x, y, z = detector.beam_center.x, detector.beam_center.y, detector.beam_center.z
+        x, y = detector.beam_center.x, detector.beam_center.y
+        z  =   detector.beam_center.z
         self.x_beam_center_tcl.SetValue(str(x))  
         self.y_beam_center_tcl.SetValue(str(y)) 
@@ -425,5 +452,6 @@
         self.beam_center_unit_tcl.SetValue(str(detector.beam_center_unit))
         #Pixel size 
-        x, y, z = detector.pixel_size.x, detector.pixel_size.y, detector.pixel_size.z
+        x, y = detector.pixel_size.x, detector.pixel_size.y
+        z = detector.pixel_size.z
         self.x_pixel_size_tcl.SetValue(str(x))  
         self.y_pixel_size_tcl.SetValue(str(y)) 
@@ -485,5 +513,6 @@
                     detector.distance = float(distance)
             else:
-                self._notes += "Error: Expected a float for the distance won't changes "
+                self._notes += "Error: Expected a float for "
+                self._notes += " the distance won't changes "
                 self._notes += "%s to %s"%(detector.distance, distance)
         #change the distance unit
@@ -513,10 +542,11 @@
                 if detector.offset.x != float(x_offset):
                     self._notes += "Change x of offset from"
-                    self._notes += " %s to %s \n"%(detector.offset.x, x_offset)
+                    self._notes += " %s to %s \n" % (detector.offset.x,
+                                                      x_offset)
                     detector.offset.x = float(x_offset)
             else:
                 self._notes += "Error: Expected a float for the offset 's x "
                 self._notes += "won't changes x offset"
-                self._notes += " from %s to %s"%(detector.offset.x, x_offset)
+                self._notes += " from %s to %s" % (detector.offset.x, x_offset)
         #Change y coordinate
         y_offset = self.y_offset_tcl.GetValue().lstrip().rstrip()
@@ -533,6 +563,6 @@
                 self._notes += "Error: Expected a float for the offset 's y "
                 self._notes += "won't changes y "
-                self._notes += "offset from %s to %s"%(detector.offset.y\
-                                                         ,y_offset)
+                self._notes += "offset from %s to %s"%(detector.offset.y,
+                                                         y_offset)
         #Change z coordinate
         z_offset = self.z_offset_tcl.GetValue().lstrip().rstrip()
@@ -543,6 +573,6 @@
             if check_float(self.z_offset_tcl):
                 if detector.offset.z != float(z_offset):
-                    self._notes += "Change z of"
-                    self._notes += "offset from %s to %s \n"%(detector.offset.z,\
+                    self._notes += "Change z of offset from"
+                    self._notes += " %s to %s \n" % (detector.offset.z,
                                                               z_offset)
                     detector.offset.z  = float(z_offset)
@@ -550,10 +580,11 @@
                 self._notes += "Error: Expected a float for the offset 's x "
                 self._notes += "won't changes z"
-                self._notes += "offset from %s to %s"%(detector.offset.z, z_offset)
+                self._notes += "offset from %s to %s" % (detector.offset.z, 
+                                                       z_offset)
         #change the offset unit
         unit = self.offset_unit_tcl.GetValue().lstrip().rstrip()
         if detector.offset_unit != unit:
             self._notes += " Change Offset's"
-            self._notes += "unit from %s to %s"%(detector.offset_unit, unit)
+            self._notes += "unit from %s to %s" % (detector.offset_unit, unit)
             
         self.detector_cbox.SetString(position, str(detector.name)) 
@@ -577,10 +608,12 @@
                 if detector.orientation.x != float(x_orientation):
                     self._notes += "Change x of orientation from "
-                    self._notes += "%s to %s \n"%(detector.orientation.x, x_orientation)
+                    self._notes += "%s to %s \n" % (detector.orientation.x,
+                                                   x_orientation)
                     detector.orientation.x  = float(x_orientation)
             else:
-                self._notes += "Error: Expected a float for the orientation 's x "
-                self._notes += "won't changes x orientation from "
-                self._notes += "%s to %s"%(detector.orientation.x, x_orientation)
+                self._notes += "Error: Expected a float for the orientation "
+                self._notes += "'s x  won't changes x orientation from "
+                self._notes += "%s to %s" % (detector.orientation.x,
+                                              x_orientation)
         #Change y coordinate
         y_orientation = self.y_orientation_tcl.GetValue().lstrip().rstrip()
@@ -592,10 +625,12 @@
                 if detector.orientation.y != float(y_orientation):
                     self._notes += "Change y of orientation from "
-                    self._notes += "%s to %s \n"%(detector.orientation.y, y_orientation)
+                    self._notes += "%s to %s \n" % (detector.orientation.y,
+                                                     y_orientation)
                     detector.orientation.y  = float(y_orientation)
             else:
-                self._notes += "Error: Expected a float for the orientation's y "
-                self._notes += "won't changes y orientation from "
-                self._notes += "%s to %s"%(detector.orientation.y, y_orientation)
+                self._notes += "Error: Expected a float for the orientation's "
+                self._notes += " y won't changes y orientation from "
+                self._notes += "%s to %s" % (detector.orientation.y,
+                                            y_orientation)
         #Change z coordinate
         z_orientation = self.z_orientation_tcl.GetValue().lstrip().rstrip()
@@ -607,10 +642,12 @@
                 if detector.orientation.z != float(z_orientation):
                     self._notes += "Change z of offset from "
-                    self._notes += "%s to %s \n"%(detector.orientation.z, z_orientation)
+                    self._notes += "%s to %s \n"%(detector.orientation.z,
+                                                   z_orientation)
                     detector.orientation.z  = float(z_orientation)
             else:
-                self._notes += "Error: Expected a float for the orientation 's x "
-                self._notes += "won't changes z orientation from "
-                self._notes += "%s to %s"%(detector.orientation.z, z_orientation)
+                self._notes += "Error: Expected a float for the orientation 's"
+                self._notes += " x won't changes z orientation from "
+                self._notes += "%s to %s" % (detector.orientation.z,
+                                              z_orientation)
         #change the orientation unit
         unit = self.orientation_unit_tcl.GetValue().lstrip().rstrip()
@@ -640,10 +677,12 @@
                 if detector.beam_center.x != float(x_beam_center):
                     self._notes += "Change x of offset from "
-                    self._notes += "%s to %s \n"%(detector.beam_center.x, x_beam_center)
+                    self._notes += "%s to %s \n" % (detector.beam_center.x,
+                                                     x_beam_center)
                     detector.beam_center.x  = float(x_beam_center)
             else:
-                self._notes += "Error: Expected a float for the beam center 's x "
-                self._notes += "won't changes x beam center from "
-                self._notes += "%s to %s"%(detector.beam_center.x, x_beam_center)
+                self._notes += "Error: Expected a float for the beam "
+                self._notes += "center 's x won't changes x beam center from "
+                self._notes += "%s to %s" % (detector.beam_center.x,
+                                            x_beam_center)
         #Change y coordinate
         y_beam_center = self.y_beam_center_tcl.GetValue().lstrip().rstrip()
@@ -655,10 +694,12 @@
                 if detector.beam_center.y != float(y_beam_center):
                     self._notes += "Change y of beam center from "
-                    self._notes += "%s to %s \n"%(detector.beam_center.y, y_beam_center)
+                    self._notes += "%s to %s \n" % (detector.beam_center.y,
+                                                     y_beam_center)
                     detector.beam_center.y  = float(y_beam_center)
             else:
-                self._notes += "Error: Expected a float for the beam center 's y "
-                self._notes += "won't changes y beam center from "
-                self._notes += "%s to %s"%(detector.beam_center.y, y_beam_center)
+                self._notes += "Error: Expected a float for the beam "
+                self._notes += "center 's y won't changes y beam center from "
+                self._notes += "%s to %s" % (detector.beam_center.y,
+                                              y_beam_center)
         #Change z coordinate
         z_beam_center = self.z_beam_center_tcl.GetValue().lstrip().rstrip()
@@ -670,10 +711,12 @@
                 if detector.beam_center.z != float(z_beam_center):
                     self._notes += "Change z of beam center from "
-                    self._notes += "%s to %s \n"%(detector.beam_center.z, z_beam_center)
+                    self._notes += "%s to %s \n" % (detector.beam_center.z,
+                                                     z_beam_center)
                     detector.beam_center.z  = float(z_beam_center)
             else:
                 self._notes += "Error: Expected a float for the offset 's x "
                 self._notes += "won't changes z beam center from "
-                self._notes += "%s to %s"%(detector.beam_center.z, z_beam_center)
+                self._notes += "%s to %s"%(detector.beam_center.z,
+                                            z_beam_center)
         #change the beam center unit
         unit = self.beam_center_unit_tcl.GetValue().lstrip().rstrip()
@@ -701,10 +744,12 @@
                 if detector.pixel_size.x != float(x_pixel_size) :
                     self._notes += "Change x of pixel size from "
-                    self._notes += "%s to %s \n"%(detector.pixel_size.x, x_pixel_size)
+                    self._notes += "%s to %s \n"%(detector.pixel_size.x,
+                                                   x_pixel_size)
                     detector.pixel_size.x  = float(x_pixel_size)
             else:
-                self._notes += "Error: Expected a float for the pixel size 's x "
-                self._notes += "won't changes x pixel size from "
-                self._notes += "%s to %s"%(detector.pixel_size.x, x_pixel_size)
+                self._notes += "Error: Expected a float for the pixel"
+                self._notes += " size 's x  won't changes x pixel size from "
+                self._notes += "%s to %s" % (detector.pixel_size.x, 
+                                             x_pixel_size)
         #Change y coordinate
         y_pixel_size = self.y_pixel_size_tcl.GetValue().lstrip().rstrip()
@@ -716,10 +761,12 @@
                 if detector.pixel_size.y != float(y_pixel_size):
                     self._notes += "Change y of pixel size from "
-                    self._notes += "%s to %s \n"%(detector.pixel_size.y, y_pixel_size)
+                    self._notes += "%s to %s \n"%(detector.pixel_size.y,
+                                                   y_pixel_size)
                     detector.pixel_size.y  = float(y_pixel_size)
             else:
-                self._notes += "Error: Expected a float for the pixel size's y "
-                self._notes += "won't changes y pixel size from "
-                self._notes += "%s to %s"%(detector.pixel_size.y, y_pixel_size)
+                self._notes += "Error: Expected a float for the pixel "
+                self._notes += "size's y  won't changes y pixel size from "
+                self._notes += "%s to %s" % (detector.pixel_size.y,
+                                              y_pixel_size)
         #Change z coordinate
         z_pixel_size = self.z_pixel_size_tcl.GetValue().lstrip().rstrip()
@@ -731,5 +778,6 @@
                 if detector.pixel_size.z != float(z_pixel_size):
                     self._notes += "Change z of pixel size from "
-                    self._notes += "%s to %s \n"%(detector.pixel_size.z, z_pixel_size)
+                    self._notes += "%s to %s \n"%(detector.pixel_size.z,
+                                                   z_pixel_size)
                     detector.pixel_size.z  = float(z_pixel_size)
             else:
@@ -763,9 +811,11 @@
                 if detector.slit_length != float(slit_length):
                     self._notes += " Change slit length from"
-                    self._notes += " %s to %s \n"%(detector.slit_length, slit_length)
+                    self._notes += " %s to %s \n"%(detector.slit_length,
+                                                    slit_length)
                     detector.slit_length = float(slit_length)
             else:
-                self._notes += "Error: Expected a float for the slit length won't changes "
-                self._notes += "%s to %s"%(detector.slit_length, slit_length)
+                self._notes += "Error: Expected a float"
+                self._notes += " for the slit length won't changes "
+                self._notes += "%s to %s" % (detector.slit_length, slit_length)
         #change the distance unit
         unit = self.slit_length_unit_tcl.GetValue().lstrip().rstrip()
@@ -804,6 +854,6 @@
 if __name__ == "__main__":
     app = wx.App()
-    detector = Detector()
-    dlg = DetectorDialog(detector=[detector])
+    test_detector = Detector()
+    dlg = DetectorDialog(detector=[test_detector])
     dlg.ShowModal()
     app.MainLoop()
Index: calculatorview/perspectives/calculator/help_panel.py
===================================================================
--- calculatorview/perspectives/calculator/help_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/perspectives/calculator/help_panel.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,73 +1,24 @@
 #!/usr/bin/python
+"""
+Help panel for calculator
+"""
+import os
 import wx
 import wx.html as html
 from wx.lib.splitter import MultiSplitterWindow
 import sans.perspectives.calculator as calculator
-import os
-def help():
-    """
-        Provide general online help text
-        Future work: extend this function to allow topic selection
-    """
-    info_txt  = "The inversion approach is based on Moore, J. Appl. Cryst. (1980) 13, 168-175.\n\n"
-    info_txt += "P(r) is set to be equal to an expansion of base functions of the type "
-    info_txt += "phi_n(r) = 2*r*sin(pi*n*r/D_max). The coefficient of each base functions "
-    info_txt += "in the expansion is found by performing a least square fit with the "
-    info_txt += "following fit function:\n\n"
-    info_txt += "chi**2 = sum_i[ I_meas(q_i) - I_th(q_i) ]**2/error**2 + Reg_term\n\n"
-    info_txt += "where I_meas(q) is the measured scattering intensity and I_th(q) is "
-    info_txt += "the prediction from the Fourier transform of the P(r) expansion. "
-    info_txt += "The Reg_term term is a regularization term set to the second derivative "
-    info_txt += "d**2P(r)/dr**2 integrated over r. It is used to produce a smooth P(r) output.\n\n"
-    info_txt += "The following are user inputs:\n\n"
-    info_txt += "   - Number of terms: the number of base functions in the P(r) expansion.\n\n"
-    info_txt += "   - Regularization constant: a multiplicative constant to set the size of "
-    info_txt += "the regularization term.\n\n"
-    info_txt += "   - Maximum distance: the maximum distance between any two points in the system.\n"
-     
-    return info_txt
-    
-class HelpDialog(wx.Dialog):
-    def __init__(self, parent, id):
-      
-        wx.Dialog.__init__(self, parent, id, size=(400, 420))
-        self.SetTitle("Calculator help") 
-        
-
-        vbox = wx.BoxSizer(wx.VERTICAL)
-
-        explanation = help()
-           
-        label_explain = wx.StaticText(self, -1, explanation, size=(350,320))
-            
-        vbox.Add(label_explain, 0, wx.ALL|wx.EXPAND, 15)
 
 
-        static_line = wx.StaticLine(self, -1)
-        vbox.Add(static_line, 0, wx.EXPAND, 0)
-        
-        button_OK = wx.Button(self, wx.ID_OK, "OK")
-
-        sizer_button = wx.BoxSizer(wx.HORIZONTAL)
-        sizer_button.Add((20, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(button_OK, 0, wx.LEFT|wx.RIGHT|wx.ADJUST_MINSIZE, 10)       
-        vbox.Add(sizer_button, 0, wx.EXPAND|wx.BOTTOM|wx.TOP, 10)
-
-        self.SetSizer(vbox)
-        self.SetAutoLayout(True)
-        
-        self.Layout()
-        self.Centre()
-
 class HelpWindow(wx.Frame):
-    def __init__(self, parent, id, title= 'HelpWindow', pageToOpen=None):
-        wx.Frame.__init__(self, parent, id, title, size=(700, 450))
+    """
+    """
+    def __init__(self, parent, title='HelpWindow', pageToOpen=None):
+        wx.Frame.__init__(self, parent, title, size=(700, 450))
         """
              contains help info
         """
-      
         splitter = MultiSplitterWindow(self, style=wx.SP_LIVE_UPDATE)
         rpanel = wx.Panel(splitter, -1)
-        lpanel = wx.Panel(splitter, -1,style=wx.BORDER_SUNKEN)
+        lpanel = wx.Panel(splitter, -1, style=wx.BORDER_SUNKEN)
         
         vbox = wx.BoxSizer(wx.VERTICAL)
@@ -84,5 +35,5 @@
         vbox.Add(header, 0, wx.EXPAND)
        
-        vboxl= wx.BoxSizer(wx.VERTICAL)
+        vboxl = wx.BoxSizer(wx.VERTICAL)
         headerl = wx.Panel(lpanel, -1, size=(-1, 20))
        
@@ -103,6 +54,5 @@
         self.path = calculator.get_data_path(media='media')
        
-       
-        page1="""<html>
+        page1 = """<html>
             <body>
              <p>Select topic on Menu</p>
@@ -110,10 +60,13 @@
             </html>"""
         self.rhelp.SetPage(page1)
-        page="""<html>
+        page = """<html>
             <body>
             <ul>
-            <li><a href ="sld_calculator_help.html" target ="showframe">SLD Calculator</a><br></li>
-            <li><a href ="slit_calculator_help.html" target ="showframe">Slit Size Calculator</a><br></li>
-            <li><a href ="kiessig_calculator_help.html" target ="showframe">Kiessig Thickness Calculator</a><br></li>
+            <li><a href ="sld_calculator_help.html" 
+            target ="showframe">SLD Calculator</a><br></li>
+            <li><a href ="slit_calculator_help.html" 
+            target ="showframe">Slit Size Calculator</a><br></li>
+            <li><a href ="kiessig_calculator_help.html" 
+            target ="showframe">Kiessig Thickness Calculator</a><br></li>
             </ul>
             </body>
@@ -121,7 +74,7 @@
 
         self.lhelp.SetPage(page)
-        self.lhelp.Bind(wx.html.EVT_HTML_LINK_CLICKED,self.OnLinkClicked )
+        self.lhelp.Bind(wx.html.EVT_HTML_LINK_CLICKED, self.OnLinkClicked)
         
-        vbox.Add(self.rhelp,1, wx.EXPAND)
+        vbox.Add(self.rhelp, 1, wx.EXPAND)
         vboxl.Add(self.lhelp, 1, wx.EXPAND)
         rpanel.SetSizer(vbox)
@@ -130,5 +83,5 @@
         
         vbox1 = wx.BoxSizer(wx.HORIZONTAL)
-        vbox1.Add(splitter,1,wx.EXPAND)
+        vbox1.Add(splitter, 1, wx.EXPAND)
         splitter.AppendWindow(lpanel, 200)
         splitter.AppendWindow(rpanel)
@@ -138,13 +91,12 @@
         self.Show(True)
         
-        
     def OnLinkClicked(self, event):
         """
             Function to diplay html page related to the hyperlinktext selected
         """
-       
-        link= event.GetLinkInfo().GetHref()
-        link = os.path.join(self.path,link)
+        link = event.GetLinkInfo().GetHref()
+        link = os.path.join(self.path, link)
         self.rhelp.LoadPage(link)
+        
         
 class ViewApp(wx.App):
@@ -153,8 +105,6 @@
         frame.Show(True)
         self.SetTopWindow(frame)
-        
         return True
         
-
 if __name__ == "__main__": 
     app = ViewApp(0)
Index: calculatorview/perspectives/calculator/kiessig_calculator_panel.py
===================================================================
--- calculatorview/perspectives/calculator/kiessig_calculator_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/perspectives/calculator/kiessig_calculator_panel.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -11,9 +11,10 @@
 import wx
 import sys
-import os
+#import os
 
-from sans.guicomm.events import StatusEvent  
+#from sans.guicomm.events import StatusEvent  
 from sans.calculator.kiessig_calculator import KiessigThicknessCalculator 
-from calculator_widgets import OutputTextCtrl, InputTextCtrl
+from calculator_widgets import OutputTextCtrl
+from calculator_widgets import InputTextCtrl
 
 _BOX_WIDTH = 77
@@ -39,6 +40,6 @@
     CENTER_PANE = True
     
-    def __init__(self, parent, id=-1, *args, **kwds):
-        wx.Panel.__init__(self, parent, id=id, *args, **kwds)
+    def __init__(self, parent, *args, **kwds):
+        wx.Panel.__init__(self, parent, *args, **kwds)
         #Font size 
         self.SetWindowVariant(variant=FONT_VARIANT)  
@@ -46,4 +47,6 @@
         self.parent = parent
         self.kiessig = KiessigThicknessCalculator()
+        #layout attribute
+        self.hint_sizer = None
         self._do_layout()
        
@@ -91,5 +94,6 @@
         """
         thick_unit = '['+self.kiessig.get_thickness_unit() +']'
-        thickness_size_txt = wx.StaticText(self, -1, 'Thickness (or Diameter): ')
+        thickness_size_txt = wx.StaticText(self, -1, 
+                                           'Thickness (or Diameter): ')
         self.thickness_size_tcl = OutputTextCtrl(self, -1, 
                                                  size=(_BOX_WIDTH,-1))
@@ -106,5 +110,6 @@
         Fill the sizer containing hint 
         """
-        hint_msg = "This tool is to approximately estimate the thickness of a layer"
+        hint_msg = "This tool is to approximately estimate "
+        hint_msg += "the thickness of a layer"
         hint_msg += " or the diameter of particles\n "
         hint_msg += "from the Kiessig fringe width in SANS/NR data."
@@ -148,4 +153,6 @@
         """
         self.parent.Close()
+        if event is not None:
+            event.Skip()
         
     def on_compute(self, event):
@@ -164,5 +171,5 @@
         self.thickness_size_tcl.SetValue(str(thickness))
         
-    def format_number(self,value=None):
+    def format_number(self, value=None):
         """
         Return a float in a standardized, human-readable formatted string 
@@ -174,10 +181,11 @@
             return output
 
-        output= "%-7.4g" % value
+        output = "%-7.4g" % value
         return output.lstrip().rstrip()   
      
 class KiessigWindow(wx.Frame):
-    def __init__(self, parent=None, id=1, title="Kiessig Thickness Calculator"):
-        wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT))
+    def __init__(self, parent=None, title="Kiessig Thickness Calculator"):
+        wx.Frame.__init__(self, parent, title,
+                           size=(PANEL_WIDTH,PANEL_HEIGHT))
         self.parent = parent
         self.panel = KiessigThicknessCalculatorPanel(parent=self)
Index: calculatorview/perspectives/calculator/sample_editor.py
===================================================================
--- calculatorview/perspectives/calculator/sample_editor.py	(revision ad6f597281ffdc10ba61293ef7a8566da1421213)
+++ calculatorview/perspectives/calculator/sample_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -6,5 +6,5 @@
 
 _BOX_WIDTH = 60
-if sys.platform.count("win32")>0:
+if sys.platform.count("win32") > 0:
     _STATICBOX_WIDTH = 450
     PANEL_WIDTH = 500
@@ -55,5 +55,6 @@
         ## Short name for sample [string]
         sample_name_txt = wx.StaticText(self, -1, 'Sample Name : ')  
-        self.sample_name_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH*5, 20), style=0) 
+        self.sample_name_tcl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH*5, 20), style=0) 
         self.name_sizer.AddMany([(sample_name_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                        (self.sample_name_tcl, 0, wx.EXPAND)])
@@ -74,5 +75,6 @@
         ## Thickness [float] [mm]
         thickness_txt = wx.StaticText(self, -1, 'Thickness:') 
-        self.thickness_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
+        self.thickness_tcl = wx.TextCtrl(self, -1,
+                                          size=(_BOX_WIDTH, 20),style=0)  
         thickness_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
         self.thickness_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),
@@ -80,5 +82,5 @@
         self.thickness_sizer.AddMany([(thickness_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.thickness_tcl, 0, wx.LEFT, 25),
-                                     (thickness_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                            (thickness_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.thickness_unit_tcl, 0, wx.EXPAND)]) 
     def _layout_transmission(self):
@@ -89,6 +91,8 @@
         transmission = None
         transmission_txt = wx.StaticText(self, -1, 'Transmission:') 
-        self.transmission_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)   
-        self.transmission_sizer.AddMany([(transmission_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.transmission_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20),style=0)   
+        self.transmission_sizer.AddMany([(transmission_txt,
+                                         0, wx.LEFT|wx.RIGHT, 10),
                                      (self.transmission_tcl, 0, wx.LEFT, 12)]) 
         
@@ -99,11 +103,13 @@
         ## Temperature [float] [C]
         temperature_txt = wx.StaticText(self, -1, 'Temperature:') 
-        self.temperature_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
+        self.temperature_tcl = wx.TextCtrl(self, -1, 
+                                           size=(_BOX_WIDTH, 20), style=0)   
         temperature_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
         self.temperature_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),
                                                             style=0)  
-        self.temperature_sizer.AddMany([(temperature_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.temperature_sizer.AddMany([(temperature_txt, 0,
+                                          wx.LEFT|wx.RIGHT, 10),
                                      (self.temperature_tcl, 0, wx.LEFT, 10),
-                                     (temperature_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                                (temperature_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.temperature_unit_tcl, 0, wx.EXPAND)])  
     
@@ -115,11 +121,15 @@
         position_txt = wx.StaticText(self, -1, 'Position:') 
         x_position_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_position_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.x_position_tcl = wx.TextCtrl(self, -1,
+                                           size=(_BOX_WIDTH,20), style=0) 
         y_position_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_position_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.y_position_tcl = wx.TextCtrl(self, -1,
+                                           size=(_BOX_WIDTH,20), style=0) 
         z_position_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_position_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.z_position_tcl = wx.TextCtrl(self, -1,
+                                           size=(_BOX_WIDTH,20), style=0)  
         position_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.position_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.position_unit_tcl = wx.TextCtrl(self, -1, 
+                                             size=(_BOX_WIDTH,20), style=0)  
         self.position_sizer.AddMany([(position_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (x_position_txt, 0, wx.LEFT, 14),
@@ -138,12 +148,17 @@
         orientation_txt = wx.StaticText(self, -1, 'Orientation:') 
         x_orientation_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.x_orientation_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH,20), style=0) 
         y_orientation_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.y_orientation_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH,20), style=0) 
         z_orientation_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_orientation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.z_orientation_tcl = wx.TextCtrl(self, -1,
+                                              size=(_BOX_WIDTH,20), style=0)  
         orientation_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.orientation_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
-        self.orientation_sizer.AddMany([(orientation_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.orientation_unit_tcl = wx.TextCtrl(self, -1,
+                                                 size=(_BOX_WIDTH,20), style=0)  
+        self.orientation_sizer.AddMany([(orientation_txt, 0,
+                                          wx.LEFT|wx.RIGHT, 10),
                                      (x_orientation_txt, 0, wx.LEFT, 0),
                                      (self.x_orientation_tcl, 0, wx.RIGHT, 10),
@@ -153,5 +168,5 @@
                                      (self.z_orientation_tcl, 0, wx.RIGHT, 10),
                                      (orientation_unit_txt, 0, wx.EXPAND),
-                                     (self.orientation_unit_tcl, 0, wx.RIGHT, 10)])
+                            (self.orientation_unit_tcl, 0, wx.RIGHT, 10)])
         
     def _layout_details(self):
@@ -275,5 +290,6 @@
         self.position_unit_tcl.SetValue(str(sample.position_unit))
         #orientation
-        x, y, z = sample.orientation.x, sample.orientation.y , sample.orientation.z
+        x, y = sample.orientation.x, sample.orientation.y 
+        z = sample.orientation.z
         self.x_orientation_tcl.SetValue(str(x))  
         self.y_orientation_tcl.SetValue(str(y)) 
@@ -347,5 +363,6 @@
         if self._sample.transmission != transmission:
             self._notes += " Change transmission from"
-            self._notes += " %s to %s \n"%(self._sample.transmission, transmission)
+            self._notes += " %s to %s \n" % (self._sample.transmission,
+                                              transmission)
             self._sample.transmission = transmission
             
@@ -378,5 +395,6 @@
                 if self._sample.position.x != float(x_position) :
                     self._notes += "Change x of position from "
-                    self._notes += "%s to %s \n"%(self._sample.position.x, x_position)
+                    self._notes += "%s to %s \n" % (self._sample.position.x,
+                                                     x_position)
                     self._sample.position.x  = float(x_position)
             else:
@@ -393,5 +411,6 @@
                 if self._sample.position.y != float(y_position):
                     self._notes += "Change y of position from "
-                    self._notes += "%s to %s \n"%(self._sample.position.y, y_position)
+                    self._notes += "%s to %s \n" % (self._sample.position.y, 
+                                                    y_position)
                     self._sample.position.y  = float(y_position)
             else:
@@ -408,5 +427,6 @@
                 if self._sample.position.z != float(z_position):
                     self._notes += "Change z of position from "
-                    self._notes += "%s to %s \n"%(self._sample.position.z, z_position)
+                    self._notes += "%s to %s \n" % (self._sample.position.z,
+                                                    z_position)
                     self._sample.position.z  = float(z_position)
             else:
@@ -438,5 +458,6 @@
                 self._notes += "Error: Expected a float for orientation 's x "
                 self._notes += "won't changes x orientation from "
-                self._notes += "%s to %s"%(self._sample.orientation.x, x_orientation)
+                self._notes += "%s to %s" % (self._sample.orientation.x,
+                                              x_orientation)
         #Change y coordinate
         y_orientation = self.y_orientation_tcl.GetValue().lstrip().rstrip()
@@ -448,10 +469,12 @@
                 if self._sample.orientation.y != float(y_orientation):
                     self._notes += "Change y of orientation from "
-                    self._notes += "%s to %s \n"%(self._sample.orientation.y, y_orientation)
+                    self._notes += "%s to %s \n" % (self._sample.orientation.y,
+                                                     y_orientation)
                     self._sample.orientation.y  = float(y_orientation)
             else:
                 self._notes += "Error: Expected a float for orientation's y "
                 self._notes += "won't changes y orientation from "
-                self._notes += "%s to %s"%(self._sample.orientation.y, y_orientation)
+                self._notes += "%s to %s" % (self._sample.orientation.y,
+                                            y_orientation)
         #Change z coordinate
         z_orientation = self.z_orientation_tcl.GetValue().lstrip().rstrip()
@@ -463,10 +486,12 @@
                 if self._sample.orientation.z != float(z_orientation):
                     self._notes += "Change z of orientation from "
-                    self._notes += "%s to %s \n"%(self._sample.orientation.z, z_orientation)
-                    self._sample.orientation.z  = float(z_orientation)
+                    self._notes += "%s to %s \n" % (self._sample.orientation.z,
+                                                     z_orientation)
+                    self._sample.orientation.z = float(z_orientation)
             else:
                 self._notes += "Error: Expected a float for orientation 's x "
                 self._notes += "won't changes z orientation from "
-                self._notes += "%s to %s"%(self._sample.orientation.z, z_orientation)
+                self._notes += "%s to %s" % (self._sample.orientation.z,
+                                              z_orientation)
         #change the beam center unit
         unit = self.orientation_unit_tcl.GetValue().lstrip().rstrip()
@@ -505,5 +530,7 @@
         if self.manager is not None:
             self.manager.set_sample(self._sample)
-       
+        if event is not None:
+            event.Skip()
+            
     def on_click_cancel(self, event):
         """
@@ -514,8 +541,9 @@
         if self.manager is not None:
              self.manager.set_sample(self._sample, self._notes)
+        if event is not None:
+            event.Skip()
 
-if __name__ =="__main__":
-    
-    app  = wx.App()
+if __name__ == "__main__":
+    app = wx.App()
     from DataLoader.data_info import Sample
     sample = Sample()
Index: calculatorview/perspectives/calculator/sld_panel.py
===================================================================
--- calculatorview/perspectives/calculator/sld_panel.py	(revision 855546d1f69a4813e75d4b3c8063c51b24aa63b1)
+++ calculatorview/perspectives/calculator/sld_panel.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,5 +1,5 @@
 """
-    This module provide GUI for the neutron scattering length density calculator
-    @author: Gervaise B. Alina
+This module provide GUI for the neutron scattering length density calculator
+
 """
 
@@ -8,13 +8,15 @@
 import sys
 
-from sans.guiframe.utils import format_number, check_float
+from sans.guiframe.utils import format_number
+from sans.guiframe.utils import check_float
 from sans.guicomm.events import StatusEvent  
 
 # the calculator default value for wavelength is 6
-import periodictable
+#import periodictable
 from periodictable import formula
-from periodictable.xsf import xray_energy, xray_sld_from_atoms
-from periodictable.constants import avogadro_number
-from  periodictable.nsf import neutron_scattering
+from periodictable.xsf import xray_energy
+from periodictable.xsf import xray_sld_from_atoms
+#rom periodictable.constants import avogadro_number
+from periodictable.nsf import neutron_scattering
        
 WAVELENGTH = 6.0
@@ -24,5 +26,5 @@
 
 #SLD panel size 
-if sys.platform.count("win32")>0:
+if sys.platform.count("win32") > 0:
     _STATICBOX_WIDTH = 350
     PANEL_SIZE = 400
@@ -35,5 +37,5 @@
 class SldPanel(wx.Panel):
     """
-        Provides the SLD calculator GUI.
+    Provides the SLD calculator GUI.
     """
     ## Internal nickname for the window, used by the AUI manager
@@ -43,6 +45,9 @@
     ## Flag to tell the AUI manager to put this panel in the center pane
     CENTER_PANE = True
-    def __init__(self, parent, base=None, id=-1):
-        wx.Panel.__init__(self, parent, id = id)
+    
+    def __init__(self, parent, base=None):
+        """
+        """
+        wx.Panel.__init__(self, parent)
         #Font size 
         self.SetWindowVariant(variant=FONT_VARIANT)
@@ -50,4 +55,17 @@
         self.base = base
         self.wavelength = WAVELENGTH
+        #layout attribute
+        self.compound_ctl = None
+        self.density_ctl = None
+        self.wavelength_ctl = None
+        self.neutron_sld_reel_ctl = None
+        self.neutron_sld_im_ctl = None
+        self.mo_ka_sld_reel_ctl = None
+        self.mo_ka_sld_im_ctl = None
+        self.cu_ka_sld_reel_ctl = None
+        self.cu_ka_sld_im_ctl = None
+        self.neutron_abs_ctl = None
+        self.neutron_inc_ctl = None
+        self.neutron_length_ctl = None
         #Draw the panel
         self._do_layout()
@@ -57,13 +75,13 @@
     def _do_layout(self):
         """
-            Draw window content
+        Draw window content
         """
         unit_a = '[A]'
         unit_density = '[g/cm^(3)]'
         unit_sld = '[1/A^(2)]'
-        unit_cm1 ='[1/cm]'
-        unit_cm ='[cm]'
-        sizer_input = wx.GridBagSizer(5,5)
-        sizer_output = wx.GridBagSizer(5,5)
+        unit_cm1 = '[1/cm]'
+        unit_cm = '[cm]'
+        sizer_input = wx.GridBagSizer(5, 5)
+        sizer_output = wx.GridBagSizer(5, 5)
         sizer_button = wx.BoxSizer(wx.HORIZONTAL)
         sizer1 = wx.BoxSizer(wx.HORIZONTAL)
@@ -73,55 +91,57 @@
         inputbox = wx.StaticBox(self, -1, "Input")
         boxsizer1 = wx.StaticBoxSizer(inputbox, wx.VERTICAL)
-        boxsizer1.SetMinSize((_STATICBOX_WIDTH,-1))
+        boxsizer1.SetMinSize((_STATICBOX_WIDTH, -1))
         
         compound_txt = wx.StaticText(self, -1, 'Compound ')
-        self.compound_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.compound_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
         density_txt = wx.StaticText(self, -1, 'Density ')
-        self.density_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.density_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
         unit_density_txt = wx.StaticText(self, -1, unit_density)
         wavelength_txt = wx.StaticText(self, -1, 'Wavelength ')
-        self.wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.wavelength_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, -1))
         self.wavelength_ctl.SetValue(str(self.wavelength))
         unit_a_txt = wx.StaticText(self, -1, unit_a)
         iy = 0
         ix = 0
-        sizer_input.Add(compound_txt,(iy, ix),(1,1),\
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        sizer_input.Add(compound_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.compound_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_input.Add(density_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.density_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
         ix +=1
-        sizer_input.Add(self.compound_ctl,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_input.Add(density_txt,(iy, ix),(1,1),\
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_input.Add(self.density_ctl, (iy, ix), (1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=1
-        sizer_input.Add(unit_density_txt,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_input.Add(wavelength_txt, (iy, ix),(1,1),\
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_input.Add(self.wavelength_ctl,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix += 1
-        sizer_input.Add(unit_a_txt,(iy, ix),(1,1),\
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        boxsizer1.Add( sizer_input )
-        sizer1.Add(boxsizer1,0, wx.EXPAND | wx.ALL, 10)
+        sizer_input.Add(unit_density_txt,(iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_input.Add(wavelength_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_input.Add(self.wavelength_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_input.Add(unit_a_txt, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        boxsizer1.Add(sizer_input)
+        sizer1.Add(boxsizer1, 0, wx.EXPAND | wx.ALL, 10)
         #---------Outputs sizer--------
         outputbox = wx.StaticBox(self, -1, "Output")
         boxsizer2 = wx.StaticBoxSizer(outputbox, wx.VERTICAL)
-        boxsizer2.SetMinSize((_STATICBOX_WIDTH,-1))
+        boxsizer2.SetMinSize((_STATICBOX_WIDTH, -1))
         
         i_complex = '- i'
         neutron_sld_txt = wx.StaticText(self, -1, 'Neutron SLD')
-        self.neutron_sld_reel_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.neutron_sld_reel_ctl = wx.TextCtrl(self, -1,
+                                                 size=(_BOX_WIDTH, -1))
         self.neutron_sld_reel_ctl.SetEditable(False)
         self.neutron_sld_reel_ctl.SetToolTipString("Neutron SLD real.")
-        self.neutron_sld_im_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.neutron_sld_im_ctl = wx.TextCtrl(self, -1, 
+                                              size=(_BOX_WIDTH, -1))
         self.neutron_sld_im_ctl.SetEditable(False)
         self.neutron_sld_im_ctl.SetToolTipString("Neutron SLD imaginary.")
@@ -129,8 +149,10 @@
         
         cu_ka_sld_txt = wx.StaticText(self, -1, 'Cu Ka SLD')
-        self.cu_ka_sld_reel_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.cu_ka_sld_reel_ctl = wx.TextCtrl(self, -1,
+                                               size=(_BOX_WIDTH, -1))
         self.cu_ka_sld_reel_ctl.SetEditable(False)
         self.cu_ka_sld_reel_ctl.SetToolTipString("Cu Ka SLD real.")
-        self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.cu_ka_sld_im_ctl = wx.TextCtrl(self, -1, 
+                                            size=(_BOX_WIDTH, -1))
         self.cu_ka_sld_im_ctl.SetEditable(False)
         self.cu_ka_sld_im_ctl.SetToolTipString("Cu Ka SLD imaginary.")
@@ -138,8 +160,10 @@
         
         mo_ka_sld_txt = wx.StaticText(self, -1, 'Mo Ka SLD')
-        self.mo_ka_sld_reel_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.mo_ka_sld_reel_ctl = wx.TextCtrl(self, -1,
+                                               size=(_BOX_WIDTH, -1))
         self.mo_ka_sld_reel_ctl.SetEditable(False)
         self.mo_ka_sld_reel_ctl.SetToolTipString("Mo Ka SLD real.")
-        self.mo_ka_sld_im_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.mo_ka_sld_im_ctl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, -1))
         self.mo_ka_sld_im_ctl.SetEditable(False)
         self.mo_ka_sld_im_ctl.SetToolTipString("Mo Ka SLD imaginary.")
@@ -147,5 +171,6 @@
         
         neutron_inc_txt = wx.StaticText(self, -1, 'Neutron Inc. Xs')
-        self.neutron_inc_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.neutron_inc_ctl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH, -1))
         self.neutron_inc_ctl.SetEditable(False)
         self.neutron_inc_ctl.SetToolTipString("Neutron Inc. Xs")
@@ -153,5 +178,6 @@
        
         neutron_abs_txt = wx.StaticText(self, -1, 'Neutron Abs. Xs')     
-        self.neutron_abs_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.neutron_abs_ctl = wx.TextCtrl(self, -1, 
+                                           size=(_BOX_WIDTH, -1))
         self.neutron_abs_ctl.SetEditable(False)
         self.neutron_abs_ctl.SetToolTipString("Neutron Abs. Xs")
@@ -159,5 +185,6 @@
       
         neutron_length_txt = wx.StaticText(self, -1, 'Neutron 1/e length')
-        self.neutron_length_ctl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.neutron_length_ctl = wx.TextCtrl(self, -1,
+                                               size=(_BOX_WIDTH, -1))
         self.neutron_length_ctl.SetEditable(False)
         self.neutron_length_ctl.SetToolTipString("Neutron 1/e length")
@@ -166,82 +193,82 @@
         iy = 0
         ix = 0
-        sizer_output.Add(neutron_sld_txt,(iy, ix),(1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.neutron_sld_reel_ctl,(iy, ix),(1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix += 1
-        sizer_output.Add(wx.StaticText(self, -1, i_complex)
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=1
-        sizer_output.Add(self.neutron_sld_im_ctl
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=1
-        sizer_output.Add(neutron_sld_units_txt
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_output.Add(cu_ka_sld_txt,(iy, ix),(1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix +=1
-        sizer_output.Add(self.cu_ka_sld_reel_ctl,(iy, ix),(1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=1
-        sizer_output.Add(wx.StaticText(self, -1, i_complex)
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(self.cu_ka_sld_im_ctl
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
-        ix += 1
-        sizer_output.Add(cu_ka_sld_units_txt
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_output.Add(mo_ka_sld_txt,(iy, ix),(1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix +=1
-        sizer_output.Add(self.mo_ka_sld_reel_ctl,(iy, ix),(1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=1
-        sizer_output.Add(wx.StaticText(self, -1, i_complex)
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        ix += 1
-        sizer_output.Add(self.mo_ka_sld_im_ctl
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
-        ix +=1
-        sizer_output.Add(mo_ka_sld_units_txt
-                         ,(iy, ix),(1,1),wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        iy += 1
-        ix = 0
-        sizer_output.Add(neutron_inc_txt,(iy, ix),(1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.neutron_inc_ctl,(iy, ix),(1,1),
+        sizer_output.Add(neutron_sld_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.neutron_sld_reel_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_output.Add(wx.StaticText(self, -1, i_complex),
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_output.Add(self.neutron_sld_im_ctl,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_output.Add(neutron_sld_units_txt,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_output.Add(cu_ka_sld_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.cu_ka_sld_reel_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_output.Add(wx.StaticText(self, -1, i_complex),
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_output.Add(self.cu_ka_sld_im_ctl,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
+        ix += 1
+        sizer_output.Add(cu_ka_sld_units_txt,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_output.Add(mo_ka_sld_txt,(iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.mo_ka_sld_reel_ctl,(iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 1
+        sizer_output.Add(wx.StaticText(self, -1, i_complex),
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix += 1
+        sizer_output.Add(self.mo_ka_sld_im_ctl,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
+        ix += 1
+        sizer_output.Add(mo_ka_sld_units_txt,
+                         (iy, ix), (1, 1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        iy += 1
+        ix = 0
+        sizer_output.Add(neutron_inc_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.neutron_inc_ctl, (iy, ix), (1, 1),
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
         ix += 2
-        sizer_output.Add(neutron_inc_units_txt,(iy, ix),(1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_output.Add(neutron_abs_txt, (iy, ix), (1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix += 1
-        sizer_output.Add(self.neutron_abs_ctl, (iy, ix), (1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        ix +=2
-        sizer_output.Add(neutron_abs_units_txt, (iy, ix), (1,1),
-                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
-        iy += 1
-        ix = 0
-        sizer_output.Add(neutron_length_txt, (iy, ix), (1,1),
-                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-        ix +=1
-        sizer_output.Add(self.neutron_length_ctl, (iy, ix), (1,1),
+        sizer_output.Add(neutron_inc_units_txt,(iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_output.Add(neutron_abs_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.neutron_abs_ctl, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        ix += 2
+        sizer_output.Add(neutron_abs_units_txt, (iy, ix), (1, 1),
+                            wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
+        iy += 1
+        ix = 0
+        sizer_output.Add(neutron_length_txt, (iy, ix), (1, 1),
+                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
+        ix += 1
+        sizer_output.Add(self.neutron_length_ctl, (iy, ix), (1, 1),
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0)
         ix += 2
-        sizer_output.Add(neutron_length_units_txt, (iy, ix), (1,1),
+        sizer_output.Add(neutron_length_units_txt, (iy, ix), (1, 1),
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
-        boxsizer2.Add( sizer_output )
-        sizer2.Add(boxsizer2,0, wx.EXPAND|wx.ALL, 10)
+        boxsizer2.Add(sizer_output)
+        sizer2.Add(boxsizer2, 0, wx.EXPAND|wx.ALL, 10)
         #-----Button  sizer------------
     
@@ -249,8 +276,8 @@
         button_calculate = wx.Button(self, id, "Calculate")
         button_calculate.SetToolTipString("Calculate SLD.")
-        self.Bind(wx.EVT_BUTTON, self.calculateSld, id = id)   
+        self.Bind(wx.EVT_BUTTON, self.calculateSld, id=id)   
         
         sizer_button.Add((250, 20), 1, wx.EXPAND|wx.ADJUST_MINSIZE, 0)
-        sizer_button.Add(button_calculate, 0, wx.RIGHT|wx.ADJUST_MINSIZE,20)
+        sizer_button.Add(button_calculate, 0, wx.RIGHT|wx.ADJUST_MINSIZE, 20)
         sizer3.Add(sizer_button)
         #---------layout----------------
@@ -297,5 +324,5 @@
             else:
                 flag = False
-                raise ValueError,"Error for wavelength value :expect float"
+                raise ValueError, "Error for wavelength value :expect float"
                 
         self.compound = self.compound_ctl.GetValue().lstrip().rstrip()
@@ -335,8 +362,9 @@
                 #get ready to compute
                 try:
-                    self.sld_formula = formula(self.compound, density=self.density)
+                    self.sld_formula = formula(self.compound,
+                                                density=self.density)
                 except:
                     if self.base is not None:
-                        msg = "SLD Calculator: %s" %(sys.exc_value)
+                        msg = "SLD Calculator: %s"  % (sys.exc_value)
                         wx.PostEvent(self.base, StatusEvent(status=msg))
                     else:
@@ -345,5 +373,5 @@
                 
                 
-                (sld_real, sld_im, sld_inc), (coh,absorp,incoh), \
+                (sld_real, sld_im, _), (_, absorp, incoh), \
                             length = neutron_scattering(self.compound,
                                        self.density, self.wavelength) 
@@ -355,12 +383,16 @@
                                          molecule_formula=self.sld_formula)
                 # set neutron sld values
-                self.neutron_sld_reel_ctl.SetValue(format_number(sld_real * _SCALE))
-                self.neutron_sld_im_ctl.SetValue(format_number(math.fabs(sld_im) * _SCALE))
+                val = format_number(sld_real * _SCALE)
+                self.neutron_sld_reel_ctl.SetValue(val)
+                val = format_number(math.fabs(sld_im) * _SCALE)
+                self.neutron_sld_im_ctl.SetValue(val)
                 # Compute the Cu SLD
                 self.cu_ka_sld_reel_ctl.SetValue(format_number(cu_real *_SCALE))
-                self.cu_ka_sld_im_ctl.SetValue(format_number(math.fabs(cu_im )* _SCALE))
+                val = format_number(math.fabs(cu_im )* _SCALE)
+                self.cu_ka_sld_im_ctl.SetValue(val)
                 # Compute the Mo SLD
                 self.mo_ka_sld_reel_ctl.SetValue(format_number(mo_real *_SCALE))
-                self.mo_ka_sld_im_ctl.SetValue(format_number(math.fabs(mo_im)* _SCALE))
+                val = format_number(math.fabs(mo_im)* _SCALE)
+                self.mo_ka_sld_im_ctl.SetValue(val)
                 # set incoherence and absorption
                 self.neutron_inc_ctl.SetValue(format_number(incoh))
@@ -372,15 +404,22 @@
         except:
             if self.base is not None:
-                  msg = "SLD Calculator: %s"%(sys.exc_value)
-                  wx.PostEvent(self.base, StatusEvent(status=msg))
+                msg = "SLD Calculator: %s"%(sys.exc_value)
+                wx.PostEvent(self.base, StatusEvent(status=msg))
             else:
                 raise
             return   
-
+        if event is not None:
+            event.Skip()
    
 class SldWindow(wx.Frame):
-    def __init__(self, parent=None, id=1, title="SLD Calculator",base=None):
-        wx.Frame.__init__(self, parent, id, title, size=( PANEL_SIZE,  PANEL_SIZE))
-        
+    """
+    """
+    def __init__(self, parent=None, title="SLD Calculator", base=None):
+        """
+        """
+        wx.Frame.__init__(self, parent, title,
+                           size=(PANEL_SIZE, PANEL_SIZE))
+        """
+        """
         self.panel = SldPanel(self, base=base)
         self.Centre()
@@ -388,9 +427,12 @@
         
 class ViewApp(wx.App):
+    """
+    """
     def OnInit(self):
+        """
+        """
         frame = SldWindow(None, -1, 'SLD Calculator')    
         frame.Show(True)
         self.SetTopWindow(frame)
-        
         return True
         
Index: calculatorview/perspectives/calculator/slit_length_calculator_panel.py
===================================================================
--- calculatorview/perspectives/calculator/slit_length_calculator_panel.py	(revision 74b1770c459412a087638d5bfaae3d22dc9df204)
+++ calculatorview/perspectives/calculator/slit_length_calculator_panel.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -13,8 +13,9 @@
 import os
 
-from DataLoader.readers.ascii_reader import Reader
+#from DataLoader.readers.ascii_reader import Reader
 from sans.guicomm.events import StatusEvent  
 from sans.calculator.slit_length_calculator import SlitlengthCalculator  
-from calculator_widgets import OutputTextCtrl, InterActiveOutputTextCtrl
+from calculator_widgets import OutputTextCtrl
+from calculator_widgets import InterActiveOutputTextCtrl
 
 _BOX_WIDTH = 76
@@ -40,6 +41,6 @@
     CENTER_PANE = True
     
-    def __init__(self, parent, id=-1, *args, **kwds):
-        wx.Panel.__init__(self, parent, id=id, *args, **kwds)
+    def __init__(self, parent, *args, **kwds):
+        wx.Panel.__init__(self, parent, *args, **kwds)
         #Font size 
         self.SetWindowVariant(variant=FONT_VARIANT)
@@ -70,5 +71,6 @@
         """
         data_name_txt = wx.StaticText(self, -1, 'Data: ')
-        self.data_name_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH*4,-1))
+        self.data_name_tcl = OutputTextCtrl(self, -1, 
+                                            size=(_BOX_WIDTH*4, -1))
         data_hint = "Loaded data"
         self.data_name_tcl.SetToolTipString(data_hint)
@@ -87,9 +89,11 @@
         """
         slit_size_txt = wx.StaticText(self, -1, 'Slit Size (FWHM/2): ')
-        self.slit_size_tcl = InterActiveOutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1))
+        self.slit_size_tcl = InterActiveOutputTextCtrl(self, -1,
+                                                       size=(_BOX_WIDTH, -1))
         slit_size_hint = " Estimated full slit size"
         self.slit_size_tcl.SetToolTipString(slit_size_hint)
         slit_size_unit_txt = wx.StaticText(self, -1, 'Unit: ')
-        self.slit_size_unit_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH,-1)) 
+        self.slit_size_unit_tcl = OutputTextCtrl(self, -1, 
+                                                 size=(_BOX_WIDTH, -1)) 
         slit_size_unit_hint = "Full slit size's unit"
         self.slit_size_unit_tcl.SetToolTipString(slit_size_unit_hint)
@@ -97,5 +101,5 @@
                                       (self.slit_size_tcl, 0, wx.LEFT, 10),
                                       (slit_size_unit_txt, 0, wx.LEFT, 10),
-                                      (self.slit_size_unit_tcl, 0, wx.LEFT, 10)])
+                                    (self.slit_size_unit_tcl, 0, wx.LEFT, 10)])
     
     def _layout_hint(self):
@@ -145,5 +149,6 @@
         wildcard = "SAXSess Data 1D (*.DAT, *.dat)|*.DAT" 
         
-        dlg = wx.FileDialog(self, "Choose a file", location,"", wildcard, wx.OPEN)
+        dlg = wx.FileDialog(self, "Choose a file", location,
+                            "", wildcard, wx.OPEN)
         if dlg.ShowModal() == wx.ID_OK:
             path = dlg.GetPath()
@@ -177,5 +182,6 @@
                 self.reader.stop()
             if self.parent.parent is not None:
-                wx.PostEvent(self.parent.parent, StatusEvent(status="Loading...",
+                wx.PostEvent(self.parent.parent, 
+                                StatusEvent(status="Loading...",
                                 type="progress"))
             self.reader = DataReader(path=path,
@@ -186,6 +192,7 @@
             if self.parent.parent is None:
                 return 
-            msg = "Slit Length Calculator: %s"%(sys.exc_value)
-            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop'))
+            msg = "Slit Length Calculator: %s" % (sys.exc_value)
+            wx.PostEvent(self.parent.parent,
+                          StatusEvent(status=msg, type='stop'))
             return 
             
@@ -198,5 +205,6 @@
                 return 
             msg = "Slit Length cannot be computed for 2D Data"
-            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop'))
+            wx.PostEvent(self.parent.parent, 
+                         StatusEvent(status=msg, type='stop'))
             return 
         self.data_name_tcl.SetValue(str(data.filename))
@@ -206,6 +214,6 @@
             y = data.y
             if x == [] or  x is None or y == [] or y is None:
-                 msg = "The current data is empty please check x and y"
-                 raise ValueError, msg
+                msg = "The current data is empty please check x and y"
+                raise ValueError, msg
             slit_length_calculator = SlitlengthCalculator()
             slit_length_calculator.set_data(x=x, y=y)
@@ -214,6 +222,7 @@
             if self.parent.parent is None:
                 return 
-            msg = "Slit Size Calculator: %s"%(sys.exc_value)
-            wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop'))
+            msg = "Slit Size Calculator: %s" % (sys.exc_value)
+            wx.PostEvent(self.parent.parent,
+                          StatusEvent(status=msg, type='stop'))
             return 
         self.slit_size_tcl.SetValue(str(slit_length))
@@ -225,7 +234,13 @@
         wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop'))
     
+    
 class SlitLengthCalculatorWindow(wx.Frame):
-    def __init__(self, parent=None, id=1, title="Slit Size Calculator"):
-        wx.Frame.__init__(self, parent, id, title, size=(PANEL_WIDTH,PANEL_HEIGHT))
+    """
+    """
+    def __init__(self, parent=None, title="Slit Size Calculator"):
+        """
+        """
+        wx.Frame.__init__(self, parent, title,
+                           size=(PANEL_WIDTH,PANEL_HEIGHT))
         self.parent = parent
         self.panel = SlitLengthCalculatorPanel(parent=self)
Index: calculatorview/perspectives/calculator/source_editor.py
===================================================================
--- calculatorview/perspectives/calculator/source_editor.py	(revision ad6f597281ffdc10ba61293ef7a8566da1421213)
+++ calculatorview/perspectives/calculator/source_editor.py	(revision b0ab6cb339551bb39f126bcd9d13b2a9dd73ddbe)
@@ -1,10 +1,11 @@
-
+"""
+"""
 import wx
 import sys
 from copy import deepcopy
 from sans.guiframe.utils import check_float
+
 _BOX_WIDTH = 60
-
-if sys.platform.count("win32")>0:
+if sys.platform.count("win32") > 0:
     _STATICBOX_WIDTH = 450
     PANEL_WIDTH = 500
@@ -37,5 +38,5 @@
         """
         self.main_sizer = wx.BoxSizer(wx.VERTICAL)
-        self.box_source = wx.StaticBox(self, -1,str("source"))
+        self.box_source = wx.StaticBox(self, -1, str("source"))
         self.boxsizer_source = wx.StaticBoxSizer(self.box_source,
                                                     wx.VERTICAL)
@@ -57,5 +58,6 @@
         # Sample name [string]
         sample_name_txt = wx.StaticText(self, -1, 'Sample Name : ')  
-        self.sample_name_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH*5, 20), style=0) 
+        self.sample_name_tcl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH*5, 20), style=0) 
         self.name_sizer.AddMany([(sample_name_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                        (self.sample_name_tcl, 0, wx.EXPAND)])
@@ -66,5 +68,6 @@
         #Radiation type [string]
         radiation_txt = wx.StaticText(self, -1, 'Radiation: ')  
-        self.radiation_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)
+        self.radiation_tcl = wx.TextCtrl(self, -1, 
+                                         size=(_BOX_WIDTH, 20), style=0)
         self.radiation_sizer.AddMany([(radiation_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.radiation_tcl, 0, wx.LEFT, 20)])
@@ -76,6 +79,8 @@
         #Beam shape [string]
         beam_shape_txt = wx.StaticText(self, -1, 'Beam shape:') 
-        self.beam_shape_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)  
-        self.beam_shape_sizer.AddMany([(beam_shape_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.beam_shape_tcl = wx.TextCtrl(self, -1,
+                                           size=(_BOX_WIDTH, 20), style=0)  
+        self.beam_shape_sizer.AddMany([(beam_shape_txt, 0,
+                                         wx.LEFT|wx.RIGHT, 10),
                                      (self.beam_shape_tcl, 0, wx.LEFT, 10)])
         
@@ -86,10 +91,13 @@
         #Wavelength [float] [Angstrom]
         wavelength_txt = wx.StaticText(self, -1, 'wavelength:') 
-        self.wavelength_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
+        self.wavelength_tcl = wx.TextCtrl(self, -1,
+                                           size=(_BOX_WIDTH, 20), style=0)   
         wavelength_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.wavelength_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
-        self.wavelength_sizer.AddMany([(wavelength_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.wavelength_unit_tcl = wx.TextCtrl(self, -1,
+                                                size=(_BOX_WIDTH, 20),style=0)  
+        self.wavelength_sizer.AddMany([(wavelength_txt,
+                                         0, wx.LEFT|wx.RIGHT, 10),
                                      (self.wavelength_tcl, 0, wx.LEFT, 12),
-                                     (wavelength_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                            (wavelength_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (self.wavelength_unit_tcl, 0, wx.EXPAND)]) 
         
@@ -100,11 +108,14 @@
         #Minimum wavelength [float] [Angstrom]
         wavelength_min_txt = wx.StaticText(self, -1, 'Wavelength min:') 
-        self.wavelength_min_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
+        self.wavelength_min_tcl = wx.TextCtrl(self, -1,
+                                               size=(_BOX_WIDTH, 20), style=0)   
         wavelength_min_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.wavelength_min_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
-        self.wavelength_min_sizer.AddMany([(wavelength_min_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.wavelength_min_unit_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)  
+        self.wavelength_min_sizer.AddMany([(wavelength_min_txt, 
+                                            0, wx.LEFT|wx.RIGHT, 10),
                                      (self.wavelength_min_tcl, 0, wx.LEFT, 10),
-                                     (wavelength_min_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
-                                     (self.wavelength_min_unit_tcl, 0, wx.EXPAND)])  
+                            (wavelength_min_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                            (self.wavelength_min_unit_tcl, 0, wx.EXPAND)])  
     
     def _layout_wavelength_max(self):
@@ -114,11 +125,14 @@
         #Maximum wavelength [float] [Angstrom]
         wavelength_max_txt = wx.StaticText(self, -1, 'Wavelength max:') 
-        self.wavelength_max_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
+        self.wavelength_max_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)   
         wavelength_max_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.wavelength_max_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
-        self.wavelength_max_sizer.AddMany([(wavelength_max_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.wavelength_max_unit_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)  
+        self.wavelength_max_sizer.AddMany([(wavelength_max_txt, 0,
+                                             wx.LEFT|wx.RIGHT, 10),
                                      (self.wavelength_max_tcl, 0, wx.LEFT, 7),
-                                     (wavelength_max_unit_txt, 0,wx.LEFT|wx.RIGHT, 10),
-                                     (self.wavelength_max_unit_tcl, 0, wx.EXPAND)]) 
+                            (wavelength_max_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                            (self.wavelength_max_unit_tcl, 0, wx.EXPAND)]) 
     
     def _layout_wavelength_spread(self):
@@ -130,11 +144,14 @@
         wavelength_spread_unit = 'percent'
         wavelength_spread_txt = wx.StaticText(self, -1, 'Wavelength spread:') 
-        self.wavelength_spread_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0)   
+        self.wavelength_spread_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)   
         wavelength_spread_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.wavelength_spread_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH, 20),style=0)  
-        self.wavelength_spread_sizer.AddMany([(wavelength_spread_txt, 0, wx.LEFT, 10),
-                                     (self.wavelength_spread_tcl, 0, wx.LEFT, 5),
-                                     (wavelength_spread_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
-                                     (self.wavelength_spread_unit_tcl, 0, wx.EXPAND)]) 
+        self.wavelength_spread_unit_tcl = wx.TextCtrl(self, -1,
+                                             size=(_BOX_WIDTH, 20), style=0)  
+        self.wavelength_spread_sizer.AddMany([(wavelength_spread_txt,
+                                                0, wx.LEFT, 10),
+                                (self.wavelength_spread_tcl, 0, wx.LEFT, 5),
+                        (wavelength_spread_unit_txt, 0, wx.LEFT|wx.RIGHT, 10),
+                        (self.wavelength_spread_unit_tcl, 0, wx.EXPAND)]) 
     def _layout_beam_size_name(self):
         """
@@ -143,6 +160,8 @@
         # Beam size name [string]
         beam_size_name_txt = wx.StaticText(self, -1, 'Beam size name : ')  
-        self.beam_size_name_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH*5, 20), style=0) 
-        self.beam_size_name_sizer.AddMany([(beam_size_name_txt, 0, wx.LEFT|wx.RIGHT, 10),
+        self.beam_size_name_tcl = wx.TextCtrl(self, -1,
+                                               size=(_BOX_WIDTH*5, 20), style=0) 
+        self.beam_size_name_sizer.AddMany([(beam_size_name_txt,
+                                             0, wx.LEFT|wx.RIGHT, 10),
                                        (self.beam_size_name_tcl, 0, wx.EXPAND)])
         
@@ -157,11 +176,15 @@
         beam_size_txt = wx.StaticText(self, -1, 'Beam size:') 
         x_beam_size_txt = wx.StaticText(self, -1, 'x = ')  
-        self.x_beam_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.x_beam_size_tcl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH, 20), style=0) 
         y_beam_size_txt = wx.StaticText(self, -1, 'y = ')  
-        self.y_beam_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0) 
+        self.y_beam_size_tcl = wx.TextCtrl(self, -1,
+                                            size=(_BOX_WIDTH, 20), style=0) 
         z_beam_size_txt = wx.StaticText(self, -1, 'z = ')  
-        self.z_beam_size_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.z_beam_size_tcl = wx.TextCtrl(self, -1, 
+                                           size=(_BOX_WIDTH, 20), style=0)  
         beam_size_unit_txt = wx.StaticText(self, -1, 'Unit: ') 
-        self.beam_size_unit_tcl = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=0)  
+        self.beam_size_unit_tcl = wx.TextCtrl(self, -1, 
+                                              size=(_BOX_WIDTH, 20), style=0)  
         self.beam_size_sizer.AddMany([(beam_size_txt, 0, wx.LEFT|wx.RIGHT, 10),
                                      (x_beam_size_txt, 0, wx.LEFT, 17),
@@ -172,5 +195,5 @@
                                      (self.z_beam_size_tcl, 0, wx.RIGHT, 10),
                                      (beam_size_unit_txt, 0, wx.EXPAND),
-                                     (self.beam_size_unit_tcl, 0, wx.RIGHT, 10)])
+                                    (self.beam_size_unit_tcl, 0, wx.RIGHT, 10)])
         
     def _layout_button(self):  
@@ -363,10 +386,11 @@
         self._source.wavelength_min = wavelength_min
         self._notes += " Change wavelength  min from"
-        self._notes += " %s to %s \n"%(self._source.wavelength_min, wavelength_min)
+        self._notes += " %s to %s \n" % (self._source.wavelength_min,
+                                          wavelength_min)
         #change the wavelength min unit
         unit = self.wavelength_min_unit_tcl.GetValue().lstrip().rstrip()
         if self._source.wavelength_min_unit != unit:
             self._notes += " Change wavelength min's unit from "
-            self._notes += "%s to %s"%(self._source.wavelength_min_unit, unit)
+            self._notes += "%s to %s" % (self._source.wavelength_min_unit, unit)
             
     def on_change_wavelength_max(self):
@@ -378,5 +402,6 @@
         self._source.wavelength_max = wavelength_max
         self._notes += " Change wavelength  max from"
-        self._notes += " %s to %s \n"%(self._source.wavelength_max, wavelength_max)
+        self._notes += " %s to %s \n" % (self._source.wavelength_max,
+                                        wavelength_max)
         #change the wavelength max unit
         unit = self.wavelength_max_unit_tcl.GetValue().lstrip().rstrip()
@@ -392,5 +417,6 @@
         wavelength_spread = self.wavelength_spread_tcl.GetValue().lstrip().rstrip()
         self._notes += " Change wavelength  spread from"
-        self._notes += " %s to %s \n"%(self._source.wavelength_spread, wavelength_spread)
+        self._notes += " %s to %s \n" % (self._source.wavelength_spread, 
+                                         wavelength_spread)
         self._source.wavelength_spread = wavelength_spread
         #change the wavelength spread unit
@@ -398,5 +424,6 @@
         if self._source.wavelength_spread_unit != unit:
             self._notes += " Change wavelength spread's unit from "
-            self._notes += "%s to %s"%(self._source.wavelength_spread_unit, unit)
+            self._notes += "%s to %s" % (self._source.wavelength_spread_unit, 
+                                         unit)
             self._source.wavelength_spread_unit = unit
     
@@ -411,5 +438,6 @@
         if self._source.beam_size_name != name:
             self._notes += "Change beam size  's "
-            self._notes += "name from %s to %s \n"%(self._source.beam_size_name, name)
+            self._notes += "name from %s to %s \n" % (self._source.beam_size_name,
+                                                       name)
             self._source.name = name
             
@@ -426,10 +454,12 @@
                 if self._source.beam_size.x != float(x_beam_size) :
                     self._notes += "Change x of beam size from "
-                    self._notes += "%s to %s \n"%(self._source.beam_size.x, x_beam_size)
+                    self._notes += "%s to %s \n" % (self._source.beam_size.x,
+                                                     x_beam_size)
                     self._source.beam_size.x  = float(x_beam_size)
             else:
                 self._notes += "Error: Expected a float for the beam size 's x "
                 self._notes += "won't changes x beam size from "
-                self._notes += "%s to %s"%(self._source.beam_size.x, x_beam_size)
+                self._notes += "%s to %s" % (self._source.beam_size.x,
+                                            x_beam_size)
         #Change y coordinate
         y_beam_size = self.y_beam_size_tcl.GetValue().lstrip().rstrip()
@@ -441,10 +471,12 @@
                 if self._source.beam_size.y != float(y_beam_size):
                     self._notes += "Change y of beam size from "
-                    self._notes += "%s to %s \n"%(self._source.beam_size.y, y_beam_size)
+                    self._notes += "%s to %s \n" % (self._source.beam_size.y,
+                                                     y_beam_size)
                     self._source.beam_size.y  = float(y_beam_size)
             else:
                 self._notes += "Error: Expected a float for the beam size's y "
                 self._notes += "won't changes y beam size from "
-                self._notes += "%s to %s"%(self._source.beam_size.y, y_beam_size)
+                self._notes += "%s to %s" % (self._source.beam_size.y,
+                                              y_beam_size)
         #Change z coordinate
         z_beam_size = self.z_beam_size_tcl.GetValue().lstrip().rstrip()
@@ -456,10 +488,12 @@
                 if self._source.beam_size.z != float(z_beam_size):
                     self._notes += "Change z of beam size from "
-                    self._notes += "%s to %s \n"%(self._source.beam_size.z, z_beam_size)
+                    self._notes += "%s to %s \n" % (self._source.beam_size.z,
+                                                     z_beam_size)
                     self._source.beam_size.z  = float(z_beam_size)
             else:
                 self._notes += "Error: Expected a float for the beam size 's z "
                 self._notes += "won't changes z beam size from "
-                self._notes += "%s to %s"%(self._source.beam_size.z, z_beam_size)
+                self._notes += "%s to %s" % (self._source.beam_size.z,
+                                              z_beam_size)
         #change the beam center unit
         unit = self.beam_size_unit_tcl.GetValue().lstrip().rstrip()
@@ -471,5 +505,5 @@
     def on_click_apply(self, event):
         """
-            Apply user values to the source
+        Apply user values to the source
         """
         self.on_change_name()
@@ -484,13 +518,17 @@
         if self.manager is not None:
             self.manager.set_source(self._source, self._notes)
+        if event is not None:
+            event.Skip()
         
     def on_click_cancel(self, event):
         """
-            reset the current source
+        reset the current source
         """
         self.reset_source()
         self.set_values()
         if self.manager is not None:
-             self.manager.set_source(self._source)    
+            self.manager.set_source(self._source)
+        if event is not None:
+            event.Skip()
     
 if __name__ =="__main__":
