Index: sansmodels/src/c_extensions/core_shell.h
===================================================================
--- sansmodels/src/c_extensions/core_shell.h	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_extensions/core_shell.h	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -1,4 +1,5 @@
 #if !defined(core_shell_h)
 #define core_shell_h
+#include "parameters.hh"
 
 /**
@@ -21,36 +22,40 @@
 
 
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    ///	Core Radius [A] 60.0
-    //  [DEFAULT]=radius=60.0 [A]
-    double radius;
-    /// Shell Thickness [A] 10.0
-    //  [DEFAULT]=thickness=10 [A]
-    double thickness;
-    ///	Core SLD [1/A^(2)] 1.0e-6
-    //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)]
-    double core_sld;
-	/// Shell SLD [1/A^(2)] 2.0e-6
-	//  [DEFAULT]=shell_sld=2.0e-6 [1/A^(2)]
-	double shell_sld;
-	/// Solvent SLD [1/A^(2)] 3.0e-6
-	//  [DEFAULT]=solvent_sld=3.0e-6 [1/A^(2)]
-	double solvent_sld;
-	/// Incoherent Background [1/cm] 0.000
-	//  [DEFAULT]=background=0 [1/cm]
-	double background;
-} CoreShellParameters;
+class CoreShellModel{
+public:
+  // Model parameters
+
+  /// Core Radius [A] 60.0
+  //  [DEFAULT]=radius=60.0 [A]
+  Parameter radius;
+  /// Scale factor
+  //  [DEFAULT]=scale=1.0
+  Parameter scale;
+  /// Shell Thickness [A] 10.0
+  //  [DEFAULT]=thickness=10 [A]
+  Parameter thickness;
+  /// Core SLD [1/A^(2)] 1.0e-6
+  //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)]
+  Parameter core_sld;
+/// Shell SLD [1/A^(2)] 2.0e-6
+//  [DEFAULT]=shell_sld=2.0e-6 [1/A^(2)]
+  Parameter shell_sld;
+/// Solvent SLD [1/A^(2)] 3.0e-6
+//  [DEFAULT]=solvent_sld=3.0e-6 [1/A^(2)]
+  Parameter solvent_sld;
+/// Incoherent Background [1/cm] 0.000
+//  [DEFAULT]=background=0 [1/cm]
+  Parameter background;
+
+  // Constructor
+  CoreShellModel();
+
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double evaluate_rphi(double q, double phi);
+};
 
 
-
-/// 1D scattering function
-//double core_shell_analytical_1D(CoreShellParameters *pars, double q);
-
-/// 2D scattering function
-//double core_shell_analytical_2D(CoreShellParameters *pars, double q, double phi);
-//double core_shell_analytical_2DXY(CoreShellParameters *pars, double qx, double qy);
-
 #endif
Index: nsmodels/src/c_extensions/core_shell_cylinder.c
===================================================================
--- sansmodels/src/c_extensions/core_shell_cylinder.c	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ 	(revision )
@@ -1,115 +1,0 @@
-/**
- * Scattering model for a core-shell cylinder
- * @author: Mathieu Doucet / UTK
- */
-
-#include "core_shell_cylinder.h"
-#include "libCylinder.h"
-#include <math.h>
-#include <stdio.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the core-shell cylinder
- * @param q: q-value
- * @return: function value
- */
-double core_shell_cylinder_analytical_1D(CoreShellCylinderParameters *pars, double q) {
-	double dp[8];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->radius;
-	dp[2] = pars->thickness;
-	dp[3] = pars->length;
-	dp[4] = pars->core_sld;
-	dp[5] = pars->shell_sld;
-	dp[6] = pars->solvent_sld;
-	dp[7] = pars->background;
-
-	return CoreShellCylinder(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the core-shell cylinder
- * @param q: q-value
- * @return: function value
- */
-double core_shell_cylinder_analytical_2DXY(CoreShellCylinderParameters *pars, double qx, double qy) {
-	double q;
-	q = sqrt(qx*qx+qy*qy);
-    return core_shell_cylinder_analytical_2D_scaled(pars, q, qx/q, qy/q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the core-shell cylinder
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double core_shell_cylinder_analytical_2D(CoreShellCylinderParameters *pars, double q, double phi) {
-    return core_shell_cylinder_analytical_2D_scaled(pars, q, cos(phi), sin(phi));
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the core-shell cylinder
- * @param q: q-value
- * @param q_x: q_x / q
- * @param q_y: q_y / q
- * @return: function value
- */
-double core_shell_cylinder_analytical_2D_scaled(CoreShellCylinderParameters *pars, double q, double q_x, double q_y) {
-	double cyl_x, cyl_y, cyl_z;
-	double q_z;
-	double alpha, vol, cos_val;
-	double answer;
-	//convert angle degree to radian
-	double pi = 4.0*atan(1.0);
-	double theta = pars->axis_theta * pi/180.0;
-	double phi = pars->axis_phi * pi/180.0;
-
-    // Cylinder orientation
-    cyl_x = sin(theta) * cos(phi);
-    cyl_y = sin(theta) * sin(phi);
-    cyl_z = cos(theta);
-
-    // q vector
-    q_z = 0;
-
-    // Compute the angle btw vector q and the
-    // axis of the cylinder
-    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z;
-
-    // The following test should always pass
-    if (fabs(cos_val)>1.0) {
-    	printf("core_shell_cylinder_analytical_2D: Unexpected error: cos(alpha)=%g\n", cos_val);
-     	return 0;
-    }
-
-	alpha = acos( cos_val );
-
-	// Call the IGOR library function to get the kernel
-	answer = CoreShellCylKernel(q, pars->radius, pars->thickness,
-								pars->core_sld,pars->shell_sld,
-								pars->solvent_sld, pars->length/2.0, alpha) / fabs(sin(alpha));
-
-	//normalize by cylinder volume
-	vol=pi*(pars->radius+pars->thickness)
-			*(pars->radius+pars->thickness)
-			*(pars->length+2.0*pars->thickness);
-	answer /= vol;
-
-	//convert to [cm-1]
-	answer *= 1.0e8;
-
-	//Scale
-	answer *= pars->scale;
-
-	// add in the background
-	answer += pars->background;
-
-	return answer;
-}
Index: sansmodels/src/c_extensions/core_shell_cylinder.h
===================================================================
--- sansmodels/src/c_extensions/core_shell_cylinder.h	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_extensions/core_shell_cylinder.h	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -1,91 +1,92 @@
 #if !defined(core_shell_cylinder_h)
 #define core_shell_cylinder_h
+#include "parameters.hh"
 
 /**
  * Structure definition for core-shell cylinder parameters
  */
- //[PYTHONCLASS] = CoreShellCylinderModel
- //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi
- //[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg,  where: f(q)= 2(core_sld
+//[PYTHONCLASS] = CoreShellCylinderModel
+//[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi
+//[DESCRIPTION] = <text>P(q,alpha)= scale/Vs*f(q)^(2) + bkg,  where: f(q)= 2(core_sld
 //			- solvant_sld)* Vc*sin[qLcos(alpha/2)]
 //			/[qLcos(alpha/2)]*J1(qRsin(alpha))
- //			/[qRsin(alpha)]+2(shell_sld-solvent_sld)
- //			*Vs*sin[q(L+T)cos(alpha/2)][[q(L+T)
- //			*cos(alpha/2)]*J1(q(R+T)sin(alpha))
- //			/q(R+T)sin(alpha)]
- //
- //			alpha:is the angle between the axis of
- //          the cylinder and the q-vector
- //			Vs: the volume of the outer shell
- //			Vc: the volume of the core
- //			L: the length of the core
- //    		shell_sld: the scattering length density
- //			of the shell
- //			solvent_sld: the scattering length density
- //			of the solvent
- //			bkg: the background
- //			T: the thickness
- //    		R+T: is the outer radius
- // 		L+2T: The total length of the outershell
- //			J1: the first order Bessel function
- // 		theta: axis_theta of the cylinder
- // 		phi: the axis_phi of the cylinder...
- //		</text>
- //[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness.width</text>
- //[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width
+//			/[qRsin(alpha)]+2(shell_sld-solvent_sld)
+//			*Vs*sin[q(L+T)cos(alpha/2)][[q(L+T)
+//			*cos(alpha/2)]*J1(q(R+T)sin(alpha))
+//			/q(R+T)sin(alpha)]
+//
+//			alpha:is the angle between the axis of
+//          the cylinder and the q-vector
+//			Vs: the volume of the outer shell
+//			Vc: the volume of the core
+//			L: the length of the core
+//    		shell_sld: the scattering length density
+//			of the shell
+//			solvent_sld: the scattering length density
+//			of the solvent
+//			bkg: the background
+//			T: the thickness
+//    		R+T: is the outer radius
+// 		L+2T: The total length of the outershell
+//			J1: the first order Bessel function
+// 		theta: axis_theta of the cylinder
+// 		phi: the axis_phi of the cylinder...
+//		</text>
+//[FIXED]= <text> axis_phi.width; axis_theta.width; length.width;radius.width; thickness.width</text>
+//[ORIENTATION_PARAMS]= axis_phi; axis_theta;axis_phi.width; axis_theta.width
 
+class CoreShellCylinderModel{
+public:
+  // Model parameters
 
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
+  /// Core radius [A]
+  //  [DEFAULT]=radius=20.0 [A]
+  Parameter radius;
 
-    /// Core radius [A]
-    //  [DEFAULT]=radius=20.0 [A]
-    double radius;
+  /// Scale factor
+  //  [DEFAULT]=scale=1.0
+  Parameter scale;
 
-    /// Shell thickness [A]
-    //  [DEFAULT]=thickness=10.0 [A]
-    double thickness;
+  /// Shell thickness [A]
+  //  [DEFAULT]=thickness=10.0 [A]
+  Parameter thickness;
 
-    /// Core length [A]
-    //  [DEFAULT]=length=400.0 [A]
-    double length;
+  /// Core length [A]
+  //  [DEFAULT]=length=400.0 [A]
+  Parameter length;
 
-    /// Core SLD [1/A^(2)]
-    //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)]
-    double core_sld;
+  /// Core SLD [1/A^(2)]
+  //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)]
+  Parameter core_sld;
 
-    /// Shell SLD [1/A^(2)]
-    //  [DEFAULT]=shell_sld=4.0e-6 [1/A^(2)]
-    double shell_sld;
+  /// Shell SLD [1/A^(2)]
+  //  [DEFAULT]=shell_sld=4.0e-6 [1/A^(2)]
+  Parameter shell_sld;
 
-    /// Solvent SLD [1/A^(2)]
-    //  [DEFAULT]=solvent_sld=1.0e-6 [1/A^(2)]
-    double solvent_sld;
+  /// Solvent SLD [1/A^(2)]
+  //  [DEFAULT]=solvent_sld=1.0e-6 [1/A^(2)]
+  Parameter solvent_sld;
 
-	/// Incoherent Background [1/cm]
-	//  [DEFAULT]=background=0 [1/cm]
-	double background;
+  /// Incoherent Background [1/cm]
+  //  [DEFAULT]=background=0 [1/cm]
+  Parameter background;
 
-    /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [deg]
-    //  [DEFAULT]=axis_theta=90.0 [deg]
-    double axis_theta;
+  /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [deg]
+  //  [DEFAULT]=axis_theta=90.0 [deg]
+  Parameter axis_theta;
 
-    /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [deg]
-    //  [DEFAULT]=axis_phi=0.0 [deg]
-    double axis_phi;
+  /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [deg]
+  //  [DEFAULT]=axis_phi=0.0 [deg]
+  Parameter axis_phi;
 
-} CoreShellCylinderParameters;
+  // Constructor
+  CoreShellCylinderModel();
 
-
-
-/// 1D scattering function
-double core_shell_cylinder_analytical_1D(CoreShellCylinderParameters *pars, double q);
-
-/// 2D scattering function
-double core_shell_cylinder_analytical_2D(CoreShellCylinderParameters *pars, double q, double phi);
-double core_shell_cylinder_analytical_2DXY(CoreShellCylinderParameters *pars, double qx, double qy);
-double core_shell_cylinder_analytical_2D_scaled(CoreShellCylinderParameters *pars, double q, double q_x, double q_y);
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double evaluate_rphi(double q, double phi);
+};
 
 #endif
Index: sansmodels/src/c_extensions/corefourshell.h
===================================================================
--- sansmodels/src/c_extensions/corefourshell.h	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_extensions/corefourshell.h	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -1,84 +1,87 @@
 #if !defined(corefourshell_h)
 #define corefourshell_h
+#include "parameters.hh"
 
 /**
  * Structure definition for sphere parameters
  */
- //[PYTHONCLASS] = CoreFourShellModel
- //[DISP_PARAMS] = rad_core0, thick_shell1,thick_shell2,thick_shell3,thick_shell4
- //[DESCRIPTION] =<text> Calculates the scattering intensity from a core-4 shell structure.
- // 			scale = scale factor * volume fraction
- //				rad_core0: the radius of the core
- //				sld_core0: the SLD of the core
- //				thick_shelli: the thickness of the i'th shell from the core
- //				sld_shelli: the SLD of the i'th shell from the core
- //				sld_solv: the SLD of the solvent
- //				background: incoherent background
- //		</text>
- //[FIXED]=<text>  thick_shell4.width; thick_shell1.width;thick_shell2.width;thick_shell3.width;rad_core0.width </text>
- //[ORIENTATION_PARAMS]= <text> </text>
+//[PYTHONCLASS] = CoreFourShellModel
+//[DISP_PARAMS] = rad_core0, thick_shell1,thick_shell2,thick_shell3,thick_shell4
+//[DESCRIPTION] =<text> Calculates the scattering intensity from a core-4 shell structure.
+// 			scale = scale factor * volume fraction
+//				rad_core0: the radius of the core
+//				sld_core0: the SLD of the core
+//				thick_shelli: the thickness of the i'th shell from the core
+//				sld_shelli: the SLD of the i'th shell from the core
+//				sld_solv: the SLD of the solvent
+//				background: incoherent background
+//		</text>
+//[FIXED]=<text>  thick_shell4.width; thick_shell1.width;thick_shell2.width;thick_shell3.width;rad_core0.width </text>
+//[ORIENTATION_PARAMS]= <text> </text>
 
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale= 1.0
-    double scale;
+class CoreFourShellModel{
+public:
+  // Model parameters
+  /// Scale factor
+  //  [DEFAULT]=scale= 1.0
+  Parameter scale;
 
-    ///	Radius of the core0 [A]
-    //  [DEFAULT]=rad_core0=60. [A]
-    double rad_core0;
+  /// Radius of the core0 [A]
+  //  [DEFAULT]=rad_core0=60. [A]
+  Parameter rad_core0;
 
-    ///	sld of core0 [1/A^(2)]
-    //  [DEFAULT]=sld_core0= 6.4e-6 [1/A^(2)]
-    double sld_core0;
+  /// sld of core0 [1/A^(2)]
+  //  [DEFAULT]=sld_core0= 6.4e-6 [1/A^(2)]
+  Parameter sld_core0;
 
-    ///	thickness of the shell1 [A]
-     //  [DEFAULT]=thick_shell1=10.0 [A]
-    double thick_shell1;
+  /// thickness of the shell1 [A]
+  //  [DEFAULT]=thick_shell1=10.0 [A]
+  Parameter thick_shell1;
 
-     ///	sld of shell1 [1/A^(2)]
-     //  [DEFAULT]=sld_shell1= 1.0e-6 [1/A^(2)]
-     double sld_shell1;
+  ///  sld of shell1 [1/A^(2)]
+  //  [DEFAULT]=sld_shell1= 1.0e-6 [1/A^(2)]
+  Parameter sld_shell1;
 
-     ///	thickness of the shell2 [A]
-      //  [DEFAULT]=thick_shell2=10.0 [A]
-     double thick_shell2;
+  ///  thickness of the shell2 [A]
+  //  [DEFAULT]=thick_shell2=10.0 [A]
+  Parameter thick_shell2;
 
-      ///	sld of shell2 [1/A^(2)]
-      //  [DEFAULT]=sld_shell2= 2.0e-6 [1/A^(2)]
-      double sld_shell2;
+  /// sld of shell2 [1/A^(2)]
+  //  [DEFAULT]=sld_shell2= 2.0e-6 [1/A^(2)]
+  Parameter sld_shell2;
 
-      ///	thickness of the shell3 [A]
-       //  [DEFAULT]=thick_shell3=10.0 [A]
-      double thick_shell3;
+  /// thickness of the shell3 [A]
+  //  [DEFAULT]=thick_shell3=10.0 [A]
+  Parameter thick_shell3;
 
-       ///	sld of shell3 [1/A^(2)]
-       //  [DEFAULT]=sld_shell3= 3.0e-6 [1/A^(2)]
-       double sld_shell3;
+  ///  sld of shell3 [1/A^(2)]
+  //  [DEFAULT]=sld_shell3= 3.0e-6 [1/A^(2)]
+  Parameter sld_shell3;
 
-       ///	thickness of the shell4 [A]
-        //  [DEFAULT]=thick_shell4=10.0 [A]
-       double thick_shell4;
+  ///  thickness of the shell4 [A]
+  //  [DEFAULT]=thick_shell4=10.0 [A]
+  Parameter thick_shell4;
 
-        ///	sld of shell4 [1/A^(2)]
-        //  [DEFAULT]=sld_shell4= 4.0e-6 [1/A^(2)]
-        double sld_shell4;
+  /// sld of shell4 [1/A^(2)]
+  //  [DEFAULT]=sld_shell4= 4.0e-6 [1/A^(2)]
+  Parameter sld_shell4;
 
-    ///	sld_solv[1/A^(2)]
-    //  [DEFAULT]=sld_solv= 6.4e-6 [1/A^(2)]
-    double sld_solv;
+  /// sld_solv[1/A^(2)]
+  //  [DEFAULT]=sld_solv= 6.4e-6 [1/A^(2)]
+  Parameter sld_solv;
 
-	/// Incoherent Background [1/cm]
-	//  [DEFAULT]=background=0.001 [1/cm]
-	double background;
-} CoreFourShellParameters;
+  /// Incoherent Background [1/cm]
+  //  [DEFAULT]=background=0.001 [1/cm]
+  Parameter background;
 
+  // Constructor
+  CoreFourShellModel();
 
-
-/// 1D scattering function
-//double corefourshell_analytical_1D(CoreFourShellParameters *pars, double q);
-
-/// 2D scattering function
-//double corefourshell_analytical_2D(CoreFourShellParameters *pars, double q, double phi);
-//double corefourshell_analytical_2DXY(CoreFourShellParameters *pars, double qx, double qy);
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double evaluate_rphi(double q, double phi);
+};
 
 #endif
Index: nsmodels/src/c_extensions/ellipsoid.c
===================================================================
--- sansmodels/src/c_extensions/ellipsoid.c	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ 	(revision )
@@ -1,140 +1,0 @@
-/**
- * Scattering model for an ellipsoid
- * @author: Mathieu Doucet / UTK
- */
-
-#include "ellipsoid.h"
-#include "libCylinder.h"
-#include <math.h>
-#include <stdio.h>
-
-/**
- * Test kernel for validation
- *
- * @param q: q-value
- * @param r_small: small axis length
- * @param r_long: rotation axis length
- * @param angle: angle between rotation axis and q vector
- * @return: oriented kernel value
- */
-double kernel(double q, double r_small, double r_long, double angle) {
-	double length;
-	double sin_alpha;
-	double cos_alpha;
-	double sph_func;
-
-	sin_alpha = sin(angle);
-	cos_alpha = cos(angle);
-
-	// Modified length for phase
-	length = r_small*sqrt(sin_alpha*sin_alpha +
-			r_long*r_long/(r_small*r_small)*cos_alpha*cos_alpha);
-
-	// Spherical scattering ampliture, with modified length for ellipsoid
-	sph_func = 3.0*( sin(q*length) - q*length*cos(q*length) ) / (q*q*q*length*length*length);
-
-	return sph_func*sph_func;
-}
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the ellipsoid
- * @param q: q-value
- * @return: function value
- */
-double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q) {
-	double dp[6];
-
-	dp[0] = pars->scale;
-	dp[1] = pars->radius_a;
-	dp[2] = pars->radius_b;
-	dp[3] = pars->sldEll;
-	dp[4] = pars->sldSolv;
-	dp[5] = pars->background;
-
-	return EllipsoidForm(dp, q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the ellipsoid
- * @param q: q-value
- * @return: function value
- */
-double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy) {
-	double q;
-	q = sqrt(qx*qx+qy*qy);
-    return ellipsoid_analytical_2D_scaled(pars, q, qx/q, qy/q);
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the ellipsoid
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double ellipsoid_analytical_2D(EllipsoidParameters *pars, double q, double phi) {
-    return ellipsoid_analytical_2D_scaled(pars, q, cos(phi), sin(phi));
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the ellipsoid
- * @param q: q-value
- * @param q_x: q_x / q
- * @param q_y: q_y / q
- * @return: function value
- */
-double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y) {
-	double cyl_x, cyl_y, cyl_z;
-	double q_z;
-	double alpha, vol, cos_val;
-	double answer;
-	//convert angle degree to radian
-	double pi = 4.0*atan(1.0);
-	double theta = pars->axis_theta * pi/180.0;
-	double phi = pars->axis_phi * pi/180.0;
-
-    // Ellipsoid orientation
-    cyl_x = sin(theta) * cos(phi);
-    cyl_y = sin(theta) * sin(phi);
-    cyl_z = cos(theta);
-
-    // q vector
-    q_z = 0.0;
-
-    // Compute the angle btw vector q and the
-    // axis of the cylinder
-    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z;
-
-    // The following test should always pass
-    if (fabs(cos_val)>1.0) {
-    	printf("ellipsoid_ana_2D: Unexpected error: cos(alpha)>1\n");
-     	return 0;
-    }
-
-    // Angle between rotation axis and q vector
-	alpha = acos( cos_val );
-
-	// Call the IGOR library function to get the kernel
-	answer = EllipsoidKernel(q, pars->radius_b, pars->radius_a, cos_val);
-
-	// Multiply by contrast^2
-	answer *= (pars->sldEll - pars->sldSolv) * (pars->sldEll - pars->sldSolv);
-
-	//normalize by cylinder volume
-    vol = 4.0/3.0 * acos(-1.0) * pars->radius_b * pars->radius_b * pars->radius_a;
-	answer *= vol;
-
-	//convert to [cm-1]
-	answer *= 1.0e8;
-
-	//Scale
-	answer *= pars->scale;
-
-	// add in the background
-	answer += pars->background;
-
-	return answer;
-}
Index: sansmodels/src/c_extensions/ellipsoid.h
===================================================================
--- sansmodels/src/c_extensions/ellipsoid.h	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_extensions/ellipsoid.h	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -1,4 +1,5 @@
 #if !defined(ellipsoid_h)
 #define ellipsoid_h
+#include "parameters.hh"
 
 /**
@@ -7,72 +8,73 @@
  * Ref: Jan Skov Pedersen, Advances in Colloid and Interface Science, 70 (1997) 171-210
  */
- //[PYTHONCLASS] = EllipsoidModel
- //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi
- //[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(sld_ell
- //		- sld_solvent)*V*[sin(q*r(Ra,Rb,alpha))
- //		-q*r*cos(qr(Ra,Rb,alpha))]
- //		/[qr(Ra,Rb,alpha)]^(3)"
- //
- //     r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2)
- //     + Ra^(2)*(cos(alpha))^(2)]^(1/2)
- //
- //		scatter_sld: SLD of the scatter
- //		solvent_sld: SLD of the solvent
- //     sldEll: SLD of ellipsoid
- //		sldSolv: SLD of solvent
- //		V: volune of the Eliipsoid
- //		Ra: radius along the rotation axis
- //		of the Ellipsoid
- //		Rb: radius perpendicular to the
- //		rotation axis of the ellipsoid
- //		</text>
- //[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width;
- //radius_b.width; length.width; r_minor.width;
- //r_ratio.width</text>
- //[ORIENTATION_PARAMS]=  axis_phi.width; axis_theta.width;axis_phi; axis_theta
+//[PYTHONCLASS] = EllipsoidModel
+//[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi
+//[DESCRIPTION] = <text>"P(q.alpha)= scale*f(q)^(2)+ bkg, where f(q)= 3*(sld_ell
+//		- sld_solvent)*V*[sin(q*r(Ra,Rb,alpha))
+//		-q*r*cos(qr(Ra,Rb,alpha))]
+//		/[qr(Ra,Rb,alpha)]^(3)"
+//
+//     r(Ra,Rb,alpha)= [Rb^(2)*(sin(alpha))^(2)
+//     + Ra^(2)*(cos(alpha))^(2)]^(1/2)
+//
+//		scatter_sld: SLD of the scatter
+//		solvent_sld: SLD of the solvent
+//     sldEll: SLD of ellipsoid
+//		sldSolv: SLD of solvent
+//		V: volune of the Eliipsoid
+//		Ra: radius along the rotation axis
+//		of the Ellipsoid
+//		Rb: radius perpendicular to the
+//		rotation axis of the ellipsoid
+//		</text>
+//[FIXED]= <text> axis_phi.width; axis_theta.width;radius_a.width;
+//radius_b.width; length.width; r_minor.width;
+//r_ratio.width</text>
+//[ORIENTATION_PARAMS]=  axis_phi.width; axis_theta.width;axis_phi; axis_theta
+
+class EllipsoidModel{
+public:
+  // Model parameters
+  /// Rotation axis radius_a [A]
+  //  [DEFAULT]=radius_a=20.0 [A]
+  Parameter radius_a;
+
+  /// Scale factor
+  //  [DEFAULT]=scale=1.0
+  Parameter scale;
+
+  /// Radius_b [A]
+  //  [DEFAULT]=radius_b=400 [A]
+  Parameter radius_b;
+
+  /// sldEll [1/A^(2)]
+  //  [DEFAULT]=sldEll=4.0e-6 [1/A^(2)]
+  Parameter sldEll;
+
+  /// sld of solvent [1/A^(2)]
+  //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)]
+  Parameter sldSolv;
+
+  /// Incoherent Background [1/cm]
+  //  [DEFAULT]=background=0 [1/cm]
+  Parameter background;
+
+  /// Orientation of the long axis of the ellipsoid w/respect incoming beam [deg]
+  //  [DEFAULT]=axis_theta=90.0 [deg]
+  Parameter axis_theta;
+  /// Orientation of the long axis of the ellipsoid in the plane of the detector [deg]
+  //  [DEFAULT]=axis_phi=0.0 [deg]
+  Parameter axis_phi;
+
+  // Constructor
+  EllipsoidModel();
+
+  // Operators to get I(Q)
+  double operator()(double q);
+  double operator()(double qx, double qy);
+  double calculate_ER();
+  double evaluate_rphi(double q, double phi);
+};
 
 
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
-
-    ///	Rotation axis radius_a [A]
-    //  [DEFAULT]=radius_a=20.0 [A]
-    double radius_a;
-
-    /// Radius_b [A]
-    //  [DEFAULT]=radius_b=400 [A]
-    double radius_b;
-
-    ///	sldEll [1/A^(2)]
-    //  [DEFAULT]=sldEll=4.0e-6 [1/A^(2)]
-    double sldEll;
-
-    ///	sld of solvent [1/A^(2)]
-    //  [DEFAULT]=sldSolv=1.0e-6 [1/A^(2)]
-    double sldSolv;
-
-	/// Incoherent Background [1/cm]
-	//  [DEFAULT]=background=0 [1/cm]
-	double background;
-
-    /// Orientation of the long axis of the ellipsoid w/respect incoming beam [deg]
-    //  [DEFAULT]=axis_theta=90.0 [deg]
-    double axis_theta;
-    /// Orientation of the long axis of the ellipsoid in the plane of the detector [deg]
-    //  [DEFAULT]=axis_phi=0.0 [deg]
-    double axis_phi;
-} EllipsoidParameters;
-
-
-
-/// 1D scattering function
-double ellipsoid_analytical_1D(EllipsoidParameters *pars, double q);
-
-/// 2D scattering function
-double ellipsoid_analytical_2D(EllipsoidParameters *pars, double q, double phi);
-double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy);
-double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y);
-
 #endif
Index: sansmodels/src/c_models/corefourshell.cpp
===================================================================
--- sansmodels/src/c_models/corefourshell.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_models/corefourshell.cpp	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -21,13 +21,28 @@
 
 #include <math.h>
-#include "models.hh"
 #include "parameters.hh"
 #include <stdio.h>
 using namespace std;
+#include "corefourshell.h"
 
 extern "C" {
 	#include "libSphere.h"
-	#include "corefourshell.h"
-}
+}
+
+typedef struct {
+  double scale;
+  double rad_core0;
+  double sld_core0;
+  double thick_shell1;
+  double sld_shell1;
+  double thick_shell2;
+  double sld_shell2;
+  double thick_shell3;
+  double sld_shell3;
+  double thick_shell4;
+  double sld_shell4;
+  double sld_solv;
+  double background;
+} CoreFourShellParameters;
 
 CoreFourShellModel :: CoreFourShellModel() {
Index: sansmodels/src/c_models/coreshellcylinder.cpp
===================================================================
--- sansmodels/src/c_models/coreshellcylinder.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_models/coreshellcylinder.cpp	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -18,18 +18,104 @@
  *   sansmodels/src/libigor
  *
- *	TODO: refactor so that we pull in the old sansmodels.c_extensions
  */
 
 #include <math.h>
-#include "models.hh"
 #include "parameters.hh"
 #include <stdio.h>
 using namespace std;
+#include "core_shell_cylinder.h"
 
 extern "C" {
 	#include "libCylinder.h"
 	#include "libStructureFactor.h"
-	#include "core_shell_cylinder.h"
-}
+}
+
+typedef struct {
+  double scale;
+  double radius;
+  double thickness;
+  double length;
+  double core_sld;
+  double shell_sld;
+  double solvent_sld;
+  double background;
+  double axis_theta;
+  double axis_phi;
+} CoreShellCylinderParameters;
+
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the core-shell cylinder
+ * @param q: q-value
+ * @param q_x: q_x / q
+ * @param q_y: q_y / q
+ * @return: function value
+ */
+static double core_shell_cylinder_analytical_2D_scaled(CoreShellCylinderParameters *pars, double q, double q_x, double q_y) {
+  double cyl_x, cyl_y, cyl_z;
+  double q_z;
+  double alpha, vol, cos_val;
+  double answer;
+  //convert angle degree to radian
+  double pi = 4.0*atan(1.0);
+  double theta = pars->axis_theta * pi/180.0;
+  double phi = pars->axis_phi * pi/180.0;
+
+    // Cylinder orientation
+    cyl_x = sin(theta) * cos(phi);
+    cyl_y = sin(theta) * sin(phi);
+    cyl_z = cos(theta);
+
+    // q vector
+    q_z = 0;
+
+    // Compute the angle btw vector q and the
+    // axis of the cylinder
+    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z;
+
+    // The following test should always pass
+    if (fabs(cos_val)>1.0) {
+      printf("core_shell_cylinder_analytical_2D: Unexpected error: cos(alpha)=%g\n", cos_val);
+      return 0;
+    }
+
+  alpha = acos( cos_val );
+
+  // Call the IGOR library function to get the kernel
+  answer = CoreShellCylKernel(q, pars->radius, pars->thickness,
+                pars->core_sld,pars->shell_sld,
+                pars->solvent_sld, pars->length/2.0, alpha) / fabs(sin(alpha));
+
+  //normalize by cylinder volume
+  vol=pi*(pars->radius+pars->thickness)
+      *(pars->radius+pars->thickness)
+      *(pars->length+2.0*pars->thickness);
+  answer /= vol;
+
+  //convert to [cm-1]
+  answer *= 1.0e8;
+
+  //Scale
+  answer *= pars->scale;
+
+  // add in the background
+  answer += pars->background;
+
+  return answer;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the core-shell cylinder
+ * @param q: q-value
+ * @return: function value
+ */
+static double core_shell_cylinder_analytical_2DXY(CoreShellCylinderParameters *pars, double qx, double qy) {
+  double q;
+  q = sqrt(qx*qx+qy*qy);
+    return core_shell_cylinder_analytical_2D_scaled(pars, q, qx/q, qy/q);
+}
+
 
 CoreShellCylinderModel :: CoreShellCylinderModel() {
Index: sansmodels/src/c_models/coreshellsphere.cpp
===================================================================
--- sansmodels/src/c_models/coreshellsphere.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_models/coreshellsphere.cpp	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -21,24 +21,33 @@
 
 #include <math.h>
-#include "models.hh"
 #include "parameters.hh"
 #include <stdio.h>
 using namespace std;
+#include "core_shell.h"
 
 extern "C" {
-	#include "libSphere.h"
-	#include "core_shell.h"
+#include "libSphere.h"
 }
 
+typedef struct {
+  double scale;
+  double radius;
+  double thickness;
+  double core_sld;
+  double shell_sld;
+  double solvent_sld;
+  double background;
+} CoreShellParameters;
+
 CoreShellModel :: CoreShellModel() {
-	scale      = Parameter(1.0);
-	radius     = Parameter(60.0, true);
-	radius.set_min(0.0);
-	thickness  = Parameter(10.0, true);
-	thickness.set_min(0.0);
-	core_sld   = Parameter(1.e-6);
-	shell_sld  = Parameter(2.e-6);
-	solvent_sld = Parameter(3.e-6);
-	background = Parameter(0.0);
+  scale      = Parameter(1.0);
+  radius     = Parameter(60.0, true);
+  radius.set_min(0.0);
+  thickness  = Parameter(10.0, true);
+  thickness.set_min(0.0);
+  core_sld   = Parameter(1.e-6);
+  shell_sld  = Parameter(2.e-6);
+  solvent_sld = Parameter(3.e-6);
+  background = Parameter(0.0);
 }
 
@@ -50,55 +59,55 @@
  */
 double CoreShellModel :: operator()(double q) {
-	double dp[7];
+  double dp[7];
 
-	// Fill parameter array for IGOR library
-	// Add the background after averaging
+  // Fill parameter array for IGOR library
+  // Add the background after averaging
 
-	dp[0] = scale();
-	dp[1] = radius();
-	dp[2] = thickness();
-	dp[3] = core_sld();
-	dp[4] = shell_sld();
-	dp[5] = solvent_sld();
-	dp[6] = 0.0;
+  dp[0] = scale();
+  dp[1] = radius();
+  dp[2] = thickness();
+  dp[3] = core_sld();
+  dp[4] = shell_sld();
+  dp[5] = solvent_sld();
+  dp[6] = 0.0;
 
 
-	// Get the dispersion points for the radius
-	vector<WeightPoint> weights_rad;
-	radius.get_weights(weights_rad);
+  // Get the dispersion points for the radius
+  vector<WeightPoint> weights_rad;
+  radius.get_weights(weights_rad);
 
-	// Get the dispersion points for the thickness
-	vector<WeightPoint> weights_thick;
-	thickness.get_weights(weights_thick);
+  // Get the dispersion points for the thickness
+  vector<WeightPoint> weights_thick;
+  thickness.get_weights(weights_thick);
 
-	// Perform the computation, with all weight points
-	double sum = 0.0;
-	double norm = 0.0;
-	double vol = 0.0;
+  // Perform the computation, with all weight points
+  double sum = 0.0;
+  double norm = 0.0;
+  double vol = 0.0;
 
-	// Loop over radius weight points
-	for(size_t i=0; i<weights_rad.size(); i++) {
-		dp[1] = weights_rad[i].value;
+  // Loop over radius weight points
+  for(size_t i=0; i<weights_rad.size(); i++) {
+    dp[1] = weights_rad[i].value;
 
-		// Loop over thickness weight points
-		for(size_t j=0; j<weights_thick.size(); j++) {
-			dp[2] = weights_thick[j].value;
-			//Un-normalize SphereForm by volume
-			sum += weights_rad[i].weight
-				* weights_thick[j].weight * CoreShellForm(dp, q)* pow(weights_rad[i].value+weights_thick[j].value,3);
+    // Loop over thickness weight points
+    for(size_t j=0; j<weights_thick.size(); j++) {
+      dp[2] = weights_thick[j].value;
+      //Un-normalize SphereForm by volume
+      sum += weights_rad[i].weight
+          * weights_thick[j].weight * CoreShellForm(dp, q)* pow(weights_rad[i].value+weights_thick[j].value,3);
 
-			//Find average volume
-			vol += weights_rad[i].weight * weights_thick[j].weight
-				* pow(weights_rad[i].value+weights_thick[j].value,3);
-			norm += weights_rad[i].weight
-				* weights_thick[j].weight;
-		}
-	}
+      //Find average volume
+      vol += weights_rad[i].weight * weights_thick[j].weight
+          * pow(weights_rad[i].value+weights_thick[j].value,3);
+      norm += weights_rad[i].weight
+          * weights_thick[j].weight;
+    }
+  }
 
-	if (vol != 0.0 && norm != 0.0) {
-		//Re-normalize by avg volume
-		sum = sum/(vol/norm);}
+  if (vol != 0.0 && norm != 0.0) {
+    //Re-normalize by avg volume
+    sum = sum/(vol/norm);}
 
-	return sum/norm + background();
+  return sum/norm + background();
 }
 
@@ -110,6 +119,6 @@
  */
 double CoreShellModel :: operator()(double qx, double qy) {
-	double q = sqrt(qx*qx + qy*qy);
-	return (*this).operator()(q);
+  double q = sqrt(qx*qx + qy*qy);
+  return (*this).operator()(q);
 }
 
@@ -122,5 +131,5 @@
  */
 double CoreShellModel :: evaluate_rphi(double q, double phi) {
-	return (*this).operator()(q);
+  return (*this).operator()(q);
 }
 /**
@@ -129,41 +138,41 @@
  */
 double CoreShellModel :: calculate_ER() {
-	CoreShellParameters dp;
+  CoreShellParameters dp;
 
-	dp.radius     = radius();
-	dp.thickness  = thickness();
+  dp.radius     = radius();
+  dp.thickness  = thickness();
 
-	double rad_out = 0.0;
+  double rad_out = 0.0;
 
-	// Perform the computation, with all weight points
-	double sum = 0.0;
-	double norm = 0.0;
+  // Perform the computation, with all weight points
+  double sum = 0.0;
+  double norm = 0.0;
 
 
-	// Get the dispersion points for the major shell
-	vector<WeightPoint> weights_thickness;
-	thickness.get_weights(weights_thickness);
+  // Get the dispersion points for the major shell
+  vector<WeightPoint> weights_thickness;
+  thickness.get_weights(weights_thickness);
 
-	// Get the dispersion points for the minor shell
-	vector<WeightPoint> weights_radius ;
-	radius.get_weights(weights_radius);
+  // Get the dispersion points for the minor shell
+  vector<WeightPoint> weights_radius ;
+  radius.get_weights(weights_radius);
 
-	// Loop over major shell weight points
-	for(int j=0; j< (int)weights_thickness.size(); j++) {
-		dp.thickness = weights_thickness[j].value;
-		for(int k=0; k< (int)weights_radius.size(); k++) {
-			dp.radius = weights_radius[k].value;
-			sum += weights_thickness[j].weight
-				* weights_radius[k].weight*(dp.radius+dp.thickness);
-			norm += weights_thickness[j].weight* weights_radius[k].weight;
-		}
-	}
-	if (norm != 0){
-		//return the averaged value
-		rad_out =  sum/norm;}
-	else{
-		//return normal value
-		rad_out = (dp.radius+dp.thickness);}
+  // Loop over major shell weight points
+  for(int j=0; j< (int)weights_thickness.size(); j++) {
+    dp.thickness = weights_thickness[j].value;
+    for(int k=0; k< (int)weights_radius.size(); k++) {
+      dp.radius = weights_radius[k].value;
+      sum += weights_thickness[j].weight
+          * weights_radius[k].weight*(dp.radius+dp.thickness);
+      norm += weights_thickness[j].weight* weights_radius[k].weight;
+    }
+  }
+  if (norm != 0){
+    //return the averaged value
+    rad_out =  sum/norm;}
+  else{
+    //return normal value
+    rad_out = (dp.radius+dp.thickness);}
 
-	return rad_out;
+  return rad_out;
 }
Index: sansmodels/src/c_models/ellipsoid.cpp
===================================================================
--- sansmodels/src/c_models/ellipsoid.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_models/ellipsoid.cpp	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -18,17 +18,99 @@
  *   sansmodels/src/libigor
  *
- *	TODO: refactor so that we pull in the old sansmodels.c_extensions
  */
 
 #include <math.h>
-#include "models.hh"
 #include "parameters.hh"
 #include <stdio.h>
 using namespace std;
+#include "ellipsoid.h"
 
 extern "C" {
 	#include "libCylinder.h"
 	#include "libStructureFactor.h"
-	#include "ellipsoid.h"
+}
+
+typedef struct {
+  double scale;
+  double radius_a;
+  double radius_b;
+  double sldEll;
+  double sldSolv;
+  double background;
+  double axis_theta;
+  double axis_phi;
+} EllipsoidParameters;
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the ellipsoid
+ * @param q: q-value
+ * @param q_x: q_x / q
+ * @param q_y: q_y / q
+ * @return: function value
+ */
+static double ellipsoid_analytical_2D_scaled(EllipsoidParameters *pars, double q, double q_x, double q_y) {
+  double cyl_x, cyl_y, cyl_z;
+  double q_z;
+  double alpha, vol, cos_val;
+  double answer;
+  //convert angle degree to radian
+  double pi = 4.0*atan(1.0);
+  double theta = pars->axis_theta * pi/180.0;
+  double phi = pars->axis_phi * pi/180.0;
+
+    // Ellipsoid orientation
+    cyl_x = sin(theta) * cos(phi);
+    cyl_y = sin(theta) * sin(phi);
+    cyl_z = cos(theta);
+
+    // q vector
+    q_z = 0.0;
+
+    // Compute the angle btw vector q and the
+    // axis of the cylinder
+    cos_val = cyl_x*q_x + cyl_y*q_y + cyl_z*q_z;
+
+    // The following test should always pass
+    if (fabs(cos_val)>1.0) {
+      printf("ellipsoid_ana_2D: Unexpected error: cos(alpha)>1\n");
+      return 0;
+    }
+
+    // Angle between rotation axis and q vector
+  alpha = acos( cos_val );
+
+  // Call the IGOR library function to get the kernel
+  answer = EllipsoidKernel(q, pars->radius_b, pars->radius_a, cos_val);
+
+  // Multiply by contrast^2
+  answer *= (pars->sldEll - pars->sldSolv) * (pars->sldEll - pars->sldSolv);
+
+  //normalize by cylinder volume
+    vol = 4.0/3.0 * acos(-1.0) * pars->radius_b * pars->radius_b * pars->radius_a;
+  answer *= vol;
+
+  //convert to [cm-1]
+  answer *= 1.0e8;
+
+  //Scale
+  answer *= pars->scale;
+
+  // add in the background
+  answer += pars->background;
+
+  return answer;
+}
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the ellipsoid
+ * @param q: q-value
+ * @return: function value
+ */
+static double ellipsoid_analytical_2DXY(EllipsoidParameters *pars, double qx, double qy) {
+  double q;
+  q = sqrt(qx*qx+qy*qy);
+    return ellipsoid_analytical_2D_scaled(pars, q, qx/q, qy/q);
 }
 
Index: sansmodels/src/c_models/models.hh
===================================================================
--- sansmodels/src/c_models/models.hh	(revision 0ba3b08c35684feff124c0657dad569d13717a18)
+++ sansmodels/src/c_models/models.hh	(revision 011e0e4569d018a5f39b70032285911f67750383)
@@ -27,100 +27,4 @@
 using namespace std;
 
-
-
-class CoreShellModel{
-public:
-	// Model parameters
-	Parameter radius;
-	Parameter scale;
-	Parameter thickness;
-	Parameter core_sld;
-	Parameter shell_sld;
-	Parameter solvent_sld;
-	Parameter background;
-
-	// Constructor
-	CoreShellModel();
-
-	// Operators to get I(Q)
-	double operator()(double q);
-	double operator()(double qx, double qy);
-	double calculate_ER();
-	double evaluate_rphi(double q, double phi);
-};
-
-class CoreFourShellModel{
-public:
-	// Model parameters
-	Parameter scale;
-	Parameter rad_core0;
-	Parameter sld_core0;
-	Parameter thick_shell1;
-	Parameter sld_shell1;
-	Parameter thick_shell2;
-	Parameter sld_shell2;
-	Parameter thick_shell3;
-	Parameter sld_shell3;
-	Parameter thick_shell4;
-	Parameter sld_shell4;
-	Parameter sld_solv;
-	Parameter background;
-
-	// Constructor
-	CoreFourShellModel();
-
-	// Operators to get I(Q)
-	double operator()(double q);
-	double operator()(double qx, double qy);
-	double calculate_ER();
-	double evaluate_rphi(double q, double phi);
-};
-
-class CoreShellCylinderModel{
-public:
-	// Model parameters
-	Parameter radius;
-	Parameter scale;
-	Parameter thickness;
-	Parameter length;
-	Parameter core_sld;
-	Parameter shell_sld;
-	Parameter solvent_sld;
-	Parameter background;
-	Parameter axis_theta;
-	Parameter axis_phi;
-
-	// Constructor
-	CoreShellCylinderModel();
-
-	// Operators to get I(Q)
-	double operator()(double q);
-	double operator()(double qx, double qy);
-	double calculate_ER();
-	double evaluate_rphi(double q, double phi);
-};
-
-class EllipsoidModel{
-public:
-	// Model parameters
-	Parameter radius_a;
-	Parameter scale;
-	Parameter radius_b;
-	Parameter sldEll;
-	Parameter sldSolv;
-	Parameter background;
-	Parameter axis_theta;
-	Parameter axis_phi;
-
-	// Constructor
-	EllipsoidModel();
-
-	// Operators to get I(Q)
-	double operator()(double q);
-	double operator()(double qx, double qy);
-	double calculate_ER();
-	double evaluate_rphi(double q, double phi);
-};
-
 class EllipticalCylinderModel{
 public:
