Index: ../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp	(revision 13762)
@@ -19,9 +19,7 @@
 
 void AverageOntoPartitionx(double** paverage, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,double* vertex_response){
 
-	int     i,j,k;
 	int     dummy;
-
 	int     npart;
 	double *qmu_part  = NULL;
 	int     numberofvertices;
@@ -47,7 +45,7 @@
 	vec_average=new Vector<IssmDouble>(npart);
 
 	/*loop on each element, and add contribution of the element to the partition (surface weighted average): */
-	for(i=0;i<elements->Size();i++){
+	for(int i=0;i<elements->Size();i++){
 		Element* element=(Element*)elements->GetObjectByOffset(i);
 		element->AverageOntoPartition(partition_contributions,partition_areas,vertex_response,qmu_part);
 	}
Index: ../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp	(revision 13762)
@@ -29,7 +29,6 @@
 	int    i0,i1,i2;
 	double areacoord[3];
 	double aa,bb;
-	double data_value;
 	Icoor2 dete[3];
 
 	/*Checks*/
Index: ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/ElementSegment.cpp	(revision 13762)
@@ -8,8 +8,6 @@
 	/*We have a tria element (xnodes,ynodes) and a segment (xsegment,ysegment). Find whether they intersect. 
 	 * If they do, create a Segment object with the intersection, and add to segments_dataset dataset: */
 
-	int i;
-	double alpha;
 	double alpha1,alpha2;
 	double beta1,beta2;
 	double gamma1,gamma2;
Index: ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp	(revision 13762)
@@ -6,7 +6,6 @@
 void MeshProfileIntersectionx( double** psegments, int* pnumsegs, int* index, double* x, double* y, int nel, int nods,  Contour<IssmPDouble>** contours,int numcontours){
 
 	int i,j,k;
-	int m,n;
 
 	/*Contour:*/
 	Contour<IssmPDouble>* contouri=NULL;
Index: ../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Reduceloadx/Reduceloadx.cpp	(revision 13762)
@@ -19,7 +19,6 @@
 	int         Kfsm,Kfsn;
 	int         global_m,global_n;
 	bool        fromlocalsize = true;
-	int         verbose;
 
 	if(VerboseModule()) _pprintLine_("   Dirichlet lifting applied to load vector");
 
Index: ../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Kml2Expx/Kml2Expx.cpp	(revision 13762)
@@ -24,7 +24,7 @@
 int Kml2Expx(char* filkml,char* filexp,
 			 int sgn,double cm,double sp){
 
-	int     i,iret=0;
+	int     iret=0;
 	double  *lat=NULL,*lon=NULL;
 
 	KML_Object*  kobj=NULL;
Index: ../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/HoleFillerx/HoleFillerx.cpp	(revision 13762)
@@ -10,14 +10,11 @@
 
 int HoleFillerx(double** pimageout,double* image, int lines,int samps,int smooth){
 
-	FILE 			*fp1;
-	unsigned long	filesize;
 	long			infinit;
 	double          temp;
-	long			i, j, k, l, ii, jj, bytes;
+	long			i, j, k, l, ii, jj;
 	long			iii, jjj;
-	long			test, prevlines, prevpix, test1, test2, thresh,counter;
-	long			bell, cycles, leftovers;
+	long			test;
 	float			howlong;
 	float			nsteps, ssteps, wsteps, esteps;
 	float			nwsteps, nesteps, swsteps, sesteps;
@@ -38,9 +35,6 @@
 	double*         image3=NULL;
 	double*         image4=NULL;
 
-	/*Added to original routine: */
-	int             imageoutsize;
-
 	 /*^^^^^^^^^^^^^  Remove pixels close to the holes ^^^^^^^^^^^^^*/
 	image2 = xNew<double>(lines*samps);
 	memcpy(image2,image,lines*samps*sizeof(double));
Index: ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp	(revision 13762)
@@ -39,9 +39,6 @@
 
 int ContourToNodesx(SeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){
 
-	int i;
-	int m,n;
-
 	/*Contour:*/
 	Contour<IssmPDouble>* contouri=NULL;
 	int      numnodes;
@@ -55,7 +52,7 @@
 
 	/*Loop through all contours: */
 	if(contours){
-		for (i=0;i<contours->Size();i++){
+		for(int i=0;i<contours->Size();i++){
 			Contour<IssmPDouble>* contour=(Contour<IssmPDouble>*)contours->GetObjectByOffset(i);
 			IsInPoly(flags,contour->x,contour->y,contour->nods,x,y,0,nods,edgevalue);
 		}
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp	(revision 13762)
@@ -12,14 +12,8 @@
 
 void	CreateLoadsHydrology(Loads** ploads, IoModel* iomodel){
 
-	/*Intermediary*/
-	int i;
-
-	/*DataSet*/
-	Loads*    loads    = NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp	(revision 13762)
@@ -13,11 +13,8 @@
 
 void	CreateConstraintsHydrology(Constraints** pconstraints, IoModel* iomodel){
 
-	/*Output*/
-	Constraints *constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp	(revision 13762)
@@ -19,14 +19,11 @@
 	bool continuous_galerkin=true;
 	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateLoadsDiagnosticHutter(Loads** ploads, IoModel* iomodel){
 
-	/*DataSet*/
-	Loads* loads=NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 13762)
@@ -20,15 +20,12 @@
 	int    numberofvertices;
 	bool   ishutter;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 	iomodel->Constant(&ishutter,FlowequationIshutterEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp	(revision 13762)
@@ -27,7 +27,6 @@
 	IssmDouble *spcvector  = NULL;
 	IssmDouble* times=NULL;
 	IssmDouble* values=NULL;
-	Constraints* constraints = NULL;
 
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
@@ -36,7 +35,7 @@
 	iomodel->Constant(&referencetemperature,ConstantsReferencetemperatureEnum);
 
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp	(revision 13762)
@@ -19,14 +19,11 @@
 	bool continuous_galerkin=true;
 	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateLoadsEnthalpy.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateLoadsEnthalpy.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Enthalpy/CreateLoadsEnthalpy.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateLoadsEnthalpy(Loads** ploads, IoModel* iomodel){
 
-	/*DataSet*/
-	Loads* loads=NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp	(revision 13762)
@@ -19,16 +19,13 @@
 	IssmDouble yts;
 	int    numberofvertices;
 
-	/*Output*/
-	Constraints* constraints = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
 	iomodel->Constant(&yts,ConstantsYtsEnum);
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp	(revision 13762)
@@ -20,15 +20,12 @@
 	int    dim;
 	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateLoadsDiagnosticVert(Loads** ploads, IoModel* iomodel){
 
-	/*DataSet*/
-	Loads* loads=NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp	(revision 13762)
@@ -22,16 +22,13 @@
 	int numvertex_pairing;
 	int numberofelements;
 
-	/*DataSet*/
-	Loads*    loads    = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&stabilization,PrognosticStabilizationEnum);
 	iomodel->Constant(&numberofelements,MeshNumberofelementsEnum);
 	iomodel->Constant(&numberofedges,MeshNumberofedgesEnum);
 
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp	(revision 13762)
@@ -9,16 +9,12 @@
 
 void	CreateConstraintsPrognostic(Constraints** pconstraints, IoModel* iomodel){
 
+	/*Fetch parameters: */
 	int stabilization;
-
-	/*Fetch parameters: */
 	iomodel->Constant(&stabilization,PrognosticStabilizationEnum);
 
-	/*Output*/
-	Constraints *constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp	(revision 13762)
@@ -25,9 +25,6 @@
 	int    numberofvertices;
 	int    stabilization;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
 	iomodel->Constant(&numberofelements,MeshNumberofelementsEnum);
@@ -35,7 +32,7 @@
 	iomodel->Constant(&stabilization,PrognosticStabilizationEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateLoadsSurfaceSlope(Loads** ploads, IoModel* iomodel){
 
-	/*DataSet*/
-	Loads*    loads    = NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateConstraintsSurfaceSlope(Constraints** pconstraints, IoModel* iomodel){
 
-	/*Output*/
-	Constraints* constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp	(revision 13762)
@@ -15,18 +15,14 @@
 void	CreateNodesSurfaceSlope(Nodes** pnodes, IoModel* iomodel){
 
 	/*Intermediary*/
-	int i;
 	bool continuous_galerkin=true;
 	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
@@ -37,8 +33,7 @@
 	/*First fetch data: */
 	iomodel->FetchData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
 
-	for (i=0;i<numberofvertices;i++){
-
+	for(int i=0;i<numberofvertices;i++){
 		if(iomodel->my_vertices[i]){
 
 			/*Add node to nodes dataset: */
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp	(revision 13762)
@@ -16,13 +16,10 @@
 	int i;
 	int    dim;
 	int    numberofvertices;
-
-	/*DataSet*/
-	Loads*    loads    = NULL;
 	Pengrid*    pengrid  = NULL;
 
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp	(revision 13762)
@@ -13,19 +13,12 @@
 
 void	CreateConstraintsThermal(Constraints** pconstraints, IoModel* iomodel){
 
-	/*Intermediary*/
-	int i;
-	int count;
+	/*Fetch parameters: */
 	int    dim;
-
-	/*Output*/
-	Constraints* constraints = NULL;
-
-	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
 
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp	(revision 13762)
@@ -15,18 +15,14 @@
 void	CreateNodesThermal(Nodes** pnodes, IoModel* iomodel){
 
 	/*Intermediary*/
-	int i;
 	bool continuous_galerkin=true;
-	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
+	int    numberofvertices;
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
@@ -37,8 +33,7 @@
 	/*Create nodes and vertices: */
 	iomodel->FetchData(6,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
 
-	for (i=0;i<numberofvertices;i++){
-
+	for(int i=0;i<numberofvertices;i++){
 		if(iomodel->my_vertices[i]){
 			/*Add node to nodes dataset: */
 			nodes->AddObject(new Node(iomodel->nodecounter+i+1,i,i+1,i,iomodel,ThermalAnalysisEnum));
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateLoadsBedSlope(Loads** ploads, IoModel* iomodel){
 
-	/*DataSet*/
-	Loads*    loads    = NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp	(revision 13762)
@@ -12,11 +12,8 @@
 
 void	CreateConstraintsBedSlope(Constraints** pconstraints, IoModel* iomodel){
 
-	/*Output*/
-	Constraints* constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp	(revision 13762)
@@ -17,16 +17,13 @@
 	/*Intermediary*/
 	int i;
 	bool continuous_galerkin=true;
-	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
+	int    numberofvertices;
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp	(revision 13762)
@@ -13,14 +13,8 @@
 void	CreateLoadsMelting(Loads** ploads, IoModel* iomodel){
 
 	/*Intermediary*/
-	int i;
-	int    dim;
-	int    numberofvertices;
-
-	/*DataSet*/
-	Loads*    loads    = NULL;
-
-	/*Fetch parameters: */
+	int dim;
+	int numberofvertices;
 	iomodel->Constant(&dim,MeshDimensionEnum);
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
@@ -28,7 +22,7 @@
 	if (dim==2) _error_("2d meshes not supported yet");
 
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
@@ -37,7 +31,7 @@
 	iomodel->FetchData(2,MeshVertexonbedEnum,MeshElementsEnum);
 	CreateSingleNodeToElementConnectivity(iomodel);
 
-	for (i=0;i<numberofvertices;i++){
+	for(int i=0;i<numberofvertices;i++){
 		if((iomodel->my_vertices[i]==1)){
 			if (reCast<int>(iomodel->Data(MeshVertexonbedEnum)[i])){
 				loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,MeltingAnalysisEnum));
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateConstraintsMelting.cpp	(revision 13762)
@@ -12,15 +12,8 @@
 
 void	CreateConstraintsMelting(Constraints** pconstraints, IoModel* iomodel){
 
-	/*Intermediary*/
-	int i;
-	int count;
-
-	/*Intermediary*/
-	Constraints* constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp	(revision 13762)
@@ -19,14 +19,11 @@
 	bool continuous_galerkin=true;
 	int    numberofvertices;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp	(revision 13762)
@@ -13,7 +13,6 @@
 void	CreateLoadsDiagnosticHoriz(Loads** ploads, IoModel* iomodel){
 
 	/*DataSets*/
-	Loads     *loads     = NULL;
 	Icefront  *icefront  = NULL;
 	Riftfront *riftfront = NULL;
 	Pengrid   *pengrid   = NULL;
@@ -47,7 +46,7 @@
 	iomodel->Constant(&numrifts,RiftsNumriftsEnum);
 
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp	(revision 13762)
@@ -20,9 +20,6 @@
 	int    numberofvertices;
 	bool   isstokes,isl1l2,ismacayealpattyn;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&numberofvertices,MeshNumberofverticesEnum);
 	iomodel->Constant(&isstokes,FlowequationIsstokesEnum);
@@ -30,7 +27,7 @@
 	iomodel->Constant(&ismacayealpattyn,FlowequationIsmacayealpattynEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*First create nodes*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp	(revision 13762)
@@ -25,9 +25,6 @@
 	int    numberofvertices;
 	int    stabilization;
 
-	/*DataSets: */
-	Nodes*    nodes = NULL;
-
 	/*Fetch parameters: */
 	iomodel->Constant(&dim,MeshDimensionEnum);
 	iomodel->Constant(&numberofelements,MeshNumberofelementsEnum);
@@ -35,7 +32,7 @@
 	iomodel->Constant(&stabilization,BalancethicknessStabilizationEnum);
 
 	/*Recover pointer: */
-	nodes=*pnodes;
+	Nodes* nodes=*pnodes;
 
 	/*Create nodes if they do not exist yet*/
 	if(!nodes) nodes = new Nodes();
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp	(revision 13762)
@@ -13,7 +13,6 @@
 void	CreateLoadsBalancethickness(Loads** ploads, IoModel* iomodel){
 
 	/*Intermediary*/
-	int i;
 	int element;
 	int stabilization;
 	int numberofedges;
@@ -22,11 +21,8 @@
 	iomodel->Constant(&stabilization,BalancethicknessStabilizationEnum);
 	iomodel->Constant(&numberofedges,MeshNumberofedgesEnum);
 
-	/*Output*/
-	Loads*    loads    = NULL;
-
 	/*Recover pointer: */
-	loads=*ploads;
+	Loads* loads=*ploads;
 
 	/*Create loads if they do not exist yet*/
 	if(!loads) loads = new Loads();
@@ -38,7 +34,7 @@
 		iomodel->FetchData(3,MeshEdgesEnum,MeshElementsEnum,ThicknessEnum);
 
 		/*First load data:*/
-		for (i=0;i<numberofedges;i++){
+		for (int i=0;i<numberofedges;i++){
 
 			/*Get left and right elements*/
 			element=reCast<int,IssmDouble>(iomodel->Data(MeshEdgesEnum)[4*i+2])-1; //edges are [node1 node2 elem1 elem2]
Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp	(revision 13762)
@@ -9,16 +9,12 @@
 
 void	CreateConstraintsBalancethickness(Constraints** pconstraints, IoModel* iomodel){
 
+	/*Fetch parameters: */
 	int    stabilization;	
-
-	/*Fetch parameters: */
 	iomodel->Constant(&stabilization,BalancethicknessStabilizationEnum);
 
-	/*Output*/
-	Constraints* constraints = NULL;
-
 	/*Recover pointer: */
-	constraints=*pconstraints;
+	Constraints* constraints=*pconstraints;
 
 	/*Create constraints if they do not exist yet*/
 	if(!constraints) constraints = new Constraints();
Index: ../trunk-jpl/src/c/modules/NodesDofx/NodesDofx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/NodesDofx/NodesDofx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/NodesDofx/NodesDofx.cpp	(revision 13762)
@@ -13,7 +13,6 @@
 
 	int noerr=1;
 	int found=0;
-	int i;
 
 	/*Do we have any nodes for this analysis type? :*/
 	if(nodes->NumberOfNodes(configuration_type)){ 
Index: ../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 13762)
@@ -44,7 +44,6 @@
 
 	int num_unstable_constraints=0;
 	int converged=0;
-	int potential;
 
 	RiftConstrain(&num_unstable_constraints,loads,configuration_type);
 	if(num_unstable_constraints==0)converged=1;
Index: ../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 13762)
@@ -35,7 +35,6 @@
 
 	/*Intermediary: */
 	int        local_m,local_n,global_m,global_n;
-	int        analysis_type;
 
 	/*Solver */
 	KSP        ksp              = NULL;
Index: ../trunk-jpl/src/c/modules/Solverx/Solverx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 13762)
@@ -15,9 +15,6 @@
 
 void	Solverx(Vector<IssmDouble>** puf, Matrix<IssmDouble>* Kff, Vector<IssmDouble>* pf, Vector<IssmDouble>* uf0,Vector<IssmDouble>* df, Parameters* parameters){
 
-	/*Intermediary: */
-	int analysis_type;
-
 	/*output: */
 	Vector<IssmDouble> *uf=NULL;
 
Index: ../trunk-jpl/src/c/modules/Orthx/Orthx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Orthx/Orthx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Orthx/Orthx.cpp	(revision 13762)
@@ -10,7 +10,7 @@
 	Vector<IssmDouble>* newgradj=NULL;
 
 	/*intermediary:*/
-	IssmDouble norm_new,norm_old,dot_product;;
+	IssmDouble norm_old,dot_product;;
 
 	/*Initialize output*/
 	newgradj=gradj->Duplicate();
Index: ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/TriaSearchx/TriaSearchx.cpp	(revision 13762)
@@ -23,15 +23,10 @@
 	/*Intermediary*/
 	R2     r;
 	I2     I;
-	int    i,j,k;
-	int    i0,i1,i2;
-	double areacoord[3];
-	double aa,bb;
-	double data_value;
+	int    i;
 	Icoor2 dete[3];
-	int verbose=0;
 
-	// read background mesh 
+	/* read background mesh */
 	Mesh Th(index,x,y,nods,nel); 
 	Th.CreateSingleVertexToTriangleConnectivity();
 
Index: ../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 13762)
@@ -19,8 +19,8 @@
 	int    nbsmooth;
 
 	/*intermediary*/
+	int i;
 	int noerr=1;
-	int i,j,num;
 	double costheta=2;
 	double hminaniso=1e-100; 
 	Mesh* Thr=NULL;
Index: ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 13762)
@@ -11,10 +11,6 @@
 
 int ContourToMeshx(SeqVec<double>** pin_nod,SeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
 
-	int noerr=1;
-	int i;
-	int m,n;
-
 	/*Contour:*/
 	double*  in_nod_serial;
 	double   value;
@@ -51,7 +47,7 @@
 
 	/*Take care of the case where an element interpolation has been requested: */
 	if ((strcmp(interptype,"element")==0) || (strcmp(interptype,"element and node")==0)){
-		for (n=0;n<nel;n++){
+		for(int n=0;n<nel;n++){
 			if ( (in_nod_serial[ (int)*(index+3*n+0) -1] == 1) && (in_nod_serial[ (int)*(index+3*n+1) -1] == 1) && (in_nod_serial[ (int)*(index+3*n+2) -1] == 1) ){
 				value=1; in_elem->SetValue(n,value,INS_VAL);
 			}
@@ -68,5 +64,5 @@
 	/*Free ressources:*/
 	xDelete<double>(in_nod_serial);
 
-	return noerr;
+	return 1;
 }
Index: ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 13761)
+++ ../trunk-jpl/src/c/modules/IoModelToConstraintsx/IoModelToConstraintsx.cpp	(revision 13762)
@@ -13,19 +13,16 @@
 
 	/*intermediary: */
 	int     i,j;
-	bool    transient     = false;
+	bool        transient        = false;
+	FILE       *fid              = NULL;
+	int         code             = 0;
+	int         vector_layout    = 0;
+	IssmDouble *times            = NULL;
+	IssmDouble *values           = NULL;
+	bool        spcpresent       = false;
+	int         count            = 0;
+	int         numberofvertices;
 
-	FILE   *fid           = NULL;
-	int     code          = 0;
-	int     vector_layout = 0;
-	int     counter;
-	int     nods;
-	IssmDouble* times=NULL;
-	IssmDouble* values=NULL;
-	bool    spcpresent=false;
-	int     count=0;
-	int     numberofvertices;
-
 	/*variables being fetched: */
 	IssmDouble *IssmDoublevector  = NULL;
 	int     M,N;
