Index: sasmodels/models/be_polyelectrolyte.py
===================================================================
--- sasmodels/models/be_polyelectrolyte.py	(revision 2f0c07deb2cb7a8c0c93476fbf1e0ffbe6c278cb)
+++ sasmodels/models/be_polyelectrolyte.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -170,4 +170,5 @@
       'ionization_degree':      2.0,
       'polymer_concentration': 10.0,
+      'background':             0.0,
      }, 0.1, -3.75693800588],
 
@@ -189,4 +190,5 @@
       'ionization_degree':     0.5,
       'polymer_concentration': 0.1,
+      'background':             0.0,
      }, 200., 1.80664667511e-06],
     ]
Index: sasmodels/models/core_shell_parallelepiped.py
===================================================================
--- sasmodels/models/core_shell_parallelepiped.py	(revision 2f0c07deb2cb7a8c0c93476fbf1e0ffbe6c278cb)
+++ sasmodels/models/core_shell_parallelepiped.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -186,8 +186,8 @@
 
 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5)
-tests = [[{}, 0.2, 0.532149288477],
-         [{}, [0.2], [0.532149288477]],
-         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.031102135569],
-         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.031102135569]],
+tests = [[{}, 0.2, 0.533149288477],
+         [{}, [0.2], [0.533149288477]],
+         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.032102135569],
+         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.032102135569]],
         ]
 del qx, qy  # not necessary to delete, but cleaner
Index: sasmodels/models/correlation_length.py
===================================================================
--- sasmodels/models/correlation_length.py	(revision 3e6c5c1168c56a700f8cd12b4025aa6a9764fddf)
+++ sasmodels/models/correlation_length.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -84,4 +84,4 @@
 
 tests = [[{}, 0.001, 1009.98],
-         [{}, 0.150141, 0.174645],
-         [{}, 0.442528, 0.0203957]]
+         [{}, 0.150141, 0.175645],
+         [{}, 0.442528, 0.0213957]]
Index: sasmodels/models/cylinder.py
===================================================================
--- sasmodels/models/cylinder.py	(revision 2f0c07deb2cb7a8c0c93476fbf1e0ffbe6c278cb)
+++ sasmodels/models/cylinder.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -167,8 +167,8 @@
 
 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5)
-tests = [[{}, 0.2, 0.041761386790780453],
-         [{}, [0.2], [0.041761386790780453]],
-         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03414647218513852],
-         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03414647218513852]],
+tests = [[{}, 0.2, 0.042761386790780453],
+         [{}, [0.2], [0.042761386790780453]],
+         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.03514647218513852],
+         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.03514647218513852]],
         ]
 del qx, qy  # not necessary to delete, but cleaner
Index: sasmodels/models/gauss_lorentz_gel.py
===================================================================
--- sasmodels/models/gauss_lorentz_gel.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/gauss_lorentz_gel.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -132,5 +132,5 @@
       'lorentz_scale_factor': 50.0,
       'dynamic_cor_length':   20.0,
-     }, 0.001, 149.481],
+     }, 0.001, 149.482],
 
     [{'gauss_scale_factor':  100.0,
@@ -138,5 +138,5 @@
       'lorentz_scale_factor': 50.0,
       'dynamic_cor_length':   20.0,
-     }, 0.105363, 9.1903],
+     }, 0.105363, 9.1913],
 
     [{'gauss_scale_factor':  100.0,
@@ -144,5 +144,5 @@
       'lorentz_scale_factor': 50.0,
       'dynamic_cor_length':   20.0,
-     }, 0.441623, 0.632811],
+     }, 0.441623, 0.633811],
 
     # Additional tests with larger range of parameters
@@ -151,5 +151,5 @@
       'lorentz_scale_factor': 3.0,
       'dynamic_cor_length':   1.0,
-     }, 0.1, 2.9702970297],
+     }, 0.1, 2.9712970297],
 
     [{'gauss_scale_factor':  10.0,
@@ -158,5 +158,5 @@
       'dynamic_cor_length':   1.0,
       'background':         100.0
-     }, 5.0, 100.115384615],
+     }, 5.0, 100.116384615],
 
     [{'gauss_scale_factor':  10.0,
@@ -164,4 +164,5 @@
       'lorentz_scale_factor': 3.0,
       'dynamic_cor_length':   1.0,
+      'background':           0.0,
      }, 200., 7.49981250469e-05],
     ]
Index: sasmodels/models/gel_fit.py
===================================================================
--- sasmodels/models/gel_fit.py	(revision 5111921153c056b59ff03411e4b7b028d238ae26)
+++ sasmodels/models/gel_fit.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -92,5 +92,6 @@
            'gyration_radius': 10.0,
            'fractal_exp': 10.0,
