Index: sansmodels/src/c_extensions/csparallelepiped.c
===================================================================
--- sansmodels/src/c_extensions/csparallelepiped.c	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ 	(revision )
@@ -1,243 +1,0 @@
-/**
- * Scattering model for a csparallelepiped
- */
-
-#include "csparallelepiped.h"
-#include <math.h>
-#include "libCylinder.h"
-#include <stdio.h>
-#include <stdlib.h>
-
-
-/**
- * Function to evaluate 1D scattering function
- * @param pars: parameters of the CSparallelepiped
- * @param q: q-value
- * @return: function value
- */
-double csparallelepiped_analytical_1D(CSParallelepipedParameters *pars, double q) {
-	double dp[13];
-
-	// Fill paramater array
-	dp[0] = pars->scale;
-	dp[1] = pars->shortA;
-	dp[2] = pars->midB;
-	dp[3] = pars->longC;
-	dp[4] = pars->rimA;
-	dp[5] = pars->rimB;
-	dp[6] = pars->rimC;
-	dp[7] = pars->sld_rimA;
-	dp[8] = pars->sld_rimB;
-	dp[9] = pars->sld_rimC;
-	dp[10] = pars->sld_pcore;
-	dp[11] = pars->sld_solv;
-	dp[12] = pars->background;
-
-	// Call library function to evaluate model
-	//ToDo: Correct this 1d model, CSParallelepiped in libigor (2D corrected).
-	return CSParallelepiped(dp, q);
-}
-
-
-double cspkernel(double dp[],double q, double ala, double alb, double alc){
-    // mu passed in is really mu*sqrt(1-sig^2)
-    double argA,argB,argC,argtA,argtB,argtC,tmp1,tmp2,tmp3,tmpt1,tmpt2,tmpt3;			//local variables
-
-	double aa,bb,cc, ta,tb,tc;
-	double Vin,Vot,V1,V2,V3;
-	double rhoA,rhoB,rhoC, rhoP, rhosolv;
-	double dr0, drA,drB, drC;
-	double retVal;
-
-	aa = dp[1];
-	bb = dp[2];
-	cc = dp[3];
-	ta = dp[4];
-	tb = dp[5];
-	tc = dp[6];
-	rhoA=dp[7];
-	rhoB=dp[8];
-	rhoC=dp[9];
-	rhoP=dp[10];
-	rhosolv=dp[11];
-	dr0=rhoP-rhosolv;
-	drA=rhoA-rhosolv;
-	drB=rhoB-rhosolv;
-	drC=rhoC-rhosolv;
-	Vin=(aa*bb*cc);
-	Vot=(aa*bb*cc+2.0*ta*bb*cc+2.0*aa*tb*cc+2.0*aa*bb*tc);
-	V1=(2.0*ta*bb*cc);   //  incorrect V1 (aa*bb*cc+2*ta*bb*cc)
-	V2=(2.0*aa*tb*cc);  // incorrect V2(aa*bb*cc+2*aa*tb*cc)
-	V3=(2.0*aa*bb*tc);
-	//aa = aa/bb;
-	ta=(aa+2.0*ta);///bb;
-	tb=(aa+2.0*tb);///bb;
-	tc=(aa+2.0*tc);
-    //handle arg=0 separately, as sin(t)/t -> 1 as t->0
-    argA = q*aa*ala/2.0;
-    argB = q*bb*alb/2.0;
-    argC = q*cc*alc/2.0;
-    argtA = q*ta*ala/2.0;
-	argtB = q*tb*alb/2.0;
-	argtC = q*tc*alc/2.0;
-
-    if(argA==0.0) {
-		tmp1 = 1.0;
-	} else {
-		tmp1 = sin(argA)/argA;
-    }
-    if (argB==0.0) {
-		tmp2 = 1.0;
-	} else {
-		tmp2 = sin(argB)/argB;
-    }
-
-    if (argC==0.0) {
-		tmp3 = 1.0;
-	} else {
-		tmp3 = sin(argC)/argC;
-    }
-    if(argtA==0.0) {
-		tmpt1 = 1.0;
-	} else {
-		tmpt1 = sin(argtA)/argtA;
-    }
-    if (argtB==0.0) {
-		tmpt2 = 1.0;
-	} else {
-		tmpt2 = sin(argtB)/argtB;
-    }
-    if (argtC==0.0) {
-		tmpt3 = 1.0;
-	} else {
-		tmpt3 = sin(argtC)*sin(argtC)/argtC/argtC;
-    }
-    // This expression is different from NIST/IGOR package (I strongly believe the IGOR is wrong!!!). 10/15/2010.
-    retVal =( dr0*tmp1*tmp2*tmp3*Vin + drA*(tmpt1-tmp1)*tmp2*tmp3*V1+ drB*tmp1*(tmpt2-tmp2)*tmp3*V2 + drC*tmp1*tmp2*(tmpt3-tmp3)*V3)*
-				( dr0*tmp1*tmp2*tmp3*Vin + drA*(tmpt1-tmp1)*tmp2*tmp3*V1+ drB*tmp1*(tmpt2-tmp2)*tmp3*V2 + drC*tmp1*tmp2*(tmpt3-tmp3)*V3);   //  correct FF : square of sum of phase factors
-    //retVal *= (tmp3*tmp3);
-    retVal /= Vot;
-
-    return (retVal);
-
-}//Function cspkernel()
-
-
-
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the CSparallelepiped
- * @param q: q-value
- * @return: function value
- */
-double csparallelepiped_analytical_2DXY(CSParallelepipedParameters *pars, double qx, double qy) {
-	double q;
-	q = sqrt(qx*qx+qy*qy);
-    return csparallelepiped_analytical_2D_scaled(pars, q, qx/q, qy/q);
-}
-
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the CSParallelepiped
- * @param q: q-value
- * @param phi: angle phi
- * @return: function value
- */
-double csparallelepiped_analytical_2D(CSParallelepipedParameters *pars, double q, double phi) {
-    return csparallelepiped_analytical_2D_scaled(pars, q, cos(phi), sin(phi));
-}
-
-/**
- * Function to evaluate 2D scattering function
- * @param pars: parameters of the CSparallelepiped
- * @param q: q-value
- * @param q_x: q_x / q
- * @param q_y: q_y / q
- * @return: function value
- */
-double csparallelepiped_analytical_2D_scaled(CSParallelepipedParameters *pars, double q, double q_x, double q_y) {
-	double dp[13];
-  double cparallel_x, cparallel_y, cparallel_z, bparallel_x, bparallel_y, parallel_x, parallel_y;
-  double q_z;
-  double alpha, cos_val_c, cos_val_b, cos_val_a, edgeA, edgeB, edgeC;
-
-  double answer;
-  //convert angle degree to radian
-  double pi = 4.0*atan(1.0);
-  double theta = pars->parallel_theta * pi/180.0;
-  double phi = pars->parallel_phi * pi/180.0;
-  double psi = pars->parallel_psi* pi/180.0;
-
-	// Fill paramater array
-	dp[0] = 1.0;
-	dp[1] = pars->shortA;
-	dp[2] = pars->midB;
-	dp[3] = pars->longC;
-	dp[4] = pars->rimA;
-	dp[5] = pars->rimB;
-	dp[6] = pars->rimC;
-	dp[7] = pars->sld_rimA;
-	dp[8] = pars->sld_rimB;
-	dp[9] = pars->sld_rimC;
-	dp[10] = pars->sld_pcore;
-	dp[11] = pars->sld_solv;
-	dp[12] = 0.0;
-
-
-	edgeA = pars->shortA;
-	edgeB = pars->midB;
-	edgeC = pars->longC;
-
-
-    // parallelepiped c axis orientation
-    cparallel_x = sin(theta) * cos(phi);
-    cparallel_y = sin(theta) * sin(phi);
-    cparallel_z = cos(theta);
-
-    // q vector
-    q_z = 0.0;
-
-    // Compute the angle btw vector q and the
-    // axis of the parallelepiped
-    cos_val_c = cparallel_x*q_x + cparallel_y*q_y + cparallel_z*q_z;
-    alpha = acos(cos_val_c);
-
-    // parallelepiped a axis orientation
-    parallel_x = sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi);
-    parallel_y = cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi);
-
-    cos_val_a = parallel_x*q_x + parallel_y*q_y;
-
-
-
-    // parallelepiped b axis orientation
-    bparallel_x = sqrt(1.0-sin(theta)*cos(phi))*cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi);
-    bparallel_y = sqrt(1.0-sin(theta)*cos(phi))*sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi);
-    // axis of the parallelepiped
-    cos_val_b = sin(acos(cos_val_a)) ;
-
-
-
-    // The following test should always pass
-    if (fabs(cos_val_c)>1.0) {
-    	printf("parallel_ana_2D: Unexpected error: cos(alpha)>1\n");
-     	return 0;
-    }
-
-	// Call the IGOR library function to get the kernel
-	answer = cspkernel( dp,q, sin(alpha)*cos_val_a,sin(alpha)*cos_val_b,cos_val_c);
-
-	//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/csparallelepiped.h
===================================================================
--- sansmodels/src/c_extensions/csparallelepiped.h	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_extensions/csparallelepiped.h	(revision df88829ada69c0e2705c41d796e0095d12a231db)
@@ -5,4 +5,5 @@
 #if !defined(csparallelepiped_h)
 #define csparallelepiped_h
