Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 7ad6ff53fe839cb7520921a7a6606afba552fefb)
+++ sansview/perspectives/fitting/fitting.py	(revision bfe4644d90af77effe9c5c65b96d972116dc0542)
@@ -277,34 +277,19 @@
             @param return 
         """
-        detector=None
-        source=None
+       
         info = None
         id=None
-        dxl=None
-        dxw=None
-        dx=None
-        if hasattr(item, "dxl"):
-            dxl = copy.deepcopy(item.dxl)
-        if hasattr(item, "dxw"):
-            dxw = copy.deepcopy(item.dxw)
-        if hasattr(item, "detector"):
-            detector = copy.deepcopy(item.detector)
-        if hasattr(item, "source"):
-            source = copy.deepcopy(item.source)
+    
         if hasattr(item ,"info"):
             info= copy.deepcopy(item.info)
         if hasattr(item,"id"):
             id = copy.deepcopy(item.id)
-        if hasattr(item, "dx"):
-            dx= item.dx
-            
-        
-        data= Data1D(x=item.x, y=item.y,dx=dx, dy=dy)
-        data.dxl = dxl
-        data.dxw = dxw
-        
+       
+        data= Data1D(x=item.x, y=item.y,dx=None, dy=None)
+        data.copy_from_datainfo(item) 
+        item.clone_without_data(clone=data)      
+        data.dy= dy
         data.name = item.name
-        data.detector = detector
-        data.source = source
+      
         ## allow to highlight data when plotted
         data.interactive = copy.deepcopy(item.interactive)
@@ -314,11 +299,7 @@
         ## to save  data 1D as cansas xml file
         data.info= info
-        ## If the data file does not tell us what the axes are, just assume...
-        data.xaxis(copy.deepcopy(item._xaxis),copy.deepcopy(item._xunit))
-        data.yaxis(copy.deepcopy(item._yaxis),copy.deepcopy(item._yunit))
-        ##group_id specify on which panel to plot this data
         data.group_id = item.group_id
         return data
-
+    
     def set_fit_range(self, page, qmin, qmax):
         """
@@ -409,5 +390,6 @@
         
         smear =self.page_finder[current_pg].get_smearer()