-           'cor_length': 20.0
+           'cor_length': 20.0,
+           'background': 0.0,
           }, 0.1, 0.716532],
 
Index: sasmodels/models/guinier.py
===================================================================
--- sasmodels/models/guinier.py	(revision 723cebed4612ad396b30ca46c6f1e5e801142cba)
+++ sasmodels/models/guinier.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -57,3 +57,3 @@
 
 # parameters for unit tests
-tests = [[{'rg' : 31.5}, 0.005, 0.991756]]
+tests = [[{'rg' : 31.5}, 0.005, 0.992756]]
Index: sasmodels/models/hollow_rectangular_prism.py
===================================================================
--- sasmodels/models/hollow_rectangular_prism.py	(revision 5111921153c056b59ff03411e4b7b028d238ae26)
+++ sasmodels/models/hollow_rectangular_prism.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -158,6 +158,6 @@
                thickness='thickness', sld='sldPipe', solvent_sld='sldSolv')
 
-tests = [[{}, 0.2, 0.76587283098],
-         [{}, [0.2], [0.76587283098]],
+tests = [[{}, 0.2, 0.76687283098],
+         [{}, [0.2], [0.76687283098]],
         ]
 
Index: sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py
===================================================================
--- sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py	(revision deb7ee06caa9916d8c0504bdc15ffbc16df623f6)
+++ sasmodels/models/hollow_rectangular_prism_infinitely_thin_walls.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -137,6 +137,6 @@
                sld='sldPipe', solvent_sld='sldSolv')
 
-tests = [[{}, 0.2, 0.836719188592],
-         [{}, [0.2], [0.836719188592]],
+tests = [[{}, 0.2, 0.837719188592],
+         [{}, [0.2], [0.837719188592]],
         ]
 
Index: sasmodels/models/line.py
===================================================================
--- sasmodels/models/line.py	(revision fa8011eb0e6b527e15b594945876ee39b6a46dbd)
+++ sasmodels/models/line.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -80,28 +80,29 @@
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, 1.0, 2.0],
+     }, 1.0, 2.001],
 
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, 0.0, 1.0],
+     }, 0.0, 1.001],
 
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, 0.4, 1.4],
+     }, 0.4, 1.401],
 
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, 1.3, 2.3],
+     }, 1.3, 2.301],
 
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, 0.5, 1.5],
+     }, 0.5, 1.501],
 
     [{'intercept':   1.0,
       'slope': 1.0,
-     }, [0.4, 0.5], [1.4, 1.5]],
+     }, [0.4, 0.5], [1.401, 1.501]],
 
     [{'intercept':   1.0,
       'slope': 1.0,
+      'background': 0.0,
      }, (1.3, 1.57), 5.911],
 ]
Index: sasmodels/models/lorentz.py
===================================================================
--- sasmodels/models/lorentz.py	(revision eb5901bce0a70fc35f2edf395a5b02199feab0cb)
+++ sasmodels/models/lorentz.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -64,3 +64,3 @@
 
 # parameters for unit tests
-tests = [[{'cor_length': 250}, 0.01, 0.137931]]
+tests = [[{'cor_length': 250}, 0.01, 0.138931]]
Index: sasmodels/models/mass_fractal.py
===================================================================
--- sasmodels/models/mass_fractal.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/mass_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -106,5 +106,5 @@
       'mass_dim':        1.9,
       'cutoff_length': 100.0,
-     }, 0.05, 279.59322],
+     }, 0.05, 279.59422],
 
     # Additional tests with larger range of parameters
@@ -112,5 +112,5 @@
       'mass_dim':      3.3,
       'cutoff_length': 1.0,
-     }, 0.5, 1.29016774904],
+     }, 0.5, 1.29116774904],
 
     [{'radius':        1.0,
@@ -124,4 +124,4 @@
       'cutoff_length': 1.0,
       'scale':        10.0,
-     }, 0.051, 11.6227966145],
+     }, 0.051, 11.6237966145],
     ]
Index: sasmodels/models/mass_surface_fractal.py
===================================================================
--- sasmodels/models/mass_surface_fractal.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/mass_surface_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -115,4 +115,5 @@
       'cluster_rg':   86.7,
       'primary_rg': 4000.0,
+      'background':    0.0,
      }, 0.05, 1.77537e-05],
 
@@ -122,5 +123,5 @@
       'cluster_rg':   90.0,
       'primary_rg': 4000.0,
-     }, 0.001, 0.18462699016],
+     }, 0.001, 0.18562699016],
 
     [{'mass_dim':      1.3,
@@ -136,4 +137,5 @@
       'primary_rg': 1000.0,
       'scale':        10.0,
+      'background':    0.0,
      }, 0.051, 0.000169548800377],
     ]
