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);
+}
+
Index: sansmodels/src/sans/models/c_extensions/CCoreShellModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CCoreShellModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CCoreShellModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CCoreShellModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	CoreShellParameters model_pars;
-} CCoreShellModel;
+} [PYTHONCLASS];
 
 
 static void
-CCoreShellModel_dealloc(CCoreShellModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CCoreShellModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CCoreShellModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CCoreShellModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CCoreShellModel_init(CCoreShellModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -80,8 +80,8 @@
 }
 
-static PyMemberDef CCoreShellModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -92,5 +92,5 @@
     @return double
 */
-double CCoreShellModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -110,5 +110,5 @@
  * @return: function value
  */
-static PyObject * run(CCoreShellModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -129,6 +129,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -140,12 +140,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.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 = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellModel_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) {
@@ -157,5 +157,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),q_value));
@@ -168,5 +168,5 @@
  * @return: function value
  */
-static PyObject * runXY(CCoreShellModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -187,6 +187,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -198,12 +198,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.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 = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellModel_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_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -211,5 +211,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),qx_value));
@@ -217,5 +217,5 @@
 }
 
-static PyObject * reset(CCoreShellModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -224,5 +224,5 @@
 
 
-static PyMethodDef CCoreShellModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -236,11 +236,11 @@
 };
 
