Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision 212bfc297ca102b648c949f030d3d06a4c569fa3)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision 2abe6bf1d6a34a6dfe86ab55d2b0558204c050d8)
@@ -9,5 +9,4 @@
 import copy
 import math
-import string
 import json
 import logging
@@ -335,11 +334,4 @@
         self.data.detector[index].beam_center.x = qmax
         self.data.detector[index].beam_center.y = qmax
-        ## create x_bins and y_bins of the model 2D
-        #pixel_width_x = self.data.detector[index].pixel_size.x
-        #pixel_width_y = self.data.detector[index].pixel_size.y
-        #center_x = self.data.detector[index].beam_center.x/pixel_width_x
-        #center_y = self.data.detector[index].beam_center.y/pixel_width_y
-        # theory default: assume the beam
-        #center is located at the center of sqr detector
         xmax = qmax
         xmin = -qmax
@@ -360,14 +352,7 @@
         # set all True (standing for unmasked) as default
         mask = numpy.ones(len(qx_data), dtype=bool)
-        # calculate the range of qx and qy: this way,
-        # it is a little more independent
-        #x_size = xmax - xmin
-        #y_size = ymax - ymin
         # store x and y bin centers in q space
         x_bins = x
         y_bins = y
-        # bin size: x- & y-directions
-        #xstep = x_size / len(x_bins - 1)
-        #ystep = y_size / len(y_bins - 1)
 
         self.data.source = Source()
@@ -410,43 +395,10 @@
             batch_menu.Enable(self.batch_on and flag)
 
-    def set_page_info(self, page_info):
-        """
-        set some page important information at once
-        """
-#       THIS METHOD/FUNCTION NO LONGE APPEARS TO BE CALLED.  Started up program
-#       and started new fit window and PR and Invariant and a fit in fitting
-#       but never entered this routine which should be an initialization
-#       routine.  Leave for a while but probably something to clean up at
-#       some point?
-#
-#       PDB April 13 2014
-#
-        ##window_name
-        self.window_name = page_info.window_name
-        ##window_caption
-        self.window_caption = page_info.window_caption
-        ## manager is the fitting plugin
-        self._manager = page_info.manager
-        ## owner of the page (fitting plugin)
-        self.event_owner = page_info.event_owner
-        ## current model
-        self.model = page_info.model
-        ## data
-        self.data = page_info.data
-        ## dictionary containing list of models
-        self.model_list_box = page_info.model_list_box
-        ## Data member to store the dispersion object created
-        self.populate_box(model_dict=self.model_list_box)
-
     def onContextMenu(self, event):
         """
         Retrieve the state selected state
         """
-        # Skipping the save state functionality for release 0.9.0
-        #return
-
         pos = event.GetPosition()
         pos = self.ScreenToClient(pos)
-
         self.PopupMenu(self.popUpMenu, pos)
 
@@ -568,22 +520,4 @@
             return
         if len(self.model_list_box) > 0:
-        ## This is obsolete code since form factor box is no longer static.
-        ## It is now set dynamically through _show_combox and _show_combos_helper
-        ## These are called for first time by formfactor_combo_init
-        ## itself called from fitpanel only.  If we find that I'm wrong and
-        ## we DO need to initialize somehow here - do it by a call to
-        ## formfactor_combo_init
-        ## self.formfator_combo_init()
-        ## BUT NOT HERE -- make it last line of this
-        ## method so that structure box is populated before _show_comboox_helper
-        ## is called.  Otherwise wx will complain mightily:-)
-        ##
-        ## Also change the name to initiatlize_structurebox along with changes
-        ## to other combobox methods (_populate_listbox --> _populate_categorybox
-        ## etc )
-        ##
-        ##     PDB 4/26/2014
-#            self._populate_box(self.formfactorbox,
-#                               self.model_list_box["Shapes"])
             self._populate_box(self.structurebox,
                                self.model_list_box["Structure Factors"])
@@ -600,5 +534,4 @@
                 self.structurebox.Enable()
                 self.text2.Enable()
-
 
     def set_dispers_sizer(self):
@@ -738,5 +671,4 @@
         else:
             wx.CallAfter(self.get_copy)
-
 
     def on_paste(self, event):
@@ -952,9 +884,9 @@
                                      self.state.orientation_params)
         self._copy_parameters_state(self.orientation_params_disp,
-                                     self.state.orientation_params_disp)
+                                    self.state.orientation_params_disp)
 
         self._copy_parameters_state(self.parameters, self.state.parameters)
         self._copy_parameters_state(self.fittable_param,
-                                     self.state.fittable_param)
+                                    self.state.fittable_param)
         self._copy_parameters_state(self.fixed_param, self.state.fixed_param)
         #save chisqr
@@ -1044,10 +976,4 @@
         self.disp_cb_dict = state.disp_cb_dict
         self.disp_list = state.disp_list
-
-        ## set the state of the radio box
-        #self.shape_rbutton.SetValue(state.shape_rbutton)
-        #self.shape_indep_rbutton.SetValue(state.shape_indep_rbutton)
-        #self.struct_rbutton.SetValue(state.struct_rbutton)
-        #self.plugin_rbutton.SetValue(state.plugin_rbutton)
 
         ## fill model combobox
@@ -1861,6 +1787,5 @@
             if mod_cat == custom_model:
                 for model in self.model_list_box[mod_cat]:
-                    str_m = model.id if hasattr(model, 'id') else model.name
-                    m_list.append(self.model_dict[str_m])
+                    m_list.append(self.model_dict[model.name])
             else:
                 cat_dic = self.master_category_dict[mod_cat]
@@ -1868,8 +1793,4 @@
                     if enabled:
                         m_list.append(self.model_dict[model])
-                    #else:
-                    #    msg = "This model is disabled by Category Manager."
-                    #    wx.PostEvent(self.parent.parent,
-                    #                 StatusEvent(status=msg, info="error"))
         except Exception:
             msg = traceback.format_exc()