+#include "parameters.hh"
 /** Structure definition for CSParallelepiped parameters
  * [PYTHONCLASS] = CSParallelepipedModel
@@ -28,65 +29,66 @@
 
  **/
-typedef struct {
-    /// Scale factor
-    //  [DEFAULT]=scale=1.0
-    double scale;
-    ///  Length of short edge of the parallelepiped [A]
-    //  [DEFAULT]=shortA=35 [A]
-    double shortA;
-	/// Length of mid edge of the parallelepiped [A]
-    //  [DEFAULT]=midB=75 [A]
-    double midB;
-	/// Length of long edge of the parallelepiped [A]
-    //  [DEFAULT]=longC=400 [A]
-    double longC;
-    ///  Thickness of rimA [A]
-    //  [DEFAULT]=rimA=10 [A]
-    double rimA;
-	/// Thickness of rimB [A] [A]
-    //  [DEFAULT]=rimB=10 [A]
-    double rimB;
-	/// Thickness of rimC [A] [A]
-    //  [DEFAULT]=rimC=10 [A]
-    double rimC;
-    /// SLD_rimA [1/A^(2)]
-    //  [DEFAULT]=sld_rimA=2e-6 [1/A^(2)]
-    double sld_rimA;
-    /// SLD_rimB [1/A^(2)]
-    //  [DEFAULT]=sld_rimB=4e-6 [1/A^(2)]
-    double sld_rimB;
-    /// SLD_rimC [1/A^(2)]
-    //  [DEFAULT]=sld_rimC=2e-6 [1/A^(2)]
-    double sld_rimC;
-    /// SLD_pcore [1/A^(2)]
-    //  [DEFAULT]=sld_pcore=1e-6 [1/A^(2)]
-    double sld_pcore;
-    /// sld_solv [1/A^(2)]
-    //  [DEFAULT]=sld_solv=6e-6 [1/A^(2)]
-    double sld_solv;
-	/// Incoherent Background [1/cm]
-	//  [DEFAULT]=background=0.06 [1/cm]
-	double background;
-    /// Orientation of the parallelepiped axis w/respect incoming beam [deg]
-    //  [DEFAULT]=parallel_theta=0.0 [deg]
-    double parallel_theta;
-    /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg]
-    //  [DEFAULT]=parallel_phi=0.0 [deg]
-    double parallel_phi;
-    /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg]
-    //  [DEFAULT]=parallel_psi=0.0 [deg]
-    double parallel_psi;
 