-static PyTypeObject CCoreShellModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CCoreShellModel",             /*tp_name*/
-    sizeof(CCoreShellModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CCoreShellModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -258,5 +258,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -265,6 +265,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CCoreShellModel_methods,             /* tp_methods */
-    CCoreShellModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -273,7 +273,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CCoreShellModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CCoreShellModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -287,16 +287,16 @@
  * @param module: module to add the class to
  */ 
-void addCCoreShellModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CCoreShellModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CCoreShellModelType);
-    PyModule_AddObject(module, "CCoreShellModel", (PyObject *)&CCoreShellModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CCoreShellModelError = PyErr_NewException("CCoreShellModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellModelError", CCoreShellModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
Index: sansmodels/src/sans/models/c_extensions/CCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCylinderModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CCylinderModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,8 +1,8 @@
-/** CCylinderModel
+/** [PYTHONCLASS]
  *
  * C extension 
  *
  * WARNING: THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY
- *          DO NOT MODIFY THIS FILE, MODIFY cylinder.h
+ *          DO NOT MODIFY THIS FILE, MODIFY Cylinder.h
  *          AND RE-RUN THE GENERATOR SCRIPT
  *
@@ -17,8 +17,8 @@
 #include <time.h>
 
-#include "cylinder.h"
+#include "Cylinder.h"
 
 /// Error object for raised exceptions
-static PyObject * CCylinderModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	CylinderParameters model_pars;
-} CCylinderModel;
+} [PYTHONCLASS];
 
 
 static void
-CCylinderModel_dealloc(CCylinderModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CCylinderModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CCylinderModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CCylinderModel_init(CCylinderModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -80,8 +80,8 @@
 }
 
-static PyMemberDef CCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCylinderModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CCylinderModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -92,5 +92,5 @@
     @return double
 */
-double CCylinderModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -110,5 +110,5 @@
  * @return: function value
  */
-static PyObject * run(CCylinderModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -129,6 +129,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCylinderModelError, 
-	    	"CCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -140,24 +140,24 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCylinderModelError, 
-	    		"CCylinderModel.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 = CCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCylinderModel_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) {
 	    	return Py_BuildValue("d",0.0);
 	    }
-		return Py_BuildValue("d",cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
+		return Py_BuildValue("d",Cylinder_analytical_2D(&(self->model_pars),q_value,phi_value));
 
 	} else {
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CCylinderModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
-		return Py_BuildValue("d",cylinder_analytical_1D(&(self->model_pars),q_value));
+		return Py_BuildValue("d",Cylinder_analytical_1D(&(self->model_pars),q_value));
 	}	
 }
@@ -168,5 +168,5 @@
  * @return: function value
  */
-static PyObject * runXY(CCylinderModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -187,6 +187,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCylinderModelError, 
-	    	"CCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -198,24 +198,24 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCylinderModelError, 
-	    		"CCylinderModel.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 = CCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCylinderModel_readDouble(PyList_GET_ITEM(pars,1));
-		return Py_BuildValue("d",cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
+	    qx_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
+		return Py_BuildValue("d",Cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
 	} else {
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCylinderModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
-		return Py_BuildValue("d",cylinder_analytical_1D(&(self->model_pars),qx_value));
+		return Py_BuildValue("d",Cylinder_analytical_1D(&(self->model_pars),qx_value));
 	}	
 }
 
-static PyObject * reset(CCylinderModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -224,5 +224,5 @@
 
 
-static PyMethodDef CCylinderModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -236,11 +236,11 @@
 };
 
-static PyTypeObject CCylinderModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CCylinderModel",             /*tp_name*/
-    sizeof(CCylinderModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CCylinderModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -258,5 +258,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCylinderModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -265,6 +265,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CCylinderModel_methods,             /* tp_methods */
-    CCylinderModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -273,7 +273,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CCylinderModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CCylinderModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -287,16 +287,16 @@
  * @param module: module to add the class to
  */ 
-void addCCylinderModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CCylinderModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CCylinderModelType);
-    PyModule_AddObject(module, "CCylinderModel", (PyObject *)&CCylinderModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CCylinderModelError = PyErr_NewException("CCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCylinderModelError", CCylinderModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
Index: sansmodels/src/sans/models/c_extensions/CEllipsoidModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CEllipsoidModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CEllipsoidModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CEllipsoidModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CEllipsoidModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	EllipsoidParameters model_pars;
-} CEllipsoidModel;
+} [PYTHONCLASS];
 
 
 static void
-CEllipsoidModel_dealloc(CEllipsoidModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CEllipsoidModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CEllipsoidModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CEllipsoidModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CEllipsoidModel_init(CEllipsoidModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -80,8 +80,8 @@
 }
 
-static PyMemberDef CEllipsoidModel_members[] = {
-    {"params", T_OBJECT, offsetof(CEllipsoidModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CEllipsoidModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -92,5 +92,5 @@
     @return double
 */
-double CEllipsoidModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -110,5 +110,5 @@
  * @return: function value
  */
-static PyObject * run(CEllipsoidModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -129,6 +129,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipsoidModelError, 
-	    	"CEllipsoidModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -140,12 +140,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CEllipsoidModelError, 
-	    		"CEllipsoidModel.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 = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CEllipsoidModel_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) {
@@ -157,5 +157,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CEllipsoidModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",ellipsoid_analytical_1D(&(self->model_pars),q_value));
@@ -168,5 +168,5 @@
  * @return: function value
  */
-static PyObject * runXY(CEllipsoidModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -187,6 +187,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipsoidModelError, 
-	    	"CEllipsoidModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -198,12 +198,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CEllipsoidModelError, 
-	    		"CEllipsoidModel.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 = CEllipsoidModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CEllipsoidModel_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",ellipsoid_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -211,5 +211,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CEllipsoidModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",ellipsoid_analytical_1D(&(self->model_pars),qx_value));
@@ -217,5 +217,5 @@
 }
 
-static PyObject * reset(CEllipsoidModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -224,5 +224,5 @@
 
 
-static PyMethodDef CEllipsoidModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -236,11 +236,11 @@
 };
 
-static PyTypeObject CEllipsoidModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CEllipsoidModel",             /*tp_name*/
-    sizeof(CEllipsoidModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CEllipsoidModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -258,5 +258,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CEllipsoidModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -265,6 +265,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CEllipsoidModel_methods,             /* tp_methods */
-    CEllipsoidModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -273,7 +273,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CEllipsoidModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CEllipsoidModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -287,16 +287,16 @@
  * @param module: module to add the class to
  */ 
-void addCEllipsoidModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CEllipsoidModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CEllipsoidModelType);
-    PyModule_AddObject(module, "CEllipsoidModel", (PyObject *)&CEllipsoidModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CEllipsoidModelError = PyErr_NewException("CEllipsoidModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CEllipsoidModelError", CEllipsoidModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
Index: sansmodels/src/sans/models/c_extensions/CEllipticalCylinderModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CEllipticalCylinderModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CEllipticalCylinderModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CEllipticalCylinderModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CEllipticalCylinderModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	EllipticalCylinderParameters model_pars;
-} CEllipticalCylinderModel;
+} [PYTHONCLASS];
 
 
 static void
-CEllipticalCylinderModel_dealloc(CEllipticalCylinderModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CEllipticalCylinderModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CEllipticalCylinderModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CEllipticalCylinderModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CEllipticalCylinderModel_init(CEllipticalCylinderModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -82,8 +82,8 @@
 }
 
-static PyMemberDef CEllipticalCylinderModel_members[] = {
-    {"params", T_OBJECT, offsetof(CEllipticalCylinderModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CEllipticalCylinderModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -94,5 +94,5 @@
     @return double
 */
-double CEllipticalCylinderModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -112,5 +112,5 @@
  * @return: function value
  */
-static PyObject * run(CEllipticalCylinderModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -133,6 +133,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipticalCylinderModelError, 
-	    	"CEllipticalCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -144,12 +144,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CEllipticalCylinderModelError, 
-	    		"CEllipticalCylinderModel.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 = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CEllipticalCylinderModel_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) {
@@ -161,5 +161,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CEllipticalCylinderModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",elliptical_cylinder_analytical_1D(&(self->model_pars),q_value));
@@ -172,5 +172,5 @@
  * @return: function value
  */
-static PyObject * runXY(CEllipticalCylinderModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -193,6 +193,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CEllipticalCylinderModelError, 
-	    	"CEllipticalCylinderModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -204,12 +204,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CEllipticalCylinderModelError, 
-	    		"CEllipticalCylinderModel.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 = CEllipticalCylinderModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CEllipticalCylinderModel_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",elliptical_cylinder_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -217,5 +217,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CEllipticalCylinderModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",elliptical_cylinder_analytical_1D(&(self->model_pars),qx_value));
@@ -223,5 +223,5 @@
 }
 
-static PyObject * reset(CEllipticalCylinderModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -230,5 +230,5 @@
 
 
-static PyMethodDef CEllipticalCylinderModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -242,11 +242,11 @@
 };
 
-static PyTypeObject CEllipticalCylinderModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CEllipticalCylinderModel",             /*tp_name*/
-    sizeof(CEllipticalCylinderModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CEllipticalCylinderModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -264,5 +264,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CEllipticalCylinderModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -271,6 +271,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CEllipticalCylinderModel_methods,             /* tp_methods */
-    CEllipticalCylinderModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -279,7 +279,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CEllipticalCylinderModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CEllipticalCylinderModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -293,16 +293,16 @@
  * @param module: module to add the class to
  */ 
-void addCEllipticalCylinderModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CEllipticalCylinderModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CEllipticalCylinderModelType);
-    PyModule_AddObject(module, "CEllipticalCylinderModel", (PyObject *)&CEllipticalCylinderModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CEllipticalCylinderModelError = PyErr_NewException("CEllipticalCylinderModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CEllipticalCylinderModelError", CEllipticalCylinderModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
Index: sansmodels/src/sans/models/c_extensions/CSphereModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CSphereModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CSphereModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CSphereModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CSphereModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	SphereParameters model_pars;
-} CSphereModel;
+} [PYTHONCLASS];
 
 
 static void
-CSphereModel_dealloc(CSphereModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CSphereModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CSphereModel *self;
-    
-    self = (CSphereModel *)type->tp_alloc(type, 0);
+    [PYTHONCLASS] *self;
+    
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CSphereModel_init(CSphereModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -77,8 +77,8 @@
 }
 
-static PyMemberDef CSphereModel_members[] = {
-    {"params", T_OBJECT, offsetof(CSphereModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CSphereModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -89,5 +89,5 @@
     @return double
 */
-double CSphereModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -107,5 +107,5 @@
  * @return: function value
  */
-static PyObject * run(CSphereModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -123,6 +123,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSphereModelError, 
-	    	"CSphereModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -134,12 +134,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CSphereModelError, 
-	    		"CSphereModel.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 = CSphereModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CSphereModel_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) {
@@ -151,5 +151,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CSphereModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",sphere_analytical_1D(&(self->model_pars),q_value));
@@ -162,5 +162,5 @@
  * @return: function value
  */
-static PyObject * runXY(CSphereModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -178,6 +178,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CSphereModelError, 
-	    	"CSphereModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -189,12 +189,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CSphereModelError, 
-	    		"CSphereModel.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 = CSphereModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CSphereModel_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",sphere_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -202,5 +202,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CSphereModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",sphere_analytical_1D(&(self->model_pars),qx_value));
@@ -208,5 +208,5 @@
 }
 
-static PyObject * reset(CSphereModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -215,5 +215,5 @@
 
 
-static PyMethodDef CSphereModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -227,11 +227,11 @@
 };
 
-static PyTypeObject CSphereModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CSphereModel",             /*tp_name*/
-    sizeof(CSphereModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CSphereModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -249,5 +249,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CSphereModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -256,6 +256,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CSphereModel_methods,             /* tp_methods */
-    CSphereModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -264,7 +264,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CSphereModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CSphereModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -278,16 +278,16 @@
  * @param module: module to add the class to
  */ 
-void addCSphereModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CSphereModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CSphereModelType);
-    PyModule_AddObject(module, "CSphereModel", (PyObject *)&CSphereModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CSphereModelError = PyErr_NewException("CSphereModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CSphereModelError", CSphereModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
Index: sansmodels/src/sans/models/c_extensions/WrapperGenerator.py
===================================================================
--- sansmodels/src/sans/models/c_extensions/WrapperGenerator.py	(revision 4d3acb623faa6fedffe5a92118fd06958535f684)
+++ sansmodels/src/sans/models/c_extensions/WrapperGenerator.py	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -131,5 +131,5 @@
                             self.description=temp[0]
                             break
-                        print self.description
+                        #print self.description
                     else:
                         self.description=temp
@@ -147,13 +147,13 @@
                     break
                 else:
-                    if re.search("*",line)!=None:
-                        temp=line.split("//",1)
-                        self.description+='\n'+temp[1].lstrip().rstrip()
+                    #if re.search("*",line)!=None:
+                    #    temp=line.split("*",1)
+                    #    self.description+='\n'+temp[1].lstrip().rstrip()
                     if re.search("//",line)!=None:
                         temp=line.split("//",1)
-                        self.description+='\n'+temp[1].lstrip().rstrip()
+                        self.description+='\n\t\t'+temp[1].lstrip().rstrip()
                         
                     else:
-                        self.description+='\n'+line.lstrip().rstrip()
+                        self.description+='\n\t\t'+line.lstrip().rstrip()
                     
                 
@@ -224,5 +224,5 @@
             if line.count(key)>0:
                 self.modelCalcFlag = True
-                
+            
                 
                 
@@ -244,5 +244,7 @@
             newline = self.replaceToken(tmp_line, 
                                         "[PYTHONCLASS]", 'C'+self.pythonClass)
-            
+            ##catch description
+            #newline = self.replaceToken(tmp_line, 
+            #                            "[DESCRIPTION]", self.description)
             # Catch class name
             newline = self.replaceToken(newline, 
@@ -336,8 +338,8 @@
             newline = self.replaceToken(newline, 
                                         "[PAR_DETAILS]", self.details)
-
+            #print"write",tmp_line 
             # Write new line to the wrapper .c file
             file.write(newline+'\n')
-               
+           
         file.close()
         
Index: sansmodels/src/sans/models/c_extensions/modelTemplate.txt
===================================================================
--- sansmodels/src/sans/models/c_extensions/modelTemplate.txt	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/modelTemplate.txt	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -31,5 +31,5 @@
         ## Name of the model
         self.name = "[PYTHONCLASS]"
-
+        self.description= """[DESCRIPTION]"""
 		[PAR_DETAILS]
    
