Index: sasmodels/models/core_shell_bicelle_elliptical.c
===================================================================
--- sasmodels/models/core_shell_bicelle_elliptical.c	(revision f4f85b3a43d7e158d487593ba7eee6f3d8e98fc8)
+++ sasmodels/models/core_shell_bicelle_elliptical.c	(revision 44e8a93e1773cb4d0897a436b8770e1d4e5ee343)
@@ -1,45 +1,24 @@
-double form_volume(double radius, double x_core, double thick_rim, double thick_face, double length);
-double Iq(double q,
-          double radius,
-          double x_core,
-          double thick_rim,
-          double thick_face,
-          double length,
-          double core_sld,
-          double face_sld,
-          double rim_sld,
-          double solvent_sld);
-
-
-double Iqxy(double qx, double qy,
-          double radius,
-          double x_core,
-          double thick_rim,
-          double thick_face,
-          double length,
-          double core_sld,
-          double face_sld,
-          double rim_sld,
-          double solvent_sld,
-          double theta,
-          double phi,
-          double psi);
-
 // NOTE that "length" here is the full height of the core!
-double form_volume(double radius, double x_core, double thick_rim, double thick_face, double length)
+static double
+form_volume(double r_minor,
+        double x_core,
+        double thick_rim,
+        double thick_face,
+        double length)
 {
-    return M_PI*(radius+thick_rim)*(radius*x_core+thick_rim)*(length+2.0*thick_face);
+    return M_PI*(r_minor+thick_rim)*(r_minor*x_core+thick_rim)*(length+2.0*thick_face);
 }
 
-double Iq(double q,
-          double rad,
-          double x_core,
-          double radthick,
-          double facthick,
-          double length,
-          double rhoc,
-          double rhoh,
-          double rhor,
-          double rhosolv)
+static double
+Iq(double q,
+        double r_minor,
+        double x_core,
+        double thick_rim,
+        double thick_face,
+        double length,
+        double rhoc,
+        double rhoh,
+        double rhor,
+        double rhosolv)
 {
     double si1,si2,be1,be2;
@@ -54,13 +33,13 @@
     //const double vbj=M_PI;
 
-    const double radius_major = rad * x_core;
-    const double rA = 0.5*(square(radius_major) + square(rad));
-    const double rB = 0.5*(square(radius_major) - square(rad));
-    const double dr1 = (rhoc-rhoh)   *M_PI*rad*radius_major*(2.0*halfheight);;
-    const double dr2 = (rhor-rhosolv)*M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
-    const double dr3 = (rhoh-rhor)   *M_PI*rad*radius_major*2.0*(halfheight+facthick);
-    //const double vol1 = M_PI*rad*radius_major*(2.0*halfheight);
-    //const double vol2 = M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
-    //const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick);
+    const double r_major = r_minor * x_core;
+    const double rA = 0.5*(square(r_major) + square(r_minor));
+    const double rB = 0.5*(square(r_major) - square(r_minor));
+    const double dr1 = (rhoc-rhoh)   *M_PI*r_minor*r_major*(2.0*halfheight);;
+    const double dr2 = (rhor-rhosolv)*M_PI*(r_minor+thick_rim)*(r_major+thick_rim)*2.0*(halfheight+thick_face);
+    const double dr3 = (rhoh-rhor)   *M_PI*r_minor*r_major*2.0*(halfheight+thick_face);
+    //const double vol1 = M_PI*r_minor*r_major*(2.0*halfheight);
+    //const double vol2 = M_PI*(r_minor+thick_rim)*(r_major+thick_rim)*2.0*(halfheight+thick_face);
+    //const double vol3 = M_PI*r_minor*r_major*2.0*(halfheight+thick_face);
 
     //initialize integral
@@ -74,5 +53,5 @@
         double inner_sum=0;
         double sinarg1 = q*halfheight*cos_alpha;
-        double sinarg2 = q*(halfheight+facthick)*cos_alpha;
+        double sinarg2 = q*(halfheight+thick_face)*cos_alpha;
         si1 = sas_sinx_x(sinarg1);
         si2 = sas_sinx_x(sinarg2);
@@ -83,5 +62,5 @@
             const double rr = sqrt(rA - rB*cos(beta));
             double besarg1 = q*rr*sin_alpha;
-            double besarg2 = q*(rr+radthick)*sin_alpha;
+            double besarg2 = q*(rr+thick_rim)*sin_alpha;
             be1 = sas_2J1x_x(besarg1);
             be2 = sas_2J1x_x(besarg2);
@@ -97,10 +76,10 @@
 }
 
-double 
+static double
 Iqxy(double qx, double qy,
-          double rad,
+          double r_minor,
           double x_core,
-          double radthick,
-          double facthick,
+          double thick_rim,
+          double thick_face,
           double length,
           double rhoc,
@@ -118,24 +97,19 @@
     const double dr2 = rhor-rhosolv;
     const double dr3 = rhoh-rhor;
-    const double radius_major = rad*x_core;
+    const double r_major = r_minor*x_core;
     const double halfheight = 0.5*length;
-    const double vol1 = M_PI*rad*radius_major*length;
-    const double vol2 = M_PI*(rad+radthick)*(radius_major+radthick)*2.0*(halfheight+facthick);
-    const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick);
+    const double vol1 = M_PI*r_minor*r_major*length;
+    const double vol2 = M_PI*(r_minor+thick_rim)*(r_major+thick_rim)*2.0*(halfheight+thick_face);
+    const double vol3 = M_PI*r_minor*r_major*2.0*(halfheight+thick_face);
 
-    // Compute:  r = sqrt((radius_major*zhat)^2 + (radius_minor*yhat)^2)
-    // Given:    radius_major = r_ratio * radius_minor  
-    // ASSUME the sin_alpha is included in the separate integration over orientation of rod angle
-    const double rad_minor = rad;
-    const double rad_major = rad*x_core;
-    const double r_hat = sqrt(square(rad_major*xhat) + square(rad_minor*yhat));
-    const double rshell_hat = sqrt(square((rad_major+radthick)*xhat)
-                                   + square((rad_minor+radthick)*yhat));
+    // Compute effective radius in rotated coordinates
+    const double r_hat = sqrt(square(r_major*xhat) + square(r_minor*yhat));
+    const double rshell_hat = sqrt(square((r_major+thick_rim)*xhat)
+                                   + square((r_minor+thick_rim)*yhat));
     const double be1 = sas_2J1x_x( q*r_hat );
     const double be2 = sas_2J1x_x( q*rshell_hat );
     const double si1 = sas_sinx_x( q*halfheight*zhat );
-    const double si2 = sas_sinx_x( q*(halfheight + facthick)*zhat );
+    const double si2 = sas_sinx_x( q*(halfheight + thick_face)*zhat );
     const double Aq = square( vol1*dr1*si1*be1 + vol2*dr2*si2*be2 +  vol3*dr3*si2*be1);
-    //const double vol = form_volume(radius_minor, r_ratio, length);
     return 1.0e-4 * Aq;
 }