+class CSParallelepipedModel{
+public:
+  // Model parameters
+  /// Scale factor
+  //  [DEFAULT]=scale=1.0
+  Parameter scale;
+  ///  Length of short edge of the parallelepiped [A]
+  //  [DEFAULT]=shortA=35 [A]
+  Parameter shortA;
+  /// Length of mid edge of the parallelepiped [A]
+  //  [DEFAULT]=midB=75 [A]
+  Parameter midB;
+  /// Length of long edge of the parallelepiped [A]
+  //  [DEFAULT]=longC=400 [A]
+  Parameter longC;
+  ///  Thickness of rimA [A]
+  //  [DEFAULT]=rimA=10 [A]
+  Parameter rimA;
+  /// Thickness of rimB [A] [A]
+  //  [DEFAULT]=rimB=10 [A]
+  Parameter rimB;
+  /// Thickness of rimC [A] [A]
+  //  [DEFAULT]=rimC=10 [A]
+  Parameter rimC;
+  /// SLD_rimA [1/A^(2)]
+  //  [DEFAULT]=sld_rimA=2e-6 [1/A^(2)]
+  Parameter sld_rimA;
+  /// SLD_rimB [1/A^(2)]
+  //  [DEFAULT]=sld_rimB=4e-6 [1/A^(2)]
+  Parameter sld_rimB;
+  /// SLD_rimC [1/A^(2)]
+  //  [DEFAULT]=sld_rimC=2e-6 [1/A^(2)]
+  Parameter sld_rimC;
+  /// SLD_pcore [1/A^(2)]
+  //  [DEFAULT]=sld_pcore=1e-6 [1/A^(2)]
+  Parameter sld_pcore;
+  /// sld_solv [1/A^(2)]
+  //  [DEFAULT]=sld_solv=6e-6 [1/A^(2)]
+  Parameter sld_solv;
+  /// Incoherent Background [1/cm]
+  //  [DEFAULT]=background=0.06 [1/cm]
+  Parameter background;
+  /// Orientation of the parallelepiped axis w/respect incoming beam [deg]
+  //  [DEFAULT]=parallel_theta=0.0 [deg]
+  Parameter parallel_theta;
+  /// Orientation of the longitudinal axis of the parallelepiped in the plane of the detector [deg]
+  //  [DEFAULT]=parallel_phi=0.0 [deg]
+  Parameter parallel_phi;
+  /// Orientation of the cross-sectional minor axis of the parallelepiped in the plane of the detector [deg]
+  //  [DEFAULT]=parallel_psi=0.0 [deg]
+  Parameter parallel_psi;
 
-} CSParallelepipedParameters;
+  // Constructor
+  CSParallelepipedModel();
 
