Index: sansmodels/src/sans/models/c_extensions/CCoreShellCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellCylinderModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CCoreShellCylinderModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CCoreShellCylinderModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CCoreShellCylinderModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	CoreShellCylinderParameters model_pars;
-} CCoreShellCylinderModel;
+} [PYTHONCLASS];
 
 
 static void
-CCoreShellCylinderModel_dealloc(CCoreShellCylinderModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CCoreShellCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CCoreShellCylinderModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CCoreShellCylinderModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CCoreShellCylinderModel_init(CCoreShellCylinderModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -83,8 +83,8 @@
 }
 
-static PyMemberDef CCoreShellCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellCylinderModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellCylinderModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -95,5 +95,5 @@
     @return double
 */
-double CCoreShellCylinderModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -113,5 +113,5 @@
  * @return: function value
  */
-static PyObject * run(CCoreShellCylinderModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -135,6 +135,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellCylinderModelError, 
-	    	"CCoreShellCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -146,12 +146,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellCylinderModelError, 
-	    		"CCoreShellCylinderModel.run expects a double or a list of dimension 2.");
+	    	PyErr_SetString([PYTHONCLASS]Error, 
+	    		"[PYTHONCLASS].run expects a double or a list of dimension 2.");
 	    	return NULL;
 	    }
 	    // We have a vector q, get the q and phi values at which
 	    // to evaluate I(q,phi)
-	    q_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
+	    q_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
 	    // Skip zero
 	    if (q_value==0) {
@@ -163,5 +163,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellCylinderModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_cylinder_analytical_1D(&(self->model_pars),q_value));
@@ -174,5 +174,5 @@
  * @return: function value
  */
-static PyObject * runXY(CCoreShellCylinderModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -196,6 +196,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellCylinderModelError, 
-	    	"CCoreShellCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -207,12 +207,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellCylinderModelError, 
-	    		"CCoreShellCylinderModel.run expects a double or a list of dimension 2.");
+	    	PyErr_SetString([PYTHONCLASS]Error, 
+	    		"[PYTHONCLASS].run expects a double or a list of dimension 2.");
 	    	return NULL;
 	    }
 	    // We have a vector q, get the qx and qy values at which
 	    // to evaluate I(qx,qy)
-	    qx_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
+	    qx_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
 		return Py_BuildValue("d",core_shell_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -220,5 +220,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellCylinderModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_cylinder_analytical_1D(&(self->model_pars),qx_value));
@@ -226,5 +226,5 @@
 }
 
-static PyObject * reset(CCoreShellCylinderModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -233,5 +233,5 @@
 
 
-static PyMethodDef CCoreShellCylinderModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -245,11 +245,11 @@
 };
 
-static PyTypeObject CCoreShellCylinderModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CCoreShellCylinderModel",             /*tp_name*/
-    sizeof(CCoreShellCylinderModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CCoreShellCylinderModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -267,5 +267,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellCylinderModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -274,6 +274,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CCoreShellCylinderModel_methods,             /* tp_methods */
-    CCoreShellCylinderModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -282,7 +282,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CCoreShellCylinderModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CCoreShellCylinderModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -296,16 +296,16 @@
  * @param module: module to add the class to
  */ 
-void addCCoreShellCylinderModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CCoreShellCylinderModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CCoreShellCylinderModelType);
-    PyModule_AddObject(module, "CCoreShellCylinderModel", (PyObject *)&CCoreShellCylinderModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CCoreShellCylinderModelError = PyErr_NewException("CCoreShellCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellCylinderModelError", CCoreShellCylinderModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
