Index: sasmodels/models/cylinder.c
===================================================================
--- sasmodels/models/cylinder.c	(revision 26141cba42ea53a3ca3b54e60b579f5525dd583d)
+++ sasmodels/models/cylinder.c	(revision 03cac087353e872f40154bf57ef8161eb5367fd4)
@@ -3,4 +3,6 @@
 double Iqxy(double qx, double qy, double sld, double solvent_sld,
     double radius, double length, double theta, double phi);
+
+#define INVALID(v) (v.radius<0 || v.length<0)
 
 double form_volume(double radius, double length)
@@ -15,5 +17,4 @@
     double length)
 {
-    // TODO: return NaN if radius<0 or length<0?
     // precompute qr and qh to save time in the loop
     const double qr = q*radius;
@@ -47,5 +48,4 @@
     double phi)
 {
-    // TODO: return NaN if radius<0 or length<0?
     double sn, cn; // slots to hold sincos function output
 
Index: sasmodels/models/gel_fit.c
===================================================================
--- sasmodels/models/gel_fit.c	(revision 30b4ddfb88f4c0a299757def2ee628c2a3d50a42)
+++ sasmodels/models/gel_fit.c	(revision 03cac087353e872f40154bf57ef8161eb5367fd4)
@@ -1,19 +1,3 @@
-double form_volume(void);
-
-double Iq(double q,
-          double guinier_scale,
-          double lorentzian_scale,
-          double gyration_radius,
-          double fractal_exp,
-          double cor_length);
-
-double Iqxy(double qx, double qy,
-          double guinier_scale,
-          double lorentzian_scale,
-          double gyration_radius,
-          double fractal_exp,
-          double cor_length);
-
-static double _gel_fit_kernel(double q,
+static double Iq(double q,
           double guinier_scale,
           double lorentzian_scale,
@@ -24,5 +8,5 @@
     // Lorentzian Term
     ////////////////////////double a(x[i]*x[i]*zeta*zeta);
-    double lorentzian_term = q*q*cor_length*cor_length;
+    double lorentzian_term = square(q*cor_length);
     lorentzian_term = 1.0 + ((fractal_exp + 1.0)/3.0)*lorentzian_term;
     lorentzian_term = pow(lorentzian_term, (fractal_exp/2.0) );
@@ -30,5 +14,5 @@
     // Exponential Term
     ////////////////////////double d(x[i]*x[i]*rg*rg);
-    double exp_term = q*q*gyration_radius*gyration_radius;
+    double exp_term = square(q*gyration_radius);
     exp_term = exp(-1.0*(exp_term/3.0));
 
@@ -37,39 +21,2 @@
     return result;
 }
-double form_volume(void){
-    // Unused, so free to return garbage.
-    return NAN;
-}
-
-double Iq(double q,
-          double guinier_scale,
-          double lorentzian_scale,
-          double gyration_radius,
-          double fractal_exp,
-          double cor_length)
-{
-    return _gel_fit_kernel(q,
-                          guinier_scale,
-                          lorentzian_scale,
-                          gyration_radius,
-                          fractal_exp,
-                          cor_length);
-}
-
-// Iqxy is never called since no orientation or magnetic parameters.
-double Iqxy(double qx, double qy,
-          double guinier_scale,
-          double lorentzian_scale,
-          double gyration_radius,
-          double fractal_exp,
-          double cor_length)
-{
-    double q = sqrt(qx*qx + qy*qy);
-    return _gel_fit_kernel(q,
-                          guinier_scale,
-                          lorentzian_scale,
-                          gyration_radius,
-                          fractal_exp,
-                          cor_length);
-}
-
Index: sasmodels/models/lib/Si.c
===================================================================
--- sasmodels/models/lib/Si.c	(revision e7678b2f993854334aca4c45e1c7022b2fdbb509)
+++ sasmodels/models/lib/Si.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -1,5 +1,5 @@
+// integral of sin(x)/x Taylor series approximated to w/i 0.1%
 double Si(double x);
 
-// integral of sin(x)/x Taylor series approximated to w/i 0.1%
 double Si(double x)
 {
Index: sasmodels/models/lib/polevl.c
===================================================================
--- sasmodels/models/lib/polevl.c	(revision 0b05c24b7a6d505d30f1aa9ed2c9bca8760d9946)
+++ sasmodels/models/lib/polevl.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -51,5 +51,10 @@
 */
 
-double polevl( double x, constant double *coef, int N ) {
+double polevl( double x, constant double *coef, int N );
+double p1evl( double x, constant double *coef, int N );
+
+
+double polevl( double x, constant double *coef, int N )
+{
 
     int i = 0;
@@ -70,5 +75,6 @@
  */
 
-double p1evl( double x, constant double *coef, int N ) {
+double p1evl( double x, constant double *coef, int N )
+{
     int i=0;
     double ans = x+coef[i];
Index: sasmodels/models/lib/sas_J0.c
===================================================================
--- sasmodels/models/lib/sas_J0.c	(revision a776125d8ac14178bb0492f33e5caaee0644b8f0)
+++ sasmodels/models/lib/sas_J0.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -49,4 +49,6 @@
 Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
 */
+
+double sas_J0(double x);
 
 /* Note: all coefficients satisfy the relative error criterion
@@ -177,5 +179,6 @@
  };
 
-double sas_J0(double x) {
+double sas_J0(double x)
+{
 
 //Cephes single precission
Index: sasmodels/models/lib/sas_J1.c
===================================================================
--- sasmodels/models/lib/sas_J1.c	(revision 19b90050a6f75237ad473adc52b2af5f20e7b264)
+++ sasmodels/models/lib/sas_J1.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -39,4 +39,6 @@
 Copyright 1984, 1987, 1989, 2000 by Stephen L. Moshier
 */
+double sas_J1(double x);
+double sas_J1c(double x);
 
 constant double RPJ1[8] = {
@@ -135,5 +137,6 @@
     };
 
-double sas_J1(double x) {
+double sas_J1(double x)
+{
 
 //Cephes double pression function
Index: sasmodels/models/lib/sas_JN.c
===================================================================
--- sasmodels/models/lib/sas_JN.c	(revision a776125d8ac14178bb0492f33e5caaee0644b8f0)
+++ sasmodels/models/lib/sas_JN.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -47,8 +47,8 @@
 Copyright 1984, 1987, 2000 by Stephen L. Moshier
 */
-
 double sas_JN( int n, double x );
 
-double sas_JN( int n, double x ) {
+double sas_JN( int n, double x )
+{
 
     const double MACHEP = 1.11022302462515654042E-16;
Index: sasmodels/models/lib/sph_j1c.c
===================================================================
--- sasmodels/models/lib/sph_j1c.c	(revision e6f14104e82489f43d4acc1eeda0d50ad5408fb6)
+++ sasmodels/models/lib/sph_j1c.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -7,4 +7,5 @@
 * using double precision that are the source.
 */
+double sph_j1c(double q);
 
 // The choice of the number of terms in the series and the cutoff value for
@@ -43,5 +44,4 @@
 #endif
 
-double sph_j1c(double q);
 double sph_j1c(double q)
 {
Index: sasmodels/models/lib/sphere_form.c
===================================================================
--- sasmodels/models/lib/sphere_form.c	(revision ad90df9f3ed42019113506f1366fe4b851b5f389)
+++ sasmodels/models/lib/sphere_form.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -1,10 +1,11 @@
-inline double
-sphere_volume(double radius)
+double sphere_volume(double radius);
+double sphere_form(double q, double radius, double sld, double solvent_sld);
+
+double sphere_volume(double radius)
 {
     return M_4PI_3*cube(radius);
 }
 
-inline double
-sphere_form(double q, double radius, double sld, double solvent_sld)
+double sphere_form(double q, double radius, double sld, double solvent_sld)
 {
     const double fq = sphere_volume(radius) * sph_j1c(q*radius);
Index: sasmodels/models/lib/wrc_cyl.c
===================================================================
--- sasmodels/models/lib/wrc_cyl.c	(revision e7678b2f993854334aca4c45e1c7022b2fdbb509)
+++ sasmodels/models/lib/wrc_cyl.c	(revision ba32cddebeff04b66d828ca58b1843244d4425fb)
@@ -2,4 +2,7 @@
     Functions for WRC implementation of flexible cylinders
 */
+double Sk_WR(double q, double L, double b);
+
+
 static double
 AlphaSquare(double x)
@@ -363,5 +366,4 @@
 }
 
-double Sk_WR(double q, double L, double b);
 double Sk_WR(double q, double L, double b)
 {
Index: sasmodels/models/onion.c
===================================================================
--- sasmodels/models/onion.c	(revision fdb148728a4d4bdcb4cd711d87631f3ee41993fd)
+++ sasmodels/models/onion.c	(revision ce896fde473387374a3fcfc3918ce7a13676b16c)
@@ -4,5 +4,5 @@
     double thickness, double A)
 {
-  const double vol = 4.0/3.0 * M_PI * r * r * r;
+  const double vol = M_4PI_3 * cube(r);
   const double qr = q * r;
   const double alpha = A * r/thickness;
@@ -19,5 +19,5 @@
     double sinqr, cosqr;
     SINCOS(qr, sinqr, cosqr);
-    fun = -3.0(
+    fun = -3.0*(
             ((alphasq - qrsq)*sinqr/qr - 2.0*alpha*cosqr) / sumsq
                 - (alpha*sinqr/qr - cosqr)
@@ -32,5 +32,5 @@
 f_linear(double q, double r, double sld, double slope)
 {
-  const double vol = 4.0/3.0 * M_PI * r * r * r;
+  const double vol = M_4PI_3 * cube(r);
   const double qr = q * r;
   const double bes = sph_j1c(qr);
@@ -52,5 +52,5 @@
 {
   const double bes = sph_j1c(q * r);
-  const double vol = 4.0/3.0 * M_PI * r * r * r;
+  const double vol = M_4PI_3 * cube(r);
   return sld * vol * bes;
 }
@@ -64,15 +64,15 @@
     r += thickness[i];
   }
-  return 4.0/3.0 * M_PI * r * r * r;
+  return M_4PI_3*cube(r);
 }
 
 static double
-Iq(double q, double core_sld, double core_radius, double solvent_sld,
-    double n, double in_sld[], double out_sld[], double thickness[],
+Iq(double q, double sld_core, double core_radius, double sld_solvent,
+    double n, double sld_in[], double sld_out[], double thickness[],
     double A[])
 {
   int i;
-  r = core_radius;
-  f = f_constant(q, r, core_sld);
+  double r = core_radius;
+  double f = f_constant(q, r, sld_core);
   for (i=0; i<n; i++){
     const double r0 = r;
@@ -92,6 +92,6 @@
     }
   }
-  f -= f_constant(q, r, solvent_sld);
-  f2 = f * f * 1.0e-4;
+  f -= f_constant(q, r, sld_solvent);
+  const double f2 = f * f * 1.0e-4;
 
   return f2;
Index: sasmodels/models/onion.py
===================================================================
--- sasmodels/models/onion.py	(revision 6a8fdfe497ace4a16ba0ab4b8bb00a726a419103)
+++ sasmodels/models/onion.py	(revision ce896fde473387374a3fcfc3918ce7a13676b16c)
@@ -292,15 +292,15 @@
 
 #             ["name", "units", default, [lower, upper], "type","description"],
-parameters = [["core_sld", "1e-6/Ang^2", 1.0, [-inf, inf], "",
+parameters = [["sld_core", "1e-6/Ang^2", 1.0, [-inf, inf], "",
                "Core scattering length density"],
-              ["core_radius", "Ang", 200., [0, inf], "",
+              ["core_radius", "Ang", 200., [0, inf], "volume",
                "Radius of the core"],
-              ["solvent_sld", "1e-6/Ang^2", 6.4, [-inf, inf], "",
+              ["sld_solvent", "1e-6/Ang^2", 6.4, [-inf, inf], "",
                "Solvent scattering length density"],
               ["n", "", 1, [0, 10], "volume",
                "number of shells"],
-              ["in_sld[n]", "1e-6/Ang^2", 1.7, [-inf, inf], "",
+              ["sld_in[n]", "1e-6/Ang^2", 1.7, [-inf, inf], "",
                "scattering length density at the inner radius of shell k"],
-              ["out_sld[n]", "1e-6/Ang^2", 2.0, [-inf, inf], "",
+              ["sld_out[n]", "1e-6/Ang^2", 2.0, [-inf, inf], "",
                "scattering length density at the outer radius of shell k"],
               ["thickness[n]", "Ang", 40., [0, inf], "volume",
@@ -310,14 +310,11 @@
               ]
 
-#source = ["lib/sph_j1c.c", "onion.c"]
-
-def Iq(q, *args, **kw):
-    return q
-
-def Iqxy(qx, *args, **kw):
-    return qx
-
-
-def shape(core_sld, core_radius, solvent_sld, n, in_sld, out_sld, thickness, A):
+source = ["lib/sph_j1c.c", "onion.c"]
+
+#def Iq(q, *args, **kw):
+#    return q
+
+profile_axes = ['Radius (A)', 'SLD (1e-6/A^2)']
+def profile(core_sld, core_radius, solvent_sld, n, in_sld, out_sld, thickness, A):
     """
     SLD profile
@@ -373,10 +370,10 @@
 
 demo = {
-    "solvent_sld": 2.2,
-    "core_sld": 1.0,
+    "sld_solvent": 2.2,
+    "sld_core": 1.0,
     "core_radius": 100,
     "n": 4,
-    "in_sld": [0.5, 1.5, 0.9, 2.0],
-    "out_sld": [nan, 0.9, 1.2, 1.6],
+    "sld_in": [0.5, 1.5, 0.9, 2.0],
+    "sld_out": [nan, 0.9, 1.2, 1.6],
     "thickness": [50, 75, 150, 75],
     "A": [0, -1, 1e-4, 1],
Index: sasmodels/models/rpa.py
===================================================================
--- sasmodels/models/rpa.py	(revision aad336c963572c598c67e78f4e39f6c4a6b9298a)
+++ sasmodels/models/rpa.py	(revision 69aa451cd7078d77c255be72d487793b00b34eee)
@@ -86,29 +86,11 @@
 #   ["name", "units", default, [lower, upper], "type","description"],
 parameters = [
-    ["case_num", CASES, 0, [0, 10], "", "Component organization"],
+    ["case_num", "", 1, CASES, "", "Component organization"],
 
-    ["Na", "", 1000.0, [1, inf], "", "Degree of polymerization"],
-    ["Phia", "", 0.25, [0, 1], "", "volume fraction"],
-    ["va", "mL/mol", 100.0, [0, inf], "", "specific volume"],
-    ["La", "fm", 10.0, [-inf, inf], "", "scattering length"],
-    ["ba", "Ang", 5.0, [0, inf], "", "segment length"],
-
-    ["Nb", "", 1000.0, [1, inf], "", "Degree of polymerization"],
-    ["Phib", "", 0.25, [0, 1], "", "volume fraction"],
-    ["vb", "mL/mol", 100.0, [0, inf], "", "specific volume"],
-    ["Lb", "fm", 10.0, [-inf, inf], "", "scattering length"],
-    ["bb", "Ang", 5.0, [0, inf], "", "segment length"],
-
-    ["Nc", "", 1000.0, [1, inf], "", "Degree of polymerization"],
-    ["Phic", "", 0.25, [0, 1], "", "volume fraction"],
-    ["vc", "mL/mol", 100.0, [0, inf], "", "specific volume"],
-    ["Lc", "fm", 10.0, [-inf, inf], "", "scattering length"],
-    ["bc", "Ang", 5.0, [0, inf], "", "segment length"],
-
-    ["Nd", "", 1000.0, [1, inf], "", "Degree of polymerization"],
-    ["Phid", "", 0.25, [0, 1], "", "volume fraction"],
-    ["vd", "mL/mol", 100.0, [0, inf], "", "specific volume"],
-    ["Ld", "fm", 10.0, [-inf, inf], "", "scattering length"],
-    ["bd", "Ang", 5.0, [0, inf], "", "segment length"],
+    ["N[4]", "", 1000.0, [1, inf], "", "Degree of polymerization"],
+    ["Phi[4]", "", 0.25, [0, 1], "", "volume fraction"],
+    ["v[4]", "mL/mol", 100.0, [0, inf], "", "specific volume"],
+    ["L[4]", "fm", 10.0, [-inf, inf], "", "scattering length"],
+    ["b[4]", "Ang", 5.0, [0, inf], "", "segment length"],
 
     ["Kab", "", -0.0004, [-inf, inf], "", "Interaction parameter"],
Index: sasmodels/models/spherical_sld.py
===================================================================
--- sasmodels/models/spherical_sld.py	(revision e42b0b97594cafef1369a17613a32c7f8885d6ec)
+++ sasmodels/models/spherical_sld.py	(revision ce896fde473387374a3fcfc3918ce7a13676b16c)
@@ -163,158 +163,155 @@
 title = "Sperical SLD intensity calculation"
 description = """
-            I(q) =
-               background = Incoherent background [1/cm]
-        """
+    I(q) =
+    background = Incoherent background [1/cm]
+    """
 category = "sphere-based"
 
 # pylint: disable=bad-whitespace, line-too-long
 #            ["name", "units", default, [lower, upper], "type", "description"],
-parameters = [["n_shells",         "",               1,      [0, 9],         "", "number of shells"],
-              ["thick_inter[n]",   "Ang",            50,     [-inf, inf],    "", "intern layer thickness"],
-              ["func_inter[n]",    "",               0,      [0, 4],         "", "Erf:0, RPower:1, LPower:2, RExp:3, LExp:4"],
-              ["sld_core",         "1e-6/Ang^2",     2.07,   [-inf, inf],    "", "sld function flat"],
-              ["sld_solvent",      "1e-6/Ang^2",     1.0,    [-inf, inf],    "", "sld function solvent"],
-              ["sld_flat[n]",      "1e-6/Ang^2",     4.06,   [-inf, inf],    "", "sld function flat"],
-              ["thick_inter[n]",   "Ang",            50.0,   [0, inf],    "", "intern layer thickness"],
-              ["thick_flat[n]",    "Ang",            100.0,  [0, inf],    "", "flat layer_thickness"],
-              ["inter_nu[n]",      "",               2.5,    [-inf, inf],    "", "steepness parameter"],
-              ["npts_inter",       "",               35,     [0, 35],        "", "number of points in each sublayer Must be odd number"],
-              ["core_rad",         "Ang",            50.0,   [0, inf],    "", "intern layer thickness"],
+parameters = [["n_shells",                "",               1,      [0, 9],      "", "number of shells"],
+              ["thick_inter[n_shells]",   "Ang",            50,     [-inf, inf], "", "intern layer thickness"],
+              ["func_inter[n_shells]",    "",               0,      [0, 4],      "", "Erf:0, RPower:1, LPower:2, RExp:3, LExp:4"],
+              ["sld_core",                "1e-6/Ang^2",     2.07,   [-inf, inf], "", "sld function flat"],
+              ["sld_solvent",             "1e-6/Ang^2",     1.0,    [-inf, inf], "", "sld function solvent"],
+              ["sld_flat[n_shells]",      "1e-6/Ang^2",     4.06,   [-inf, inf], "", "sld function flat"],
+              ["thick_inter[n_shells]",   "Ang",            50.0,   [0, inf],    "", "intern layer thickness"],
+              ["thick_flat[n_shells]",    "Ang",            100.0,  [0, inf],    "", "flat layer_thickness"],
+              ["inter_nu[n_shells]",      "",               2.5,    [-inf, inf], "", "steepness parameter"],
+              ["npts_inter",              "",               35,     [0, 35],     "", "number of points in each sublayer Must be odd number"],
+              ["core_rad",                "Ang",            50.0,   [0, inf],    "", "intern layer thickness"],
               ]
 # pylint: enable=bad-whitespace, line-too-long
+
 #source = ["lib/librefl.c",  "lib/sph_j1c.c", "spherical_sld.c"]
-
 def Iq(q, *args, **kw):
     return q
 
-def Iqxy(qx, *args, **kw):
-    return qx
-
-
 demo = dict(
-        n_shells=4,
-        scale=1.0,
-        solvent_sld=1.0,
-        background=0.0,
-        npts_inter=35.0,
-        func_inter_0=0,
-        nu_inter_0=2.5,
-        rad_core_0=50.0,
-        core0_sld=2.07,
-        thick_inter_0=50.0,
-        func_inter_1=0,
-        nu_inter_1=2.5,
-        thick_inter_1=50.0,
-        flat1_sld=4.0,
-        thick_flat_1=100.0,
-        func_inter_2=0,
-        nu_inter_2=2.5,
-        thick_inter_2=50.0,
-        flat2_sld=3.5,
-        thick_flat_2=100.0,
-        func_inter_3=0,
-        nu_inter_3=2.5,
-        thick_inter_3=50.0,
-        flat3_sld=4.0,
-        thick_flat_3=100.0,
-        func_inter_4=0,
-        nu_inter_4=2.5,
-        thick_inter_4=50.0,
-        flat4_sld=3.5,
-        thick_flat_4=100.0,
-        func_inter_5=0,
-        nu_inter_5=2.5,
-        thick_inter_5=50.0,
-        flat5_sld=4.0,
-        thick_flat_5=100.0,
-        func_inter_6=0,
-        nu_inter_6=2.5,
-        thick_inter_6=50.0,
-        flat6_sld=3.5,
-        thick_flat_6=100.0,
-        func_inter_7=0,
-        nu_inter_7=2.5,
-        thick_inter_7=50.0,
-        flat7_sld=4.0,
-        thick_flat_7=100.0,
-        func_inter_8=0,
-        nu_inter_8=2.5,
-        thick_inter_8=50.0,
-        flat8_sld=3.5,
-        thick_flat_8=100.0,
-        func_inter_9=0,
-        nu_inter_9=2.5,
-        thick_inter_9=50.0,
-        flat9_sld=4.0,
-        thick_flat_9=100.0,
-        func_inter_10=0,
-        nu_inter_10=2.5,
-        thick_inter_10=50.0,
-        flat10_sld=3.5,
-        thick_flat_10=100.0
-        )
+    n_shells=4,
+    scale=1.0,
+    solvent_sld=1.0,
+    background=0.0,
+    npts_inter=35.0,
+    func_inter_0=0,
+    nu_inter_0=2.5,
+    rad_core_0=50.0,
+    core0_sld=2.07,
+    thick_inter_0=50.0,
+    func_inter_1=0,
+    nu_inter_1=2.5,
+    thick_inter_1=50.0,
+    flat1_sld=4.0,
+    thick_flat_1=100.0,
+    func_inter_2=0,
+    nu_inter_2=2.5,
+    thick_inter_2=50.0,
+    flat2_sld=3.5,
+    thick_flat_2=100.0,
+    func_inter_3=0,
+    nu_inter_3=2.5,
+    thick_inter_3=50.0,
+    flat3_sld=4.0,
+    thick_flat_3=100.0,
+    func_inter_4=0,
+    nu_inter_4=2.5,
+    thick_inter_4=50.0,
+    flat4_sld=3.5,
+    thick_flat_4=100.0,
+    func_inter_5=0,
+    nu_inter_5=2.5,
+    thick_inter_5=50.0,
+    flat5_sld=4.0,
+    thick_flat_5=100.0,
+    func_inter_6=0,
+    nu_inter_6=2.5,
+    thick_inter_6=50.0,
+    flat6_sld=3.5,
+    thick_flat_6=100.0,
+    func_inter_7=0,
+    nu_inter_7=2.5,
+    thick_inter_7=50.0,
+    flat7_sld=4.0,
+    thick_flat_7=100.0,
+    func_inter_8=0,
+    nu_inter_8=2.5,
+    thick_inter_8=50.0,
+    flat8_sld=3.5,
+    thick_flat_8=100.0,
+    func_inter_9=0,
+    nu_inter_9=2.5,
+    thick_inter_9=50.0,
+    flat9_sld=4.0,
+    thick_flat_9=100.0,
+    func_inter_10=0,
+    nu_inter_10=2.5,
+    thick_inter_10=50.0,
+    flat10_sld=3.5,
+    thick_flat_10=100.0
+    )
 
 oldname = "SphereSLDModel"
 oldpars = dict(
-        n_shells="n_shells",
-        scale="scale",
-        npts_inter='npts_inter',
-        solvent_sld='sld_solv',
-        func_inter_0='func_inter0',
-        nu_inter_0='nu_inter0',
-        background='background',
-        rad_core_0='rad_core0',
-        core0_sld='sld_core0',
-        thick_inter_0='thick_inter0',
-        func_inter_1='func_inter1',
-        nu_inter_1='nu_inter1',
-        thick_inter_1='thick_inter1',
-        flat1_sld='sld_flat1',
-        thick_flat_1='thick_flat1',
-        func_inter_2='func_inter2',
-        nu_inter_2='nu_inter2',
-        thick_inter_2='thick_inter2',
-        flat2_sld='sld_flat2',
-        thick_flat_2='thick_flat2',
-        func_inter_3='func_inter3',
-        nu_inter_3='nu_inter3',
-        thick_inter_3='thick_inter3',
-        flat3_sld='sld_flat3',
-        thick_flat_3='thick_flat3',
-        func_inter_4='func_inter4',
-        nu_inter_4='nu_inter4',
-        thick_inter_4='thick_inter4',
-        flat4_sld='sld_flat4',
-        thick_flat_4='thick_flat4',
-        func_inter_5='func_inter5',
-        nu_inter_5='nu_inter5',
-        thick_inter_5='thick_inter5',
-        flat5_sld='sld_flat5',
-        thick_flat_5='thick_flat5',
-        func_inter_6='func_inter6',
-        nu_inter_6='nu_inter6',
-        thick_inter_6='thick_inter6',
-        flat6_sld='sld_flat6',
-        thick_flat_6='thick_flat6',
-        func_inter_7='func_inter7',
-        nu_inter_7='nu_inter7',
-        thick_inter_7='thick_inter7',
-        flat7_sld='sld_flat7',
-        thick_flat_7='thick_flat7',
-        func_inter_8='func_inter8',
-        nu_inter_8='nu_inter8',
-        thick_inter_8='thick_inter8',
-        flat8_sld='sld_flat8',
-        thick_flat_8='thick_flat8',
-        func_inter_9='func_inter9',
-        nu_inter_9='nu_inter9',
-        thick_inter_9='thick_inter9',
-        flat9_sld='sld_flat9',
-        thick_flat_9='thick_flat9',
-        func_inter_10='func_inter10',
-        nu_inter_10='nu_inter10',
-        thick_inter_10='thick_inter10',
-        flat10_sld='sld_flat10',
-        thick_flat_10='thick_flat10')
+    n_shells="n_shells",
+    scale="scale",
+    background='background',
+    npts_inter='npts_inter',
+    solvent_sld='sld_solv',
+
+    func_inter_0='func_inter0',
+    nu_inter_0='nu_inter0',
+    rad_core_0='rad_core0',
+    core0_sld='sld_core0',
+    thick_inter_0='thick_inter0',
+    func_inter_1='func_inter1',
+    nu_inter_1='nu_inter1',
+    thick_inter_1='thick_inter1',
+    flat1_sld='sld_flat1',
+    thick_flat_1='thick_flat1',
+    func_inter_2='func_inter2',
+    nu_inter_2='nu_inter2',
+    thick_inter_2='thick_inter2',
+    flat2_sld='sld_flat2',
+    thick_flat_2='thick_flat2',
+    func_inter_3='func_inter3',
+    nu_inter_3='nu_inter3',
+    thick_inter_3='thick_inter3',
+    flat3_sld='sld_flat3',
+    thick_flat_3='thick_flat3',
+    func_inter_4='func_inter4',
+    nu_inter_4='nu_inter4',
+    thick_inter_4='thick_inter4',
+    flat4_sld='sld_flat4',
+    thick_flat_4='thick_flat4',
+    func_inter_5='func_inter5',
+    nu_inter_5='nu_inter5',
+    thick_inter_5='thick_inter5',
+    flat5_sld='sld_flat5',
+    thick_flat_5='thick_flat5',
+    func_inter_6='func_inter6',
+    nu_inter_6='nu_inter6',
+    thick_inter_6='thick_inter6',
+    flat6_sld='sld_flat6',
+    thick_flat_6='thick_flat6',
+    func_inter_7='func_inter7',
+    nu_inter_7='nu_inter7',
+    thick_inter_7='thick_inter7',
+    flat7_sld='sld_flat7',
+    thick_flat_7='thick_flat7',
+    func_inter_8='func_inter8',
+    nu_inter_8='nu_inter8',
+    thick_inter_8='thick_inter8',
+    flat8_sld='sld_flat8',
+    thick_flat_8='thick_flat8',
+    func_inter_9='func_inter9',
+    nu_inter_9='nu_inter9',
+    thick_inter_9='thick_inter9',
+    flat9_sld='sld_flat9',
+    thick_flat_9='thick_flat9',
+    func_inter_10='func_inter10',
+    nu_inter_10='nu_inter10',
+    thick_inter_10='thick_inter10',
+    flat10_sld='sld_flat10',
+    thick_flat_10='thick_flat10')
 
 #TODO: Not working yet