Index: sasmodels/models/mono_gauss_coil.py
===================================================================
--- sasmodels/models/mono_gauss_coil.py	(revision 4c05f4957956ed9d2a62699971feaa103fc1f7db)
+++ sasmodels/models/mono_gauss_coil.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -61,18 +61,18 @@
 
 # NB: Scale and Background are implicit parameters on every model
-def Iq(q, radius_gyration):
+def Iq(q, i_zero, radius_gyration):
     # pylint: disable = missing-docstring
-    z = (x * radius_gyration) * (x * radius_gyration)
-    if x == 0:
+    z = (q * radius_gyration) ** 2
+    if q == 0:
        inten = 1.0
     else:
        inten = i_zero * 2.0 * (exp(-z) + z - 1.0 ) / (z * z)
     return inten
-Iq.vectorized =  True  # Iq accepts an array of q values
+#Iq.vectorized = True # Iq accepts an array of q values
 
 def Iqxy(qx, qy, *args):
     # pylint: disable = missing-docstring
     return Iq(sqrt(qx ** 2 + qy ** 2), *args)
-Iqxy.vectorized =  True # Iqxy accepts an array of qx, qy values
+#Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values
 
 demo =  dict(scale = 1.0,
Index: sasmodels/models/parallelepiped.py
===================================================================
--- sasmodels/models/parallelepiped.py	(revision 5111921153c056b59ff03411e4b7b028d238ae26)
+++ sasmodels/models/parallelepiped.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -233,8 +233,8 @@
 
 qx, qy = 0.2 * np.cos(2.5), 0.2 * np.sin(2.5)
-tests = [[{}, 0.2, 0.17658004974],
-         [{}, [0.2], [0.17658004974]],
-         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.00460296014],
-         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.00460296014]],
+tests = [[{}, 0.2, 0.17758004974],
+         [{}, [0.2], [0.17758004974]],
+         [{'theta':10.0, 'phi':10.0}, (qx, qy), 0.00560296014],
+         [{'theta':10.0, 'phi':10.0}, [(qx, qy)], [0.00560296014]],
         ]
 del qx, qy  # not necessary to delete, but cleaner
Index: sasmodels/models/poly_gauss_coil.py
===================================================================
--- sasmodels/models/poly_gauss_coil.py	(revision 4c05f4957956ed9d2a62699971feaa103fc1f7db)
+++ sasmodels/models/poly_gauss_coil.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -67,22 +67,22 @@
 
 # NB: Scale and Background are implicit parameters on every model
-def Iq(q, radius_gyration, polydispersity):
+def Iq(q, i_zero, radius_gyration, polydispersity):
     # pylint: disable = missing-docstring
-	u = polydispersity - 1.0
+    u = polydispersity - 1.0
     # TO DO
-	# should trap the case of polydispersity = 1 by switching to a taylor expansion
-	minusoneonu = -1.0 / u
-	z = ((x * radius_gyration) * (x * radius_gyration)) / (1.0 + 2.0 * u)
-	if x == 0:
-	   inten = i_zero * 1.0
-	else:
-	   inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z))
-	return inten
-Iq.vectorized =  True  # Iq accepts an array of q values
+    # should trap the case of polydispersity = 1 by switching to a taylor expansion
+    minusoneonu = -1.0 / u
+    z = (q * radius_gyration) ** 2 / (1.0 + 2.0 * u)
+    if q == 0:
+        inten = i_zero * 1.0
+    else:
+        inten = i_zero * 2.0 * (power((1.0 + u * z),minusoneonu) + z - 1.0 ) / ((1.0 + u) * (z * z))
+    return inten
+#Iq.vectorized = True # Iq accepts an array of q values
 
 def Iqxy(qx, qy, *args):
     # pylint: disable = missing-docstring
     return Iq(sqrt(qx ** 2 + qy ** 2), *args)