+  // 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 csparallelepiped_analytical_1D(CSParallelepipedParameters *pars, double q);
-
-/// 2D scattering function
-double csparallelepiped_analytical_2D(CSParallelepipedParameters *pars, double q, double phi);
-double csparallelepiped_analytical_2DXY(CSParallelepipedParameters *pars, double qx, double qy);
-double csparallelepiped_analytical_2D_scaled(CSParallelepipedParameters *pars, double q, double q_x, double q_y);
 #endif
Index: sansmodels/src/c_models/csparallelepiped.cpp
===================================================================
--- sansmodels/src/c_models/csparallelepiped.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/c_models/csparallelepiped.cpp	(revision df88829ada69c0e2705c41d796e0095d12a231db)
@@ -30,4 +30,214 @@
 	#include "csparallelepiped.h"
 }
+
+// Convenience parameter structure
+typedef struct {
+    double scale;
+    double shortA;
+    double midB;
+    double longC;
+    double rimA;
+    double rimB;
+    double rimC;
+    double sld_rimA;
+    double sld_rimB;
+    double sld_rimC;
+    double sld_pcore;
+    double sld_solv;
+    double background;
+    double parallel_theta;
+    double parallel_phi;
+    double parallel_psi;
+} CSParallelepipedParameters;
+
+static double cspkernel(double dp[],double q, double ala, double alb, double alc){
+    // mu passed in is really mu*sqrt(1-sig^2)
+    double argA,argB,argC,argtA,argtB,argtC,tmp1,tmp2,tmp3,tmpt1,tmpt2,tmpt3;     //local variables
+
+  double aa,bb,cc, ta,tb,tc;
+  double Vin,Vot,V1,V2,V3;
+  double rhoA,rhoB,rhoC, rhoP, rhosolv;
+  double dr0, drA,drB, drC;
+  double retVal;
+
+  aa = dp[1];
+  bb = dp[2];
+  cc = dp[3];
+  ta = dp[4];
+  tb = dp[5];
+  tc = dp[6];
+  rhoA=dp[7];
+  rhoB=dp[8];
+  rhoC=dp[9];
+  rhoP=dp[10];
+  rhosolv=dp[11];
+  dr0=rhoP-rhosolv;
+  drA=rhoA-rhosolv;
+  drB=rhoB-rhosolv;
+  drC=rhoC-rhosolv;
+  Vin=(aa*bb*cc);
+  Vot=(aa*bb*cc+2.0*ta*bb*cc+2.0*aa*tb*cc+2.0*aa*bb*tc);
+  V1=(2.0*ta*bb*cc);   //  incorrect V1 (aa*bb*cc+2*ta*bb*cc)
+  V2=(2.0*aa*tb*cc);  // incorrect V2(aa*bb*cc+2*aa*tb*cc)
+  V3=(2.0*aa*bb*tc);
+  //aa = aa/bb;
+  ta=(aa+2.0*ta);///bb;
+  tb=(aa+2.0*tb);///bb;
+  tc=(aa+2.0*tc);
+    //handle arg=0 separately, as sin(t)/t -> 1 as t->0
+    argA = q*aa*ala/2.0;
+    argB = q*bb*alb/2.0;
+    argC = q*cc*alc/2.0;
+    argtA = q*ta*ala/2.0;
+  argtB = q*tb*alb/2.0;
+  argtC = q*tc*alc/2.0;
+
+    if(argA==0.0) {
+    tmp1 = 1.0;
+  } else {
+    tmp1 = sin(argA)/argA;
+    }
+    if (argB==0.0) {
+    tmp2 = 1.0;
+  } else {
+    tmp2 = sin(argB)/argB;
+    }
+
+    if (argC==0.0) {
+    tmp3 = 1.0;
+  } else {
+    tmp3 = sin(argC)/argC;
+    }
+    if(argtA==0.0) {
+    tmpt1 = 1.0;
+  } else {
+    tmpt1 = sin(argtA)/argtA;
+    }
+    if (argtB==0.0) {
+    tmpt2 = 1.0;
+  } else {
+    tmpt2 = sin(argtB)/argtB;
+    }
+    if (argtC==0.0) {
+    tmpt3 = 1.0;
+  } else {
+    tmpt3 = sin(argtC)*sin(argtC)/argtC/argtC;
+    }
+    // This expression is different from NIST/IGOR package (I strongly believe the IGOR is wrong!!!). 10/15/2010.
+    retVal =( dr0*tmp1*tmp2*tmp3*Vin + drA*(tmpt1-tmp1)*tmp2*tmp3*V1+ drB*tmp1*(tmpt2-tmp2)*tmp3*V2 + drC*tmp1*tmp2*(tmpt3-tmp3)*V3)*
+        ( dr0*tmp1*tmp2*tmp3*Vin + drA*(tmpt1-tmp1)*tmp2*tmp3*V1+ drB*tmp1*(tmpt2-tmp2)*tmp3*V2 + drC*tmp1*tmp2*(tmpt3-tmp3)*V3);   //  correct FF : square of sum of phase factors
+    //retVal *= (tmp3*tmp3);
+    retVal /= Vot;
+
+    return (retVal);
+
+}//Function cspkernel()
+
+/**
+ * Function to evaluate 2D scattering function
+ * @param pars: parameters of the CSparallelepiped
+ * @param q: q-value
+ * @param q_x: q_x / q
+ * @param q_y: q_y / q
+ * @return: function value
+ */
+static double csparallelepiped_analytical_2D_scaled(CSParallelepipedParameters *pars, double q, double q_x, double q_y) {
+  double dp[13];
+  double cparallel_x, cparallel_y, cparallel_z, bparallel_x, bparallel_y, parallel_x, parallel_y;
+  double q_z;
+  double alpha, cos_val_c, cos_val_b, cos_val_a, edgeA, edgeB, edgeC;
+
+  double answer;
+  //convert angle degree to radian
+  double pi = 4.0*atan(1.0);
+  double theta = pars->parallel_theta * pi/180.0;
+  double phi = pars->parallel_phi * pi/180.0;
+  double psi = pars->parallel_psi* pi/180.0;
+
+  // Fill paramater array
+  dp[0] = 1.0;
+  dp[1] = pars->shortA;
+  dp[2] = pars->midB;
+  dp[3] = pars->longC;
+  dp[4] = pars->rimA;
+  dp[5] = pars->rimB;
+  dp[6] = pars->rimC;
+  dp[7] = pars->sld_rimA;
+  dp[8] = pars->sld_rimB;
+  dp[9] = pars->sld_rimC;
+  dp[10] = pars->sld_pcore;
+  dp[11] = pars->sld_solv;
+  dp[12] = 0.0;
+
+
+  edgeA = pars->shortA;
+  edgeB = pars->midB;
+  edgeC = pars->longC;
+
+
+    // parallelepiped c axis orientation
+    cparallel_x = sin(theta) * cos(phi);
+    cparallel_y = sin(theta) * sin(phi);
+    cparallel_z = cos(theta);
+
+    // q vector
+    q_z = 0.0;
+
+    // Compute the angle btw vector q and the
+    // axis of the parallelepiped
+    cos_val_c = cparallel_x*q_x + cparallel_y*q_y + cparallel_z*q_z;
+    alpha = acos(cos_val_c);
+
+    // parallelepiped a axis orientation
+    parallel_x = sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)*sin(pars->parallel_psi);
+    parallel_y = cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)*cos(pars->parallel_psi);
+
+    cos_val_a = parallel_x*q_x + parallel_y*q_y;
+
+
+
+    // parallelepiped b axis orientation
+    bparallel_x = sqrt(1.0-sin(theta)*cos(phi))*cos(psi);//cos(pars->parallel_theta) * cos(pars->parallel_phi)* cos(pars->parallel_psi);
+    bparallel_y = sqrt(1.0-sin(theta)*cos(phi))*sin(psi);//cos(pars->parallel_theta) * sin(pars->parallel_phi)* sin(pars->parallel_psi);
+    // axis of the parallelepiped
+    cos_val_b = sin(acos(cos_val_a)) ;
+
+
+
+    // The following test should always pass
+    if (fabs(cos_val_c)>1.0) {
+      printf("parallel_ana_2D: Unexpected error: cos(alpha)>1\n");
+      return 0;
+    }
+
+  // Call the IGOR library function to get the kernel
+  answer = cspkernel( dp,q, sin(alpha)*cos_val_a,sin(alpha)*cos_val_b,cos_val_c);
+
+  //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 CSparallelepiped
+ * @param q: q-value
+ * @return: function value
+ */
+static double csparallelepiped_analytical_2DXY(CSParallelepipedParameters *pars, double qx, double qy) {
+  double q;
+  q = sqrt(qx*qx+qy*qy);
+    return csparallelepiped_analytical_2D_scaled(pars, q, qx/q, qy/q);
+}
+
+
+
 
 CSParallelepipedModel :: CSParallelepipedModel() {
Index: sansmodels/src/c_models/models.hh
===================================================================
--- sansmodels/src/c_models/models.hh	(revision 8343e18b86d18130057f1d8c582e4042eec09721)
+++ sansmodels/src/c_models/models.hh	(revision df88829ada69c0e2705c41d796e0095d12a231db)
@@ -27,33 +27,4 @@
 using namespace std;
 
-class CSParallelepipedModel{
-public:
-	// Model parameters
-	Parameter scale;
-	Parameter shortA;
-	Parameter midB;
-	Parameter longC;
-	Parameter rimA;
-	Parameter rimB;
-	Parameter rimC;
-	Parameter sld_rimA;
-	Parameter sld_rimB;
-	Parameter sld_rimC;
-	Parameter sld_pcore;
-	Parameter sld_solv;
-	Parameter background;
-	Parameter parallel_theta;
-	Parameter parallel_phi;
-	Parameter parallel_psi;
-
-	// Constructor
-	CSParallelepipedModel();
-
-	// 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 OnionModel{
Index: sansmodels/src/python_wrapper/CCSParallelepipedModel.cpp
===================================================================
--- sansmodels/src/python_wrapper/CCSParallelepipedModel.cpp	(revision 67424cdc019bde2f4cbc089828ff660e6f914c2c)
+++ sansmodels/src/python_wrapper/CCSParallelepipedModel.cpp	(revision df88829ada69c0e2705c41d796e0095d12a231db)
@@ -18,5 +18,5 @@
  *
  * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY csparallelepiped.h
+ *          DO NOT MODIFY THIS FILE, MODIFY ../c_extensions/csparallelepiped.h
  *          AND RE-RUN THE GENERATOR SCRIPT
  *
@@ -33,8 +33,8 @@
 #include <math.h>
 #include <time.h>
+
+}
+
 #include "csparallelepiped.h"
-}
-
-#include "models.hh"
 #include "dispersion_visitor.hh"
 
