--- cpp/geom/diffboundary.cpp	Tue May 07 06:04:32 2013
+++ cpp/geom/diffboundary.cpp	Sun Apr 21 19:37:48 2013
@@ -67,7 +67,7 @@
 
     int * tri_tet_neighb = pTetmesh->_getTriTetNeighb(tris[0]);
 
-	if (tri_tet_neighb[0] == -1 || tri_tet_neighb[1] == -1)
+	if (tri_tet_neighb[0] == -1 or tri_tet_neighb[1] == -1)
 	{
     	std::ostringstream os;
 		os << "Cannot add triangle with index " << tris[0] << "(#" << 0;
@@ -79,7 +79,7 @@
 	steps::tetmesh::TmComp * icmp = pTetmesh->getTetComp(tri_tet_neighb[0]);
 	steps::tetmesh::TmComp * ocmp = pTetmesh->getTetComp(tri_tet_neighb[1]);
 
-	if (icmp == 0 || ocmp == 0)
+	if (icmp == 0 or ocmp == 0)
 	{
     	std::ostringstream os;
 		os << "Cannot add triangle with index " << tris[0] << "(#" << 0;
@@ -137,7 +137,7 @@
 
         int * tri_tet_neighb_temp = pTetmesh->_getTriTetNeighb(tris[i]);
 
-    	if (tri_tet_neighb_temp[0] == -1 || tri_tet_neighb_temp[1] == -1)
+    	if (tri_tet_neighb_temp[0] == -1 or tri_tet_neighb_temp[1] == -1)
     	{
         	std::ostringstream os;
     		os << "Cannot add triangle with index " << tris[i] << "(#" << i;
@@ -149,7 +149,7 @@
     	steps::tetmesh::TmComp * icmp_temp = pTetmesh->getTetComp(tri_tet_neighb_temp[0]);
     	steps::tetmesh::TmComp * ocmp_temp = pTetmesh->getTetComp(tri_tet_neighb_temp[1]);
 
-    	if (icmp_temp == 0 || ocmp_temp == 0)
+    	if (icmp_temp == 0 or ocmp_temp == 0)
     	{
         	std::ostringstream os;
     		os << "Cannot add triangle with index " << tris[i] << "(#" << i;
--- cpp/geom/memb.cpp	Tue May 07 06:02:34 2013
+++ cpp/geom/memb.cpp	Sun Apr 21 19:37:48 2013
@@ -73,7 +73,7 @@
   	    throw steps::ArgErr(os.str());
     }
 
-    if (pOpt_method != 1 && pOpt_method != 2)
+    if (pOpt_method != 1 and pOpt_method != 2)
     {
     	std::ostringstream os;
 		os << "Unknown optimization method. Choices are 1 or 2.\n";
--- cpp/geom/tetmesh.cpp	Tue May 07 06:00:56 2013
+++ cpp/geom/tetmesh.cpp	Sun Apr 21 19:37:48 2013
@@ -2323,11 +2323,11 @@
 bool stetmesh::bar_vec_contains(std::vector<uint> bars0, std::vector<uint> bars1)
 {
 	uint bar00 = bars0[0];
-	if (bar00 == bars1[0] || bar00 == bars1[1] || bar00 == bars1[2]) return true;
+	if (bar00 == bars1[0] or bar00 == bars1[1] or bar00 == bars1[2]) return true;
 	uint bar01 = bars0[1];
-	if (bar01 == bars1[0] || bar01 == bars1[1] || bar01 == bars1[2]) return true;
+	if (bar01 == bars1[0] or bar01 == bars1[1] or bar01 == bars1[2]) return true;
 	uint bar02 = bars0[2];
-	if (bar02 == bars1[0] || bar02 == bars1[1] || bar02 == bars1[2]) return true;
+	if (bar02 == bars1[0] or bar02 == bars1[1] or bar02 == bars1[2]) return true;
 
 	return false;
 }
--- cpp/model/surfsys.cpp	Tue May 07 05:58:33 2013
+++ cpp/model/surfsys.cpp	Sun Apr 21 19:37:48 2013
@@ -531,7 +531,7 @@
 	{
 		SpecP dst = vdt->second->getDst();
 		SpecP src = vdt->second->getSrc();
-		if(dst == spec || src == spec)
+		if(dst == spec or src == spec)
 		{
 			vdt_del.push_back(vdt->second->getID());
 		}
--- cpp/solver/efield/tetmesh.cpp	Tue May 07 05:44:30 2013
+++ cpp/solver/efield/tetmesh.cpp	Sun Apr 21 19:37:48 2013
@@ -794,10 +794,10 @@
     double dta = 1.e-10;
     int maxit = 100;
 
-    double *x0 = new double[n];
+    double x0[n];
     for (int i = 0; i < n; i++)
     {
-        x0[i] = 1.0 / sqrt((double)(i+1));
+        x0[i] = 1.0 / sqrt(i+1);
     }
     *it=-1;
     int l = 1;
@@ -850,7 +850,6 @@
             }
         }
     }
-    delete[] x0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- cpp/tetexact/crstruct.hpp	Tue May 07 05:46:34 2013
+++ cpp/tetexact/crstruct.hpp	Sun Apr 21 19:37:48 2013
@@ -43,7 +43,7 @@
 
 struct CRGroup {
     CRGroup(int power, uint init_size = 1024) {
-        max = pow(2.0, power);
+        max = pow(2, power);
         sum = 0.0;
         capacity = init_size;
         size = 0;
--- cpp/tetexact/kproc.cpp	Tue May 07 05:48:08 2013
+++ cpp/tetexact/kproc.cpp	Sun Apr 21 19:37:48 2013
@@ -92,7 +92,6 @@
 {
     // Should never get called on base object
 	assert (false);
-    return 0.0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -101,7 +100,6 @@
 {
     // Should never get called on base object
 	assert (false);
-    return 0.0;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- cpp/tetexact/tet.cpp	Tue May 07 05:51:06 2013
+++ cpp/tetexact/tet.cpp	Sun Apr 21 19:37:48 2013
@@ -58,7 +58,7 @@
 
 stex::Tet::Tet
 (
-    uint idx, ssolver::Compdef * cdef, double vol,
+    uint idx, solver::Compdef * cdef, double vol,
     double a0, double a1, double a2, double a3,
     double d0, double d1, double d2, double d3,
     int tet0, int tet1, int tet2, int tet3
--- cpp/tetexact/tetexact.cpp	Tue May 07 05:53:32 2013
+++ cpp/tetexact/tetexact.cpp	Sun Apr 21 19:37:48 2013
@@ -2340,7 +2340,7 @@
 	uint lsidxB = compB->def()->specG2L(sidx);
 
 
-	if (lsidxA == ssolver::LIDX_UNDEFINED || lsidxB == ssolver::LIDX_UNDEFINED)
+	if (lsidxA == ssolver::LIDX_UNDEFINED or lsidxB == ssolver::LIDX_UNDEFINED)
 	{
 		std::ostringstream os;
 		os << "Species undefined in compartments connected by diffusion boundary.\n";
@@ -2358,7 +2358,7 @@
 	{
 		stex::Tet * tet = _tet(bdtets[bdt]);
 		uint direction = bdtetsdir[bdt];
-		assert(direction >= 0 && direction < 4);
+		assert(direction >= 0 and direction < 4);
 
 		// Each diff kproc then has access to the species through it's defined parent
 		uint ndiffs = tet->compdef()->countDiffs();
@@ -2389,7 +2389,7 @@
 	uint lsidxA = compA->def()->specG2L(sidx);
 	uint lsidxB = compB->def()->specG2L(sidx);
 
-	if (lsidxA == ssolver::LIDX_UNDEFINED || lsidxB == ssolver::LIDX_UNDEFINED)
+	if (lsidxA == ssolver::LIDX_UNDEFINED or lsidxB == ssolver::LIDX_UNDEFINED)
 	{
 		std::ostringstream os;
 		os << "Species undefined in compartments connected by diffusion boundary.\n";
@@ -2408,7 +2408,7 @@
 	{
 		stex::Tet * tet = _tet(bdtets[bdt]);
 		uint direction = bdtetsdir[bdt];
-		assert(direction >= 0 && direction < 4);
+		assert(direction >= 0 and direction < 4);
 
 		// Each diff kproc then has access to the species through it's defined parent
 		uint ndiffs = tet->compdef()->countDiffs();
--- cpp/tetexact/wmvol.cpp	Tue May 07 05:54:50 2013
+++ cpp/tetexact/wmvol.cpp	Sun Apr 21 19:37:48 2013
@@ -52,7 +52,7 @@
 
 stex::WmVol::WmVol
 (
-    uint idx, ssolver::Compdef * cdef, double vol
+    uint idx, solver::Compdef * cdef, double vol
 )
 : pIdx(idx)
 , pCompdef(cdef)
--- cpp/tetode/tet.cpp	Tue May 07 05:32:52 2013
+++ cpp/tetode/tet.cpp	Sun Apr 21 19:37:48 2013
@@ -44,7 +44,7 @@
 
 stode::Tet::Tet
 (
-    uint idx, ssolver::Compdef * cdef, double vol,
+    uint idx, solver::Compdef * cdef, double vol,
     double a0, double a1, double a2, double a3,
     double d0, double d1, double d2, double d3,
     int tet0, int tet1, int tet2, int tet3
--- cpp/tetode/tetode.cpp	Tue May 07 05:36:21 2013
+++ cpp/tetode/tetode.cpp	Sun Apr 21 19:37:48 2013
@@ -1093,7 +1093,7 @@
 void stode::TetODE::setTolerances(double atol, double rtol)
 {
 	// I suppose they shouldn't be negative
-	if (atol < 0.0 || rtol < 0.0)
+	if (atol < 0.0 or rtol < 0.0)
 	{
 		std::ostringstream os;
 		os << "Neither absolute tolerance nor relative tolerance should ";
@@ -1226,9 +1226,9 @@
 
 	int flag = 0;
 
-	if (! pInitialised)
+	if (not pInitialised)
 	{
-		if (! pTolsset)
+		if (not pTolsset)
 		{
 			std::cout << "Warning: tolerances have not been set and will ";
 			std::cout << "retain default values\n";
@@ -2221,7 +2221,7 @@
 					double val = Ith(y,(*q).spec_idx);
                     uint order = (*q).order;
                     if (order == 1) dydt_r*=val;
-					else dydt_r*=pow(val, (int)order);
+					else dydt_r*=pow(val, order);
 				}
 			}
 			dydt+=dydt_r;
--- cpp/wmdirect/kproc.cpp	Tue May 07 05:56:26 2013
+++ cpp/wmdirect/kproc.cpp	Sun Apr 21 19:37:48 2013
@@ -77,7 +77,6 @@
 {
 	// Should only be called on derived object
 	assert (false);
-    return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -86,7 +85,6 @@
 {
 	// Should olny be called on derived object
 	assert (false);
-    return NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
--- steps/model.py	Tue May 07 06:15:41 2013
+++ steps/model.py	Sun Apr 21 19:37:50 2013
@@ -270,7 +270,7 @@
             * float dcst (default = 0.0)
         """
         
-        this = _steps_swig.new_Diff(*args)
+        this = _steps_swig.new_Diff(*args, **kwargs)
         try: self.this.append(this)
         except: self.this = this
         self.thisown = 0
