Index: src/sas/sascalc/pr/c_extensions/Cinvertor.c
===================================================================
--- src/sas/sascalc/pr/c_extensions/Cinvertor.c	(revision d04ac056c476a91de374975fdb618e1cf1d27ca1)
+++ src/sas/sascalc/pr/c_extensions/Cinvertor.c	(revision b8080e1affadb04559f0597dfddc5506d2044e9d)
@@ -735,5 +735,5 @@
 
 const char get_peaks_doc[] =
-	"Returns the number of peaks in the output P(r) distrubution\n"
+	"Returns the number of peaks in the output P(r) distribution\n"
 	"for the given set of coefficients.\n"
 	" @param args: c-parameters\n"
Index: src/sas/sascalc/pr/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 574adc767a9e86744546f8edd6a23dc4f81914ad)
+++ src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision b8080e1affadb04559f0597dfddc5506d2044e9d)
@@ -78,7 +78,7 @@
     def get_params(self, fitparams):
         """
-        return a list of value of paramter to fit
-
-        :param fitparams: list of paramaters name to fit
+        return a list of value of parameter to fit
+
+        :param fitparams: list of parameters name to fit
 
         """
Index: src/sas/sascalc/pr/invertor.py
===================================================================
--- src/sas/sascalc/pr/invertor.py	(revision 6da860acc5670055935e7bdc8678d3827d1a057f)
+++ src/sas/sascalc/pr/invertor.py	(revision b8080e1affadb04559f0597dfddc5506d2044e9d)
@@ -222,8 +222,5 @@
         elif name == 'est_bck':
             value = self.get_est_bck()
-            if value == 1:
-                return True
-            else:
-                return False
+            return value == 1
         elif name in self.__dict__:
             return self.__dict__[name]
@@ -460,5 +457,5 @@
 
         # If we need to fit the background, add a term
-        if self.est_bck == True:
+        if self.est_bck:
             nfunc_0 = nfunc
             nfunc += 1
@@ -500,11 +497,11 @@
             cov = np.linalg.pinv(inv_cov)
             err = math.fabs(chi2 / float(npts - nfunc)) * cov
-        except Exception as ex:
+        except:
             # We were not able to estimate the errors
             # Return an empty error matrix
-            logger.error(ex)
+            logger.error(sys.exc_value)
 
         # Keep a copy of the last output
-        if self.est_bck == False:
+        if not self.est_bck:
             self.out = c
             self.cov = err
@@ -540,13 +537,13 @@
 
         """
-        from sas.sascalc.pr.num_term import NTermEstimator
+        from .num_term import NTermEstimator
         estimator = NTermEstimator(self.clone())
         try:
             return estimator.num_terms(isquit_func)
-        except Exception as ex:
+        except:
             # If we fail, estimate alpha and return the default
             # number of terms
             best_alpha, _, _ = self.estimate_alpha(self.nfunc)
-            logger.warning("Invertor.estimate_numterms: %s" % ex)
+            logger.warning("Invertor.estimate_numterms: %s" % sys.exc_value)
             return self.nfunc, best_alpha, "Could not estimate number of terms"
 
@@ -634,6 +631,6 @@
                 return best_alpha, message, elapsed
 
-        except Exception as ex:
-            message = "Invertor.estimate_alpha: %s" % ex
+        except:
+            message = "Invertor.estimate_alpha: %s" % sys.exc_value
             return 0, message, elapsed
 
@@ -658,5 +655,5 @@
         file.write("#slit_width=%g\n" % self.slit_width)
         file.write("#background=%g\n" % self.background)
-        if self.est_bck == True:
+        if self.est_bck:
             file.write("#has_bck=1\n")
         else:
@@ -738,8 +735,5 @@
                     elif line.startswith('#has_bck='):
                         toks = line.split('=')
-                        if int(toks[1]) == 1:
-                            self.est_bck = True
-                        else:
-                            self.est_bck = False
+                        self.est_bck = int(toks[1]) == 1
 
                     # Now read in the parameters
@@ -754,6 +748,6 @@
                         self.cov[i][i] = float(toks2[1])
 
-            except Exception as ex:
-                msg = "Invertor.from_file: corrupted file\n%s" % ex
+            except:
+                msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value
                 raise RuntimeError(msg)
         else:
Index: src/sas/sascalc/pr/num_term.py
===================================================================
--- src/sas/sascalc/pr/num_term.py	(revision 8f83719fd67e6a72acdcd666e7bf1e2326b52cd0)
+++ src/sas/sascalc/pr/num_term.py	(revision b8080e1affadb04559f0597dfddc5506d2044e9d)
@@ -55,5 +55,5 @@
         medi = 0
         for i in range(dv):
-            if odd == True:
+            if odd:
                 medi = osc[int(med)]
             else:
@@ -98,7 +98,7 @@
                 new_osc3.append(self.osc_list[i])
 
-        if flag9 == True:
+        if flag9:
             self.dataset = new_osc1
-        elif flag8 == True:
+        elif flag8:
             self.dataset = new_osc2
         else:
@@ -141,6 +141,5 @@
             div = len(nts)
             tem = float(div) / 2.0
-            odd = self.is_odd(div)
-            if odd == True:
+            if self.is_odd(div):
                 nt = nts[int(tem)]
             else:
@@ -148,5 +147,5 @@
             return nt, self.alpha_list[nt - 10], self.mess_list[nt - 10]
         except:
-            #TODO: check the logic above and make sure it doesn't 
+            #TODO: check the logic above and make sure it doesn't
             # rely on the try-except.
             return self.nterm_min, self.invertor.alpha, ''
@@ -183,6 +182,6 @@
                 data_y = np.append(data_y, test_y)
                 data_err = np.append(data_err, err)
-            except Exception as ex:
-                logger.error(ex)
+            except:
+                logger.error(sys.exc_value)
 
     return data_x, data_y, data_err