-Iqxy.vectorized =  True # Iqxy accepts an array of qx, qy values
+#Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values
 
 demo =  dict(scale = 1.0,
Index: sasmodels/models/polymer_excl_volume.py
===================================================================
--- sasmodels/models/polymer_excl_volume.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/polymer_excl_volume.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -168,10 +168,10 @@
 tests = [
     # Accuracy tests based on content in test/polyexclvol_default_igor.txt
-    [{'rg': 60, 'porod_exp': 3.0}, 0.001, 0.998801],
-    [{'rg': 60, 'porod_exp': 3.0}, 0.105363, 0.0162751],
-    [{'rg': 60, 'porod_exp': 3.0}, 0.665075, 6.56261e-05],
+    [{'rg': 60, 'porod_exp': 3.0}, 0.001, 0.999801],
+    [{'rg': 60, 'porod_exp': 3.0}, 0.105363, 0.0172751],
+    [{'rg': 60, 'porod_exp': 3.0, 'background': 0.0}, 0.665075, 6.56261e-05],
 
     # Additional tests with larger range of parameters
-    [{'rg': 10, 'porod_exp': 4.0}, 0.1, 0.723436675809],
+    [{'rg': 10, 'porod_exp': 4.0}, 0.1, 0.724436675809],
     [{'rg': 2.2, 'porod_exp': 22.0, 'background': 100.0}, 5.0, 100.0],
     [{'rg': 1.1, 'porod_exp': 1, 'background': 10.0, 'scale': 1.25},
Index: sasmodels/models/rectangular_prism.py
===================================================================
--- sasmodels/models/rectangular_prism.py	(revision deb7ee06caa9916d8c0504bdc15ffbc16df623f6)
+++ sasmodels/models/rectangular_prism.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -135,5 +135,5 @@
                sld='sldPipe', solvent_sld='sldSolv')
 
-tests = [[{}, 0.2, 0.374248406825],
-         [{}, [0.2], [0.374248406825]],
+tests = [[{}, 0.2, 0.375248406825],
+         [{}, [0.2], [0.375248406825]],
         ]
Index: sasmodels/models/sc_crystal.py
===================================================================
--- sasmodels/models/sc_crystal.py	(revision 5111921153c056b59ff03411e4b7b028d238ae26)
+++ sasmodels/models/sc_crystal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -152,7 +152,7 @@
 tests = [
     # Accuracy tests based on content in test/utest_extra_models.py
-    [{}, 0.001, 10.3038],
-    [{}, 0.215268, 0.00714889],
-    [{}, (0.414467), 0.000313289]
+    [{}, 0.001, 10.3048],
+    [{}, 0.215268, 0.00814889],
+    [{}, (0.414467), 0.001313289]
     ]
 
Index: sasmodels/models/star_polymer.py
===================================================================
--- sasmodels/models/star_polymer.py	(revision 13ed84c3c71257d2df9c2ed4b4e98c0bfa4d7d69)
+++ sasmodels/models/star_polymer.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -76,5 +76,5 @@
 tests = [[{'radius2': 2.0,
            'arms':    3.3,
-          }, 0.5, 0.850646091108],
+          }, 0.5, 0.851646091108],
 
          [{'radius2':    1.0,
Index: sasmodels/models/surface_fractal.py
===================================================================
--- sasmodels/models/surface_fractal.py	(revision 168052c5791506d7dfad00173f5636fc5701ad11)
+++ sasmodels/models/surface_fractal.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -106,5 +106,5 @@
       'surface_dim': 2.0,
       'cutoff_length': 500.0,
-     }, 0.05, 301428.65916],
+     }, 0.05, 301428.66016],
 
     # Additional tests with larger range of parameters
@@ -112,5 +112,5 @@
       'surface_dim': 1.0,
       'cutoff_length': 10.0,
-     }, 0.332070182643, 1125.00321004],
+     }, 0.332070182643, 1125.00421004],
 
     [{'radius': 3.5,
@@ -124,4 +124,4 @@
       'cutoff_length': 33.0,
       'scale': 0.1,
-     }, 0.51, 2.50020147004],
+     }, 0.51, 2.50120147004],
     ]
Index: sasmodels/models/teubner_strey.py
===================================================================
--- sasmodels/models/teubner_strey.py	(revision eb69cce00f0781ad8f3eec0eb5965a8576d815b5)
+++ sasmodels/models/teubner_strey.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -91,3 +91,3 @@
 oldpars = dict(a2='scale')
 
-tests = [[{}, 0.2, 0.144927536232]]
+tests = [[{}, 0.2, 0.145927536232]]
Index: sasmodels/models/vesicle.py
===================================================================
--- sasmodels/models/vesicle.py	(revision fa8011eb0e6b527e15b594945876ee39b6a46dbd)
+++ sasmodels/models/vesicle.py	(revision 6dd90c1d8aaff9b7299ee215555203db80eaa3a0)
@@ -130,7 +130,8 @@
 
 
-# NOTE: test results taken from values returned by SasView 3.1.2
-tests = [[{}, 0.0010005303255, 17139.8268799],
-         [{}, 0.200027832249, 0.130387268704],
+# NOTE: test results taken from values returned by SasView 3.1.2, with
+# 0.001 added for a non-zero default background.
+tests = [[{}, 0.0010005303255, 17139.8278799],
+         [{}, 0.200027832249, 0.131387268704],
          [{}, 'ER', 130.],
          [{}, 'VR', 0.54483386436],