-        self.draw_model( model=model, data= data, smearer= smear,
+        if model!= None:
+            self.draw_model( model=model, data= data, smearer= smear,
                 qmin= qmin, qmax= qmax)
 
Index: sansview/perspectives/fitting/gui_thread.py
===================================================================
--- sansview/perspectives/fitting/gui_thread.py	(revision 785c823324aaba8461c3abed70e8f3dfe58f0d5b)
+++ sansview/perspectives/fitting/gui_thread.py	(revision bfe4644d90af77effe9c5c65b96d972116dc0542)
@@ -78,7 +78,6 @@
             # Thread was interrupted, just proceed and re-raise.
             # Real code should not print, but this is an example...
-            raise
-        except: 
-            raise
+            raise KeyboardInterrupt
+      
         
 class CalcChisqr2D(CalcThread):
@@ -149,5 +148,4 @@
             # Thread was interrupted, just proceed and re-raise.
             # Real code should not print, but this is an example...
-            raise
-        except: 
-            raise
+            raise KeyboardInterrupt
+       
Index: sansview/perspectives/fitting/model_thread.py
===================================================================
--- sansview/perspectives/fitting/model_thread.py	(revision aeb3c20996a2b9c4020d3609a8a2c1400ebb2d9e)
+++ sansview/perspectives/fitting/model_thread.py	(revision bfe4644d90af77effe9c5c65b96d972116dc0542)
@@ -115,13 +115,28 @@
         index= (self.qmin <= self.x)& (self.x <= self.qmax)
         output[index] = self.model.evalDistribution(self.x[index])
+     
+        _first_bin = None
+        _last_bin  = None
+       
+        for i_x in xrange(len(self.x)):
+            if index[i_x]:
+                # Identify first and last bin
+                #TODO: refactor this to pass q-values to the smearer
+                # and let it figure out which bin range to use
+                if _first_bin is None:
+                    _first_bin = i_x
+                else:
+                    _last_bin  = i_x
       
         ##smearer the ouput of the plot    
         if self.smearer!=None:
-            output = self.smearer(output) #Todo: Why always output[0]=0???
-        
+            #output= self.smearer(output)
+            output = self.smearer(output, _first_bin,_last_bin) #Todo: Why always output[0]=0???
+         
         ######Temp. FIX for Qrange w/ smear. #ToDo: Should not pass all the data to 'run' or 'smear'...
-        new_index = (self.qmin > self.x) |(self.x > self.qmax)
-        output[new_index] = None
+        #new_index = (self.qmin > self.x) |(self.x > self.qmax)
+        #output[new_index] = None
                 
+        #print "output------",output
         elapsed = time.time()-self.starttime
        
Index: sansview/perspectives/fitting/models.py
===================================================================
--- sansview/perspectives/fitting/models.py	(revision 900292798df2a31771466509db82da8f933face0)
+++ sansview/perspectives/fitting/models.py	(revision bfe4644d90af77effe9c5c65b96d972116dc0542)
@@ -11,5 +11,5 @@
 import os,sys,math
 import os.path
-
+from sans.models.pluginmodel import Model1DPlugin
 (ModelEvent, EVT_MODEL) = wx.lib.newevent.NewEvent()
 from sans.guicomm.events import StatusEvent  
@@ -33,4 +33,44 @@
     return []
     
+def _check_plugin(model, name):
+    """
+        Do some checking before model adding plugins in the list
+        @param model: class model to add into the plugin list
+        @param name:name of the module plugin
+        @return model: model if valid model or nothing if not valid
+    """
+    #Check is the plugin is of type Model1DPlugin
+    if not issubclass(model, Model1DPlugin):
+        msg= "Plugin %s must be of type Model1DPlugin \n"%str(name)
+        log(msg)
+        return 
+    if model.__name__!="Model":
+        msg= "Plugin %s class name must be Model \n"%str(name)
+        log(msg)
+        return 
+    try:
+        new_instance= model()
+    except:
+        msg="Plugin %s error in __init__ \n\t: %s %s\n"%(str(name),
+                                    str(sys.exc_type),sys.exc_value)
+        log(msg)
+        return
+   
+    new_instance= model() 
+    if hasattr(new_instance,"function"):
+        try:
+           value=new_instance.function()
+        except:
+           msg="Plugin %s: error writing function \n\t :%s %s\n "%(str(name),
+                                    str(sys.exc_type),sys.exc_value)
+           log(msg)
+           return
+    else:
+       msg="Plugin  %s needs a method called function \n"%str(name)
+       log(msg)
+       return 
+    return model
+  
+  
 def _findModels(dir):
     # List of plugin objects
@@ -51,9 +91,17 @@
                     if hasattr(module, "Model"):
                         try:
-                            plugins.append(module.Model)
+                            if _check_plugin(module.Model, name)!=None:
+                            #plugins.append(module.Model)
+                                plugins.append(module.Model)
                         except:
-                            log("Error accessing Model in %s\n  %s" % (name, sys.exc_value))
+                            msg="Error accessing Model"
+                            msg+="in %s\n  %s %s\n" % (name,
+                                    str(sys.exc_type), sys.exc_value)
+                            log(msg)
                 except:
-                    log("Error accessing Model in %s\n  %s" % (name, sys.exc_value))
+                    msg="Error accessing Model"
+                    msg +=" in %s\n  %s %s \n" %(name,
+                                    str(sys.exc_type), sys.exc_value)
+                    log(msg)
                 finally:
               
@@ -285,5 +333,5 @@
                                 list1= self.struct_list )
         
-        self._fill_simple_menu( menuinfo = ["Customized Models", added_models,
+        self._fill_plugin_menu( menuinfo = ["Customized Models", added_models,
                                             "List of additional models"],
                                  list1= self.plugins )
@@ -297,4 +345,15 @@
         return 0
     
+    def _fill_plugin_menu(self,menuinfo, list1):
+        """
+            fill the plugin menu with costumized models
+        """
+        if len(list1)==0:
+            id = wx.NewId() 
+            msg= "No model available check plugins.log for errors to fix problem"
+            menuinfo[1].Append(int(id),"Empty",msg)
+        self._fill_simple_menu( menuinfo,list1)
+        
+        
     def _fill_simple_menu(self,menuinfo, list1):
         """
