Index: /issm/trunk/src/c/objects/Beam.h
===================================================================
--- /issm/trunk/src/c/objects/Beam.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Beam.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _BEAM_H_
 
+/*Headers:*/
+/*{{{1*/
 
 #include "./Element.h"
@@ -21,4 +23,5 @@
 class Element;
 class Hook;
+/*}}}*/
 
 class Beam: public Element{
Index: /issm/trunk/src/c/objects/BeamVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/BeamVertexInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/BeamVertexInput.h	(revision 3637)
@@ -3,8 +3,13 @@
  */
 
-#include "./Input.h"
 
 #ifndef _BEAMVERTEXINPUT_H_
 #define _BEAMVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
+
 
 class BeamVertexInput: public Input{
Index: /issm/trunk/src/c/objects/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/BoolInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/BoolInput.h	(revision 3637)
@@ -3,9 +3,13 @@
  */
 
-#include "./Input.h"
-#include "../include/types.h"
 
 #ifndef _BOOLINPUT_H_
 #define _BOOLINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
 
 class BoolInput: public Input{
Index: /issm/trunk/src/c/objects/DakotaPlugin.h
===================================================================
--- /issm/trunk/src/c/objects/DakotaPlugin.h	(revision 3636)
+++ /issm/trunk/src/c/objects/DakotaPlugin.h	(revision 3637)
@@ -8,7 +8,13 @@
 #ifdef _HAVE_DAKOTA_ //only works if dakota library has been compiled in.
 
+/*Headers:*/
+/*{{{1*/
+
+
 #include "DirectApplicInterface.H"
 #include "../toolkits/toolkits.h"
 #include "../objects/objects.h"
+
+/*}}}*/
 
 namespace SIM {
Index: /issm/trunk/src/c/objects/DofObject.h
===================================================================
--- /issm/trunk/src/c/objects/DofObject.h	(revision 3636)
+++ /issm/trunk/src/c/objects/DofObject.h	(revision 3637)
@@ -7,6 +7,9 @@
 #define _DOFOBJECT_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class DofObject{
Index: /issm/trunk/src/c/objects/DofVec.h
===================================================================
--- /issm/trunk/src/c/objects/DofVec.h	(revision 3636)
+++ /issm/trunk/src/c/objects/DofVec.h	(revision 3637)
@@ -6,9 +6,12 @@
 #define _DOFVEC_H_
 
-
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../toolkits/toolkits.h"
 
 #define DOFVECNAMESIZE 20
+/*}}}*/
+
 
 class DofVec: public Object{
Index: /issm/trunk/src/c/objects/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/DoubleInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/DoubleInput.h	(revision 3637)
@@ -3,9 +3,13 @@
  */
 
-#include "./Input.h"
-#include "../include/types.h"
 
 #ifndef _DOUBLEINPUT_H_
 #define _DOUBLEINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
 
 class DoubleInput: public Input{
Index: /issm/trunk/src/c/objects/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Element.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Element.h	(revision 3637)
@@ -9,8 +9,11 @@
 #define _ELEMENT_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../DataSet/DataSet.h"
 #include "../DataSet/Parameters.h"
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class Element: public Object{
Index: /issm/trunk/src/c/objects/FemModel.h
===================================================================
--- /issm/trunk/src/c/objects/FemModel.h	(revision 3636)
+++ /issm/trunk/src/c/objects/FemModel.h	(revision 3637)
@@ -6,7 +6,8 @@
 #define _FEMMODEL_H_
 
+/*Headers:*/
+/*{{{1*/
 class DataSet;
 class DofVec;
-
 #include "./Object.h"
 #include "../DataSet/DataSet.h"
@@ -15,4 +16,5 @@
 #include "../toolkits/toolkits.h"
 #include "../parallel/parallel.h"
+/*}}}*/
 
 class FemModel: public Object{
Index: /issm/trunk/src/c/objects/Hook.h
===================================================================
--- /issm/trunk/src/c/objects/Hook.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Hook.h	(revision 3637)
@@ -9,10 +9,12 @@
 #define _HOOK_H_
 
+/*Headers:*/
+/*{{{1*/
 class DataSet;
 class Object;
-
 #include "./Object.h"
 #include "../DataSet/DataSet.h"
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class Hook{
Index: /issm/trunk/src/c/objects/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Icefront.cpp	(revision 3636)
+++ /issm/trunk/src/c/objects/Icefront.cpp	(revision 3637)
@@ -3,5 +3,6 @@
  */
 
-
+/*Headers:*/
+/*{{{1*/
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -17,5 +18,6 @@
 #include "../include/macros.h"
 #include "./Icefront.h"
-		
+/*}}}*/	
+
 /*Object constructors and destructor*/
 /*FUNCTION Icefront::Icefront() {{{1*/
@@ -25,18 +27,19 @@
 }
 /*}}}*/
-/*FUNCTION Icefront::Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id){{{1*/
-Icefront::Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id):
-	hnodes(icefront_node_ids,num_nodes),
-	helement(&icefront_matice_id,1),
+/*FUNCTION Icefront::Icefront(int id, int* node_ids, int numnodes, int element_id, int matpar_id){{{1*/
+Icefront::Icefront(int icefront_id,int* icefront_node_ids, int icefront_numnodes, int icefront_element_id, int icefront_matpar_id): 
+	hnodes(icefront_node_ids,icefront_numnodes),
+	helement(&icefront_element_id,1),
 	hmatpar(&icefront_matpar_id,1)
 {
 
-	/*all the initialization has been done by the initializer, just fill in the id: */
+	/*all the initialization has been done by the initializer, just fill in the id : */
 	this->id=icefront_id;
 	this->parameters=NULL;
 	this->inputs=new Inputs();
-}
-/*}}}*/
-/*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* icefront_inputs) {{{1*/
+
+}
+/*}}}*/
+/*FUNCTION Icefront::Icefront(int id, Hook* hnodes, Hook* helement, Hook* hmatpar, DataSet* parameters, Inputs* icefront_inputs) {{{1*/
 Icefront::Icefront(int icefront_id,Hook* icefront_hnodes, Hook* icefront_helement, Hook* icefront_hmatpar, Parameters* icefront_parameters, Inputs* icefront_inputs):
 	hnodes(icefront_hnodes),
@@ -61,13 +64,13 @@
 
 	int segment_width;
-	int i1,i2,i3,i4;
 	int element;
-
-	/*icefront intermediary data: */
+	int num_nodes;
+
+	/*icefront constructor data: */
+	int  icefront_eid;
+	int  icefront_mparid;
 	int  icefront_node_ids[MAX_ICEFRONT_GRIDS];
-	int  num_nodes;
-	int  icefront_mparid;
-	int  icefront_eid;
 	int  icefront_fill;
+	int  icefront_type;
 
 	/*First, retrieve element index and element type: */
@@ -80,7 +83,7 @@
 	element=(int)(*(iomodel->pressureload+segment_width*i+segment_width-2)-1); //element is in the penultimate column (grid1 grid2 ... elem fill)
 
-	/*Setup all ids, so we can get our hooks setup: */
+	/*Build ids for hook constructors: */
+	icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
 	icefront_mparid=iomodel->numberofelements+1; //matlab indexing
-	icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
 
 	icefront_node_ids[0]=(int)*(iomodel->pressureload+segment_width*i+0);
@@ -89,18 +92,16 @@
 	if (iomodel->sub_analysis_type==HorizAnalysisEnum){
 		if ((int)*(iomodel->elements_type+2*element+0)==MacAyealFormulationEnum){ //this is a collapsed 3d element, icefront will be 2d
-			num_nodes=2;
+			icefront_type=SegmentIcefrontEnum;
 		}
 		else if ((int)*(iomodel->elements_type+2*element+0)==PattynFormulationEnum){ //this is a real 3d element, icefront will be 3d.
-			num_nodes=4;
+			icefront_type=QuadIceFrontEnum;
 			icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
 			icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
 		}
-		else{
-			ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
-		}
+		else ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
 	}
 	else if (iomodel->sub_analysis_type==StokesAnalysisEnum){
 		//We have a Stokes element, so we need a 3d Icefront
-		num_nodes=4;
+		icefront_type=QuadIceFrontEnum;
 		icefront_node_ids[2]=(int)*(iomodel->pressureload+segment_width*i+2);
 		icefront_node_ids[3]=(int)*(iomodel->pressureload+segment_width*i+3);
@@ -108,18 +109,23 @@
 	else ISSMERROR("Not supported yet!");
 
-	/*Ok, get the hooks setup: */
+	if (icefront_type==QuadIceFrontEnum) num_nodes=4;
+	else num_nodes=2;
+	icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 
+	
+	/*Ok, we have everything to build the object: */
+	this->id=icefront_id;
+
+	/*Hooks: */
 	this->hnodes.Init(icefront_node_ids,num_nodes);
-	this->helement.Init(&icefront_element_id,1);
-	this->hmatpar.Init(&icefront_matpar_id,1);
-
-	//intialize inputs, and add as many inputs per element as requested: 
+	this->helement.Init(&icefront_eid,1);
+	this->hmatpar.Init(&icefront_mparid,1);
+
+	//intialize  and add as many inputs per element as requested: 
 	this->inputs=new Inputs();
-		
-	icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 
 	this->inputs->AddInput(new IntInput(FillEnum,icefront_fill));
-
+	this->inputs->AddInput(new IntInput(TypeEnum,icefront_type));
+	
 	//this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
 	this->parameters=NULL;
-
 }
 
@@ -128,5 +134,6 @@
 /*FUNCTION Icefront::~Icefront() {{{1*/
 Icefront::~Icefront(){
-	return;
+	delete inputs;
+	this->parameters=NULL;
 }
 /*}}}*/
@@ -134,7 +141,7 @@
 /*Object marshall*/
 /*FUNCTION Icefront Configure {{{1*/
-void  Icefront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin);
-	
-/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+void  Icefront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
 	 * datasets, using internal ids and offsets hidden in hooks: */
 	hnodes.configure(nodesin);
@@ -151,19 +158,19 @@
 }
 /*}}}*/
-/*FUNCTION Icefront DeepEcho {{{1*/
+/*FUNCTION Icefront::DeepEcho{{{1*/
 void Icefront::DeepEcho(void){
 
 	printf("Icefront:\n");
 	printf("   id: %i\n",id);
-	hnodes.Echo();
-	helement.Echo();
-	hmatpar.Echo();
+	hnodes.DeepEcho();
+	helement.DeepEcho();
+	hmatpar.DeepEcho();
 	printf("   parameters\n");
-	parameters->Echo();
+	parameters->DeepEcho();
 	printf("   inputs\n");
-	inputs->Echo();
-}		
-/*}}}*/
-/*FUNCTION Icefront Demarshall {{{1*/
+	inputs->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION Icefront::Demarshall {{{1*/
 void  Icefront::Demarshall(char** pmarshalled_dataset){
 
@@ -197,5 +204,4 @@
 /*FUNCTION Icefront Echo {{{1*/
 void Icefront::Echo(void){
-
 	this->DeepEcho();
 }
@@ -209,5 +215,5 @@
 /*}}}*/
 /*FUNCTION Icefront GetId {{{1*/
-int    Icefront::GetId(void){ return sid; }
+int    Icefront::GetId(void){ return id; }
 /*}}}*/
 /*FUNCTION Icefront GetName {{{1*/
@@ -216,7 +222,6 @@
 }
 /*}}}*/
-/*FUNCTION Icefront Marshall {{{1*/
+/*FUNCTION Icefront::Marshall {{{1*/
 void  Icefront::Marshall(char** pmarshalled_dataset){
-
 
 	char* marshalled_dataset=NULL;
@@ -228,11 +233,11 @@
 	marshalled_dataset=*pmarshalled_dataset;
 
-	/*get enum type of Tria: */
-	enum_type=TriaEnum;
+	/*get enum type of Icefront: */
+	enum_type=IcefrontEnum;
 
 	/*marshall enum: */
 	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
 
-	/*marshall Tria data: */
+	/*marshall Icefront data: */
 	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
 
@@ -253,10 +258,9 @@
 
 	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION Icefront MarshallSize{{{1*/
+}
+/*}}}*/
+/*FUNCTION Icefront::MarshallSize {{{1*/
 int   Icefront::MarshallSize(){
-
+	
 	return sizeof(id)
 		+hnodes.MarshallSize()
@@ -277,5 +281,5 @@
 /*FUNCTION Icefront CreateKMatrix {{{1*/
 
-void  Icefront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Icefront::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	/*No stiffness loads applied, do nothing: */
@@ -286,10 +290,10 @@
 /*}}}*/
 /*FUNCTION Icefront CreatePVector {{{1*/
-void  Icefront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void  Icefront::CreatePVector(Vec pg, int analysis_type,int sub_analysis_type){
 
 	/*Just branch to the correct element icefront vector generator, according to the type of analysis we are carrying out: */
 	if (analysis_type==ControlAnalysisEnum){
 		
-		CreatePVectorDiagnosticHoriz( pg,inputs,analysis_type,sub_analysis_type);
+		CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
 
 	}
@@ -298,10 +302,10 @@
 		if (sub_analysis_type==HorizAnalysisEnum){
 		
-			CreatePVectorDiagnosticHoriz( pg,inputs,analysis_type,sub_analysis_type);
+			CreatePVectorDiagnosticHoriz( pg,analysis_type,sub_analysis_type);
 
 		}
 		else if (sub_analysis_type==StokesAnalysisEnum){
 			
-			CreatePVectorDiagnosticStokes( pg,inputs,analysis_type,sub_analysis_type);
+			CreatePVectorDiagnosticStokes( pg,analysis_type,sub_analysis_type);
 
 		}
@@ -315,18 +319,20 @@
 /*}}}*/
 /*FUNCTION Icefront CreatePVectorDiagnosticHoriz {{{1*/
-void Icefront::CreatePVectorDiagnosticHoriz( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void Icefront::CreatePVectorDiagnosticHoriz( Vec pg,  int analysis_type,int sub_analysis_type){
+	
+	int type;
+	inputs->GetParameterValue(&type,TypeEnum);
 
 	/*Branck on the type of icefront: */
-	if (strcmp(type,"segment")==0){
-		CreatePVectorDiagnosticHorizSegment(pg,inputs,analysis_type,sub_analysis_type);
+	if (type==SegmentIcefrontEnum){
+		CreatePVectorDiagnosticHorizSegment(pg,analysis_type,sub_analysis_type);
 	}
 	else{
-		CreatePVectorDiagnosticHorizQuad(pg,inputs,analysis_type,sub_analysis_type);
+		CreatePVectorDiagnosticHorizQuad(pg,analysis_type,sub_analysis_type);
 	}
 }	
 /*}}}*/
 /*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/
-
-void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
+void Icefront::CreatePVectorDiagnosticHorizSegment( Vec pg,int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -350,15 +356,19 @@
 	double normal[2];
 	double length;
+	int    element_type;
 
 	/*Objects: */
-	double  pe_g[numdofs];
-	Matpar* matpar=NULL;
-	Node**  element_nodes=NULL;
-	ParameterInputs* inputs=NULL;
-
-	inputs=(ParameterInputs*)vinputs;
-
-	/*Recover material */
-	matpar=(Matpar*)element->GetMatPar();
+	double  pe_g[numdofs]={0.0};
+	Matpar*  matpar=NULL;
+	Node**   element_nodes=NULL;
+	Node**   nodes=NULL;
+	Element* element=NULL;
+
+	/*Recover hook objects: */
+	matpar=(Matpar*)hmatpar.delivers();
+	element=(Element*)helement.delivers();
+	nodes=(Node**)hnodes.deliverp();
+
+	element_type=element->Enum();
 
 	//check that the element is onbed (collapsed formulation) otherwise:pe=0
@@ -368,6 +378,4 @@
 		}
 	}
-	/* Set pe_g to 0: */
-	for(i=0;i<numdofs;i++) pe_g[i]=0.0;
 		
 	/*Identify which grids are comprised in the segment. */
@@ -419,5 +427,5 @@
 /*}}}*/
 /*FUNCTION Icefront CreatePVectorDiagnosticHorizQuad {{{1*/
-void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
+void Icefront::CreatePVectorDiagnosticHorizQuad( Vec pg,int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -439,9 +447,11 @@
 
 	/*Objects: */
-	double  pe_g[numdofs];
+	double  pe_g[numdofs]={0.0};
 	Matpar* matpar=NULL;
 	Node**  element_nodes=NULL;
-	ParameterInputs* inputs=NULL;	
-
+	Node**   nodes=NULL;
+	Element* element=NULL;
+	int    element_type;
+		
 	/*quad grids: */
 	int grid1,grid2,grid3,grid4;
@@ -458,5 +468,10 @@
 	double v45[3];
 
-	inputs=(ParameterInputs*)vinputs;
+	/*Recover hook objects: */
+	matpar=(Matpar*)hmatpar.delivers();
+	element=(Element*)helement.delivers();
+	nodes=(Node**)hnodes.deliverp();
+
+	element_type=element->Enum();
 
 	/*check icefront is associated to a pentaelem: */
@@ -464,9 +479,4 @@
 		ISSMERROR(" quad icefront is associated to a TriaElem!");
 	}
-	/*Recover material*/
-	matpar=(Matpar*)element->GetMatPar();
-
-	/* Set pe_g to 0: */
-	for(i=0;i<numdofs;i++) pe_g[i]=0.0;
 
 	/* Get dof list and node coordinates: */
@@ -555,5 +565,5 @@
 /*}}}*/
 /*FUNCTION Icefront CreatePVectorDiagnosticStokes {{{1*/
-void Icefront::CreatePVectorDiagnosticStokes( Vec pg,void* vinputs, int analysis_type,int sub_analysis_type){
+void Icefront::CreatePVectorDiagnosticStokes( Vec pg,int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -575,8 +585,11 @@
 
 	/*Objects: */
-	double  pe_g[numdofs];
+	double  pe_g[numdofs]={0.0};
 	Matpar* matpar=NULL;
 	Node**  element_nodes=NULL;
-	ParameterInputs* inputs=NULL;	
+	Node**   nodes=NULL;
+	Element* element=NULL;
+	int     element_type;
+		
 
 	/*quad grids: */
@@ -594,15 +607,13 @@
 	double v45[3];
 
-	inputs=(ParameterInputs*)vinputs;
-
+	/*Recover hook objects: */
+	matpar=(Matpar*)hmatpar.delivers();
+	element=(Element*)helement.delivers();
+	nodes=(Node**)hnodes.deliverp();
+	
 	/*check icefront is associated to a pentaelem: */
 	if(element_type!=PentaEnum){
 		ISSMERROR(" quad icefront is associated to a TriaElem!");
 	}
-	/*Recover material*/
-	matpar=(Matpar*)element->GetMatPar();
-
-	/* Set pe_g to 0: */
-	for(i=0;i<numdofs;i++) pe_g[i]=0.0;
 
 	/* Get dof list and node coordinates: */
@@ -701,6 +712,11 @@
 	int doflist_per_node[MAXDOFSPERNODE];
 	int numberofdofspernode;
-	
-	if (strcmp(type,"segment")==0){
+	int type;
+
+	Node**   nodes=NULL;
+	nodes=(Node**)hnodes.deliverp();
+	inputs->GetParameterValue(&type,TypeEnum);
+	
+	if(type==SegmentIcefrontEnum){
 		for(i=0;i<2;i++){
 			nodes[i]->GetDofList(&doflist_per_node[0],&numberofdofspernode);
@@ -726,10 +742,10 @@
 /*}}}*/
 /*FUNCTION Icefront PenaltyCreateKMatrix {{{1*/
-void  Icefront::PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
+void  Icefront::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
 	/*do nothing: */
 }
 /*}}}*/
 /*FUNCTION Icefront PenaltyCreatePVector{{{1*/
-void  Icefront::PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type){
+void  Icefront::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
 	/*do nothing: */
 }
@@ -798,7 +814,12 @@
 	double water_pressure_tria;
 	double pressure_tria[4];
+	int    fill;
+
 
 	/*To use tria functionalities: */
 	Tria* tria=NULL;
+	
+	/*Recover inputs: */
+	inputs->GetParameterValue(&fill,FillEnum);
 
 	/*Initialize fake tria: */
@@ -1054,7 +1075,11 @@
 	double water_pressure_tria;
 	double pressure_tria;
+	int    fill;
 
 	/*To use tria functionalities: */
 	Tria* tria=NULL;
+
+	/*Recover inputs: */
+	inputs->GetParameterValue(&fill,FillEnum);
 
 	/*Initialize fake tria: */
@@ -1262,7 +1287,12 @@
 	double   surface_under_water,base_under_water;
 	double   pressure;
+	int    fill;
+
+	/*Recover inputs: */
+	inputs->GetParameterValue(&fill,FillEnum);
 
 	nx=normal[0];
 	ny=normal[1];
+
 
 	//Get gaussian points and weights. order 2 since we have a product of 2 nodal functions
Index: /issm/trunk/src/c/objects/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Icefront.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Icefront.h	(revision 3637)
@@ -6,30 +6,45 @@
 #define _ICEFRONT_H_
 
+/*Headers:*/
+/*{{{1*/
+class Element;
+class Load;
+class Matpar;
+class Element;
+class Node;
+
 #include "./Load.h"
+#include "./Matpar.h"
+#include "./Element.h"
+#include "./Node.h"
+#include "../ModelProcessorx/IoModel.h"
 
 #define MAX_ICEFRONT_GRIDS 4 //max number of grids for a certain load
 #define ICEFRONTSTRING 20 //max string length
+/*}}}*/
 
 class Icefront: public Load {
 
 	public:
-		int	id;
-	
-		Hook* hnodes; //2 or 4 nodes
-		Hook* helement; //tria or penta
-		Hook* hmatpar;
+		int id;
 
+		/*hooks: */
+		Hook hnodes;
+		Hook helement;
+		Hook hmatpar;
+
+		/*inputs and parameters: */
+		Inputs* inputs;
 		Parameters* parameters;
-		Inputs*     inputs;
 
 		/*constructors: {{{1*/
 		Icefront();
-		Icefront(int icefront_id,int* icefront_node_ids, int num_nodes, int icefront_element_id, int icefront_matpar_id);
-		Icefront(int icefront_id,Hook* icefront_hnodes, Hook* icefront_helement,Hook* icefront_hmatpar, Parameters* icefront_parameters, Inputs* icefront_inputs);
-		Icefront(int id,int i, IoModel* iomodel);
+		Icefront(int icefront_id,int* icefront_node_ids, int icefront_numnodes, int icefront_element_id,int icefront_matpar_id);
+		Icefront(int icefront_id, Hook* icefront_hnodes, Hook* icefront_helement, Hook* icefront_hmatpar, Parameters* parameters, Inputs* icefront_inputs);
+		Icefront(int icefront_id,int i, IoModel* iomodel);
 		~Icefront();
 		/*}}}*/
 		/*object management: {{{1*/
-		void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters);
+		void  Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin);
 		Object* copy();
 		void  DeepEcho();
@@ -48,6 +63,6 @@
 		void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
 		void  CreatePVector(Vec pg, int analysis_type,int sub_analysis_type);
-		void  CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type);
-		void  CreatePVectorDiagnosticHorizSegment( Vec pg,int analysis_type,int sub_analysis_type);
+		void  CreatePVectorDiagnosticHoriz( Vec pg,  int analysis_type,int sub_analysis_type);
+		void  CreatePVectorDiagnosticHorizSegment( Vec pg, int analysis_type,int sub_analysis_type);
 		void  CreatePVectorDiagnosticHorizQuad( Vec pg, int analysis_type,int sub_analysis_type);
 		void  CreatePVectorDiagnosticStokes( Vec pg, int analysis_type,int sub_analysis_type);
Index: /issm/trunk/src/c/objects/Input.h
===================================================================
--- /issm/trunk/src/c/objects/Input.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Input.h	(revision 3637)
@@ -7,5 +7,8 @@
 #define _EINPUT_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
+/*}}}*/
 
 class Input: public Object{
Index: /issm/trunk/src/c/objects/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/IntInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/IntInput.h	(revision 3637)
@@ -3,9 +3,13 @@
  */
 
-#include "./Input.h"
-#include "../include/types.h"
 
 #ifndef _INTINPUT_H_
 #define _INTINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../include/types.h"
+/*}}}*/
 
 class IntInput: public Input{
Index: /issm/trunk/src/c/objects/Load.h
===================================================================
--- /issm/trunk/src/c/objects/Load.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Load.h	(revision 3637)
@@ -9,4 +9,6 @@
 #define _LOAD_H_
 
+/*Headers:*/
+/*{{{1*/
 class Object;
 
@@ -15,4 +17,5 @@
 #include "../DataSet/DataSet.h"
 #include "../DataSet/Parameters.h"
+/*}}}*/
 
 class Load: public Object{
Index: /issm/trunk/src/c/objects/Material.h
===================================================================
--- /issm/trunk/src/c/objects/Material.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Material.h	(revision 3637)
@@ -7,8 +7,10 @@
 #define _MATERIAL_H_
 
+/*Headers:*/
+/*{{{1*/
 class Object;
-
 #include "./Object.h"
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class Material: public Object{
Index: /issm/trunk/src/c/objects/Matice.h
===================================================================
--- /issm/trunk/src/c/objects/Matice.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Matice.h	(revision 3637)
@@ -6,8 +6,11 @@
 #define MATICE_H_
 
+/*Headers:*/
+/*{{{1*/
 struct IoModel;
-
 #include "./Material.h"
 #include "../ModelProcessorx/IoModel.h"
+/*}}}*/
+
 class Matice: public Material{
 
Index: /issm/trunk/src/c/objects/Matpar.h
===================================================================
--- /issm/trunk/src/c/objects/Matpar.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Matpar.h	(revision 3637)
@@ -6,8 +6,10 @@
 #define _MATPAR_H_
 
+/*Headers:*/
+/*{{{1*/
 struct IoModel;
-
 #include "./Material.h"
 #include "../ModelProcessorx/IoModel.h"
+/*}}}*/
 
 class Matpar: public Material{
Index: /issm/trunk/src/c/objects/Model.h
===================================================================
--- /issm/trunk/src/c/objects/Model.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Model.h	(revision 3637)
@@ -6,8 +6,10 @@
 #define _MODEL_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "../include/types.h"
-
 struct FemModel;
 class DataSet;
+/*}}}*/
 
 class Model{
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Node.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _NODE_H_
 
+/*Headers:*/
+/*{{{1*/
 /*indefinitions: */
 #include "./Object.h"
@@ -13,4 +15,5 @@
 #include "./DofIndexing.h"
 #include "../ModelProcessorx/IoModel.h"
+/*}}}*/
 
 class Node: public Object,public DofObject{
Index: /issm/trunk/src/c/objects/NodeSets.h
===================================================================
--- /issm/trunk/src/c/objects/NodeSets.h	(revision 3636)
+++ /issm/trunk/src/c/objects/NodeSets.h	(revision 3637)
@@ -6,5 +6,8 @@
 #define _NODESETS_H
 
+/*Headers:*/
+/*{{{1*/
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class NodeSets {
Index: /issm/trunk/src/c/objects/Numericalflux.h
===================================================================
--- /issm/trunk/src/c/objects/Numericalflux.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Numericalflux.h	(revision 3637)
@@ -6,14 +6,17 @@
 #define _NUMERICALFLUX_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Load.h"
 #include "./Matpar.h"
 #include "./Element.h"
 #include "./Node.h"
+class Element;
 
 #define NUMERICALFLUXSTRING 20    //max string length
 #define MAX_NUMERICALFLUX_NODES 4 //max number of grids for a certain load
 #define MAX_NUMERICALFLUX_ELEMS 2 //max number of elements for a certain load
+/*}}}*/
 
-class Element;
 class Numericalflux: public Load {
 
Index: /issm/trunk/src/c/objects/Numpar.h
===================================================================
--- /issm/trunk/src/c/objects/Numpar.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Numpar.h	(revision 3637)
@@ -6,5 +6,8 @@
 #define _NUMPAR_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
+/*}}}*/
 
 class Numpar: public Object{
Index: /issm/trunk/src/c/objects/Param.h
===================================================================
--- /issm/trunk/src/c/objects/Param.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Param.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _PARAM_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../toolkits/toolkits.h"
@@ -11,5 +13,5 @@
 
 #define PARAMSTRING 200 //max string length
-
+/*}}}*/
 
 class Param: public Object{
Index: /issm/trunk/src/c/objects/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Pengrid.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Pengrid.h	(revision 3637)
@@ -5,4 +5,6 @@
 #define _PENGRID_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Load.h"
 #include "./Node.h"
@@ -11,4 +13,6 @@
 
 class Element;
+/*}}}*/
+
 class Pengrid: public Load{
 
Index: /issm/trunk/src/c/objects/Penpair.h
===================================================================
--- /issm/trunk/src/c/objects/Penpair.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Penpair.h	(revision 3637)
@@ -5,4 +5,6 @@
 #define _PENPAIR_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Load.h"
 #include "./Node.h"
@@ -10,4 +12,6 @@
 
 class Element;
+/*}}}*/
+
 class Penpair: public Load{
 
Index: /issm/trunk/src/c/objects/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Penta.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Penta.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _PENTA_H
 
+/*Headers:*/
+/*{{{1*/
 class Object;
 class Node;
@@ -24,4 +26,5 @@
 #include "../DataSet/Parameters.h"
 #include "../DataSet/Inputs.h"
+/*}}}*/
 
 class Penta: public Element{
Index: /issm/trunk/src/c/objects/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/PentaVertexInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/PentaVertexInput.h	(revision 3637)
@@ -3,8 +3,12 @@
  */
 
-#include "./Input.h"
 
 #ifndef _PENTAVERTEXINPUT_H_
 #define _PENTAVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
 
 class PentaVertexInput: public Input{
Index: /issm/trunk/src/c/objects/Result.h
===================================================================
--- /issm/trunk/src/c/objects/Result.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Result.h	(revision 3637)
@@ -6,7 +6,10 @@
 #define _RESULT_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "stdio.h"
 #include "./Object.h"
 #include "../toolkits/toolkits.h"
+/*}}}*/
 
 class Result: public Object{
Index: /issm/trunk/src/c/objects/Rgb.h
===================================================================
--- /issm/trunk/src/c/objects/Rgb.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Rgb.h	(revision 3637)
@@ -6,6 +6,9 @@
 #define _RGB_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../DataSet/DataSet.h"
+/*}}}*/
 
 class Rgb: public Object{
Index: /issm/trunk/src/c/objects/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3636)
+++ /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3637)
@@ -3,5 +3,6 @@
  */
 
-
+/*Headers:*/
+/*{{{1*/
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -16,53 +17,61 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
+#include "../ModelProcessorx/ModelProcessorx.h"
 #include "./objects.h"
-
-		
+/*}}}*/
+
 /*Object constructors and destructor*/
 /*FUNCTION Riftfront::Riftfront(){{{1*/
 Riftfront::Riftfront(){
-	/*in case :*/
-	material_converged=0;
-	return;
-}
-/*}}}1*/
-/*FUNCTION Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], ...){{{1*/
-Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
-
-	this->Init(riftfront_type,riftfront_id, riftfront_node_ids, riftfront_mparid, riftfront_h,riftfront_b,riftfront_s,riftfront_normal,riftfront_length,riftfront_fill,riftfront_friction, riftfront_fraction,riftfront_fractionincrement, riftfront_penalty_offset, riftfront_penalty_lock, riftfront_active,riftfront_frozen, riftfront_counter,riftfront_prestable,riftfront_shelf);
-
-}
-/*}}}1*/
+	this->inputs=NULL;
+	this->parameters=NULL;
+}
+/*}}}*/
+/*FUNCTION Riftfront::Riftfront(int id, int* node_ids, int matice_id, int matpar_id){{{1*/
+Riftfront::Riftfront(int riftfront_id,int* riftfront_node_ids, int riftfront_matpar_id): 
+	hnodes(riftfront_node_ids,2),
+	hmatpar(&riftfront_matpar_id,1)
+{
+
+	/*all the initialization has been done by the initializer, just fill in the id: */
+	this->id=riftfront_id;
+	this->parameters=NULL;
+	this->inputs=new Inputs();
+
+}
+/*}}}*/
+/*FUNCTION Riftfront::Riftfront(int id, Hook* hnodes, Hook* hmatice, Hook* hmatpar, DataSet* parameters, Inputs* riftfront_inputs) {{{1*/
+Riftfront::Riftfront(int riftfront_id,Hook* riftfront_hnodes, Hook* riftfront_hmatpar, Parameters* riftfront_parameters, Inputs* riftfront_inputs):
+	hnodes(riftfront_hnodes),
+	hmatpar(riftfront_hmatpar)
+{
+
+	/*all the initialization has been done by the initializer, just fill in the id: */
+	this->id=riftfront_id;
+	if(riftfront_inputs){
+		this->inputs=(Inputs*)riftfront_inputs->Copy();
+	}
+	else{
+		this->inputs=new Inputs();
+	}
+	/*point parameters: */
+	this->parameters=riftfront_parameters;
+}
+/*}}}*/
 /*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel){{{1*/
 Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel){
 
-	/*rifts: */
-	char riftfront_type[RIFTFRONTSTRING];
-	int  riftfront_node_ids[2];
-	int  riftfront_mparid;
-	double riftfront_h[2];
-	double riftfront_b[2];
-	double riftfront_s[2];
-	double riftfront_normal[2];
-	double riftfront_length;
-	int    riftfront_fill;
+	/*data: */
+	int    riftfront_node_ids[2];
+	int    riftfront_matpar_id;
+	int    riftfront_type;
+	double riftfront_fill;
 	double riftfront_friction;
-	double riftfront_fraction;
 	double riftfront_fractionincrement;
 	bool   riftfront_shelf;
-	double riftfront_penalty_offset;
-	int riftfront_penalty_lock;
-	bool riftfront_active;
-	bool riftfront_frozen;
-	int  riftfront_counter;
-	bool riftfront_prestable;
-	int el1,el2;
-	int grid1,grid2;
-	double normal[2];
-	double length;
-	int    fill;
-	double friction;
-	double fraction;
-	double fractionincrement;
+
+	/*intermediary: */
+	int el1    ,el2;
+	int grid1  ,grid2;
 
 	/*Ok, retrieve all the data needed to add a penalty between the two grids: */
@@ -73,101 +82,143 @@
 	grid2=(int)*(iomodel->riftinfo+RIFTINFOSIZE*i+1);
 
-	normal[0]=*(iomodel->riftinfo+RIFTINFOSIZE*i+4);
-	normal[1]=*(iomodel->riftinfo+RIFTINFOSIZE*i+5);
-	length=*(iomodel->riftinfo+RIFTINFOSIZE*i+6);
-
-	fill = (int)*(iomodel->riftinfo+RIFTINFOSIZE*i+7);
-	friction=*(iomodel->riftinfo+RIFTINFOSIZE*i+8);
-	fraction=*(iomodel->riftinfo+RIFTINFOSIZE*i+9);
-	fractionincrement=*(iomodel->riftinfo+RIFTINFOSIZE*i+10);
-
-	strcpy(riftfront_type,"2d");
+	/*id: */
+	this->id=riftfront_id;
+
+	/*hooks: */
 	riftfront_node_ids[0]=grid1;
 	riftfront_node_ids[1]=grid2;
-	riftfront_mparid=iomodel->numberofelements+1; //matlab indexing
-
-	riftfront_h[0]=iomodel->thickness[grid1-1];
-	riftfront_h[1]=iomodel->thickness[grid2-1];
-
-	riftfront_b[0]=iomodel->bed[grid1-1];
-	riftfront_b[1]=iomodel->bed[grid2-1];
-
-	riftfront_s[0]=iomodel->surface[grid1-1];
-	riftfront_s[1]=iomodel->surface[grid2-1];
-
-	riftfront_normal[0]=normal[0];
-	riftfront_normal[1]=normal[1];
-	riftfront_length=length;
-
-	riftfront_fill=fill;
-	riftfront_friction=friction;
-	riftfront_fraction=fraction;
-	riftfront_fractionincrement=fractionincrement;
+	riftfront_matpar_id=iomodel->numberofelements+1; //matlab indexing
+
+	this->hnodes.Init(riftfront_node_ids,2);
+	this->hmatpar.Init(&riftfront_matpar_id,1);
+
+	/*computational parameters: */
+	this->active=0;
+	this->frozen=0;
+	this->counter=0;
+	this->prestable=0;
+	this->penalty_lock=0;
+	this->material_converged=0;
+	this->normal[0]=*(iomodel->riftinfo+RIFTINFOSIZE*i+4);
+	this->normal[1]=*(iomodel->riftinfo+RIFTINFOSIZE*i+5);
+	this->length=*(iomodel->riftinfo+RIFTINFOSIZE*i+6);
+	this->fraction=*(iomodel->riftinfo+RIFTINFOSIZE*i+9);
+
+	//intialize inputs, and add as many inputs per element as requested: 
+	this->inputs=new Inputs();
+		
+	riftfront_type=SegmentRiftfrontEnum;
+	riftfront_fill = (int)*(iomodel->riftinfo+RIFTINFOSIZE*i+7);
+	riftfront_friction=*(iomodel->riftinfo+RIFTINFOSIZE*i+8);
+	riftfront_fractionincrement=*(iomodel->riftinfo+RIFTINFOSIZE*i+10);
 	riftfront_shelf=(bool)iomodel->gridoniceshelf[grid1-1];
 
-	riftfront_penalty_offset=iomodel->penalty_offset;
-	riftfront_penalty_lock=iomodel->penalty_lock;
-
-	riftfront_active=0;
-	riftfront_frozen=0;
-	riftfront_counter=0;
-	riftfront_prestable=0;
-			
-	this->Init(riftfront_type,riftfront_id, riftfront_node_ids, riftfront_mparid, riftfront_h,riftfront_b,riftfront_s,riftfront_normal,riftfront_length,riftfront_fill,riftfront_friction, riftfront_fraction,riftfront_fractionincrement, riftfront_penalty_offset, riftfront_penalty_lock, riftfront_active,riftfront_frozen, riftfront_counter,riftfront_prestable,riftfront_shelf);
-
-}
-/*}}}1*/
-/*FUNCTION Riftfront::Init {{{1*/
-void Riftfront::Init(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
-
-	int i;
-	
-	strcpy(type,riftfront_type);
-	id=riftfront_id;
-	
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
-		node_ids[i]=riftfront_node_ids[i];
-		node_offsets[i]=UNDEF;
-		nodes[i]=NULL;
-	}
-	
-	mparid=riftfront_mparid;
-	matpar=NULL;
-	matpar_offset=UNDEF;
-
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
-		h[i]=riftfront_h[i];
-		b[i]=riftfront_b[i];
-		s[i]=riftfront_s[i];
-	}
-
-	normal[0]=riftfront_normal[0];
-	normal[1]=riftfront_normal[1];
-	length=riftfront_length;
-	fill=riftfront_fill;
-	friction=riftfront_friction;
-	fraction=riftfront_fraction;
-	fractionincrement=riftfront_fractionincrement;
-	penalty_offset=riftfront_penalty_offset;
-	penalty_lock=riftfront_penalty_lock;
-	active=riftfront_active;
-	frozen=riftfront_frozen;
-	counter=riftfront_counter;
-	prestable=riftfront_prestable;
-	shelf=riftfront_shelf;
-
-	/*not in the constructor, but still needed: */
-	material_converged=0;
-
-	return;
+	this->inputs->AddInput(new IntInput(TypeEnum,riftfront_type));
+	this->inputs->AddInput(new DoubleInput(FillEnum,riftfront_fill));
+	this->inputs->AddInput(new DoubleInput(FrictionEnum,riftfront_friction));
+	this->inputs->AddInput(new DoubleInput(FractionIncrementEnum,riftfront_fractionincrement));
+	this->inputs->AddInput(new BoolInput(SegmentOnIceShelfEnum,riftfront_shelf));
+	
+	//this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
+	this->parameters=NULL;
+		
 }
 /*}}}1*/
 /*FUNCTION Riftfront::~Riftfront(){{{1*/
 Riftfront::~Riftfront(){
-	return;
-}
-/*}}}1*/
-		
+	delete inputs;
+	this->parameters=NULL;
+}
+/*}}}*/
+
 /*Object marshall*/
+/*FUNCTION Riftfront::copy {{{1*/
+Object* Riftfront::copy() {
+	return new Riftfront(*this); 
+}
+/*}}}1*/
+/*FUNCTION Riftfront::Configure {{{1*/
+void  Riftfront::Configure(DataSet* elementsin,DataSet* loadsin,DataSet* nodesin,DataSet* verticesin,DataSet* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnodes.configure(nodesin);
+	hmatpar.configure(materialsin);
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+
+}
+/*}}}*/
+/*FUNCTION Riftfront::DeepEcho{{{1*/
+void Riftfront::DeepEcho(void){
+
+	printf("Riftfront:\n");
+	printf("   id: %i\n",id);
+	hnodes.DeepEcho();
+	hmatpar.DeepEcho();
+	printf("   parameters\n");
+	parameters->DeepEcho();
+	printf("   inputs\n");
+	inputs->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION Riftfront::Demarshall {{{1*/
+void  Riftfront::Demarshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	int   i;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+
+	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+	memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
+	memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);
+	memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);
+	memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
+	memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
+	memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);
+	memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
+	memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
+	memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
+
+	/*demarshall hooks: */
+	hnodes.Demarshall(&marshalled_dataset);
+	hmatpar.Demarshall(&marshalled_dataset);
+	
+	/*demarshall inputs: */
+	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+
+	/*parameters: may not exist even yet, so let Configure handle it: */
+	this->parameters=NULL;
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION Riftfront::Echo {{{1*/
+void Riftfront::Echo(void){
+	this->DeepEcho();
+}
+/*}}}1*/
+/*FUNCTION Riftfront::Enum {{{1*/
+int Riftfront::Enum(void){
+
+	return RiftfrontEnum;
+
+}
+/*}}}1*/
+/*FUNCTION Riftfront::GetId {{{1*/
+int    Riftfront::GetId(void){ return id; }
+/*}}}1*/
+/*FUNCTION Riftfront::GetName {{{1*/
+char* Riftfront::GetName(void){
+	return "riftfront";
+}
+/*}}}1*/
 /*FUNCTION Riftfront::Marshall {{{1*/
 void  Riftfront::Marshall(char** pmarshalled_dataset){
@@ -175,4 +226,6 @@
 	char* marshalled_dataset=NULL;
 	int   enum_type=0;
+	char* marshalled_inputs=NULL;
+	int   marshalled_inputs_size;
 
 	/*recover marshalled_dataset: */
@@ -181,150 +234,97 @@
 	/*get enum type of Riftfront: */
 	enum_type=RiftfrontEnum;
-	
+
 	/*marshall enum: */
 	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
+
 	/*marshall Riftfront data: */
-	memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type);
 	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(marshalled_dataset,&node_ids,sizeof(node_ids));marshalled_dataset+=sizeof(node_ids);
-	memcpy(marshalled_dataset,&node_offsets,sizeof(node_offsets));marshalled_dataset+=sizeof(node_offsets);
-	memcpy(marshalled_dataset,&mparid,sizeof(mparid));marshalled_dataset+=sizeof(mparid);
-	memcpy(marshalled_dataset,&matpar_offset,sizeof(matpar_offset));marshalled_dataset+=sizeof(matpar_offset);
-
-	memcpy(marshalled_dataset,&h,sizeof(h));marshalled_dataset+=sizeof(h);
-	memcpy(marshalled_dataset,&b,sizeof(b));marshalled_dataset+=sizeof(b);
-	memcpy(marshalled_dataset,&s,sizeof(s));marshalled_dataset+=sizeof(s);
-	
+	memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
 	memcpy(marshalled_dataset,&normal,sizeof(normal));marshalled_dataset+=sizeof(normal);
 	memcpy(marshalled_dataset,&length,sizeof(length));marshalled_dataset+=sizeof(length);
-	memcpy(marshalled_dataset,&fill,sizeof(fill));marshalled_dataset+=sizeof(fill);
-	memcpy(marshalled_dataset,&friction,sizeof(friction));marshalled_dataset+=sizeof(friction);
 	memcpy(marshalled_dataset,&fraction,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
-	memcpy(marshalled_dataset,&fractionincrement,sizeof(fractionincrement));marshalled_dataset+=sizeof(fractionincrement);
-	memcpy(marshalled_dataset,&penalty_offset,sizeof(penalty_offset));marshalled_dataset+=sizeof(penalty_offset);
-	memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
-	memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
 	memcpy(marshalled_dataset,&frozen,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
 	memcpy(marshalled_dataset,&counter,sizeof(counter));marshalled_dataset+=sizeof(counter);
 	memcpy(marshalled_dataset,&prestable,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
-	memcpy(marshalled_dataset,&material_converged,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
-	memcpy(marshalled_dataset,&shelf,sizeof(shelf));marshalled_dataset+=sizeof(shelf);
+	memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
+
+	/*Marshall hooks: */
+	hnodes.Marshall(&marshalled_dataset);
+	hmatpar.Marshall(&marshalled_dataset);
+
+	/*Marshall inputs: */
+	marshalled_inputs_size=inputs->MarshallSize();
+	marshalled_inputs=inputs->Marshall();
+	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+	marshalled_dataset+=marshalled_inputs_size;
+
+	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+
+	xfree((void**)&marshalled_inputs);
 
 	*pmarshalled_dataset=marshalled_dataset;
 	return;
 }
-/*}}}1*/
+/*}}}*/
 /*FUNCTION Riftfront::MarshallSize {{{1*/
 int   Riftfront::MarshallSize(){
-
-	return sizeof(type)+
-		sizeof(id)+
-		sizeof(node_ids)+
-		sizeof(node_offsets)+
-		sizeof(mparid)+
-		sizeof(matpar_offset)+
-		sizeof(h)+
-		sizeof(b)+
-		sizeof(s)+
-		sizeof(normal)+
-		sizeof(length)+
-		sizeof(fill)+
-		sizeof(friction)+
-		sizeof(fraction)+
-		sizeof(fractionincrement)+
-		sizeof(penalty_offset)+
-		sizeof(penalty_lock)+
-		sizeof(active)+
-		sizeof(frozen)+
-		sizeof(counter)+
-		sizeof(prestable)+
-		sizeof(material_converged)+
-		sizeof(shelf)+
-		sizeof(int); //sizeof(int) for enum type
-}
-/*}}}1*/
-/*FUNCTION Riftfront::Demarshall {{{1*/
-void  Riftfront::Demarshall(char** pmarshalled_dataset){
-
-	int i;
-	char* marshalled_dataset=NULL;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
-	 *object data (thanks to DataSet::Demarshall):*/
-
-	memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type);
-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
-	memcpy(&node_ids,marshalled_dataset,sizeof(node_ids));marshalled_dataset+=sizeof(node_ids);
-	memcpy(&node_offsets,marshalled_dataset,sizeof(node_offsets));marshalled_dataset+=sizeof(node_offsets);
-	memcpy(&mparid,marshalled_dataset,sizeof(mparid));marshalled_dataset+=sizeof(mparid);
-	memcpy(&matpar_offset,marshalled_dataset,sizeof(matpar_offset));marshalled_dataset+=sizeof(matpar_offset);
-
-	memcpy(&h,marshalled_dataset,sizeof(h));marshalled_dataset+=sizeof(h);
-	memcpy(&b,marshalled_dataset,sizeof(b));marshalled_dataset+=sizeof(b);
-	memcpy(&s,marshalled_dataset,sizeof(s));marshalled_dataset+=sizeof(s);
-	memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);
-	memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);
-	memcpy(&fill,marshalled_dataset,sizeof(fill));marshalled_dataset+=sizeof(fill);
-	memcpy(&friction,marshalled_dataset,sizeof(friction));marshalled_dataset+=sizeof(friction);
-	memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
-	memcpy(&fractionincrement,marshalled_dataset,sizeof(fractionincrement));marshalled_dataset+=sizeof(fractionincrement);
-	memcpy(&penalty_offset,marshalled_dataset,sizeof(penalty_offset));marshalled_dataset+=sizeof(penalty_offset);
-	memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
-	memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
-	memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
-	memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);
-	memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
-	memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
-	memcpy(&shelf,marshalled_dataset,sizeof(shelf));marshalled_dataset+=sizeof(shelf);
-
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)nodes[i]=NULL;
-	matpar=NULL;
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
+	
+	return sizeof(id)
+		+sizeof(active)
+		+sizeof(normal)
+		+sizeof(length)
+		+sizeof(fraction)
+		+sizeof(frozen)
+		+sizeof(counter)
+		+sizeof(prestable)
+		+sizeof(penalty_lock)
+		+hnodes.MarshallSize()
+		+hmatpar.MarshallSize()
+		+inputs->MarshallSize()
+		+sizeof(int); //sizeof(int) for enum type
+}
+/*}}}*/
+/*FUNCTION Riftfront::MyRank {{{1*/
+int    Riftfront::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
 }
 /*}}}1*/
 
 /*Object functions*/
-/*FUNCTION Riftfront::Configure {{{1*/
-void  Riftfront::Configure(void* pelementsin,void* pnodesin,void* pmaterialsin){
-
-	DataSet* nodesin=NULL;
-	DataSet* materialsin=NULL;
-
-	/*Recover pointers :*/
-	nodesin=(DataSet*)pnodesin;
-	materialsin=(DataSet*)pmaterialsin;
-
-	/*Link this load with its nodes: */
-	ResolvePointers((Object**)nodes,node_ids,node_offsets,MAX_RIFTFRONT_GRIDS,nodesin);
-	
-	/*Same for materials: */
-	ResolvePointers((Object**)&matpar,&mparid,&matpar_offset,1,materialsin);
-
-}
-/*}}}1*/
 /*FUNCTION Riftfront::Constrain {{{1*/
 #define _ZIGZAGCOUNTER_
 
-int   Riftfront::Constrain(int* punstable, void* vinputs, int analysis_type){
-
-	const int     numgrids=2;
-	int           dofs[2]={0,1};
-	double        vxvy_list[2][2]; //velocities for all grids 
-	double        max_penetration;
-	double        penetration;
-	int           activate;
-	int           found;
-	int           unstable;
-
-	ParameterInputs* inputs=NULL;
-
-	inputs=(ParameterInputs*)vinputs;
+int   Riftfront::Constrain(int* punstable,  int analysis_type){
+
+	const int   numgrids        = 2;
+	double      max_penetration;
+	double      penetration;
+	int         activate;
+	int         found;
+	int         unstable;
+	double      vx1;
+	double      vy1;
+	double      vx2;
+	double      vy2;
+	double      fractionincrement;
+
+
+	/*Objects: */
+	Element   **elements        = NULL;
+	Node      **nodes           = NULL;
+	Tria       *tria1           = NULL;
+	Tria       *tria2           = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
 
 	/*Is this constraint frozen? In which case we don't touch: */
@@ -334,11 +334,15 @@
 	}
 
-	/*First recover parameter inputs: */
-	found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
-	if(!found)ISSMERROR(" could not find velocity in inputs!");
-
-
-	/*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
-	penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
+	/*recover parameters: */
+	this->inputs->GetParameterValue(&fractionincrement,FractionIncrementEnum);
+
+	/*First recover velocity: */
+	tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
+	tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
+	tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
+	tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
+
+	/*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
+	penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
 
 	/*activation: */
@@ -352,5 +356,5 @@
 		this->counter=0;
 		/*increase melange fraction: */
-		this->fraction+=this->fractionincrement;
+		this->fraction+=fractionincrement;
 		if (this->fraction>1)this->fraction=(double)1.0;
 		//printf("riftfront %i fraction: %g\n",this->GetId(),this->fraction);
@@ -375,86 +379,16 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::copy {{{1*/
-Object* Riftfront::copy() {
-	return new Riftfront(*this); 
-}
-/*}}}1*/
 /*FUNCTION Riftfront::CreateKMatrix {{{1*/
-void  Riftfront::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Riftfront::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
 	/*do nothing: */
 }
 /*}}}1*/
 /*FUNCTION Riftfront::CreatePVector {{{1*/
-void  Riftfront::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void  Riftfront::CreatePVector(Vec pg,  int analysis_type,int sub_analysis_type){
 	/*do nothing: */
 }
 /*}}}1*/
-/*FUNCTION Riftfront::DeepEcho {{{1*/
-void Riftfront::DeepEcho(void){
-
-	int i;
-
-	printf("Riftfront:\n");
-	printf("   type: %s\n",type);
-	printf("   id: %i\n",id);
-
-	printf("   node_ids: ");
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)printf("%i ",node_ids[i]);
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
-		if (nodes[i])nodes[i]->Echo();
-	}
-	printf("\n");
-	
-	printf("   mparid: %i\n",mparid);
-	if(matpar)matpar->Echo();
-
-	printf("normal [%g,%g], length %g\n",normal[0],normal[1],normal[2]);
-	printf("fill: %i friction %g fraction %g fractionincrement %g \n",fill,friction,fraction,fractionincrement);
-	printf("penalty_offset %g\n",penalty_offset);
-	printf("penalty_lock %i\n",penalty_lock);
-	printf("active %i\n",active);
-	printf("frozen %i\n",frozen);
-	printf("counter %i\n",counter);
-	printf("prestable %i\n",prestable);
-	printf("material_converged %i\n",material_converged);
-	printf("shelf %i\n",shelf);
-	
-}		
-/*}}}1*/
-/*FUNCTION Riftfront::Echo {{{1*/
-void Riftfront::Echo(void){
-
-	int i;
-	
-	printf("Riftfront:\n");
-	printf("   type: %s\n",type);
-	printf("   id: %i\n",id);
-	printf("   mparid: %i\n",mparid);
-
-	printf("   node_ids: ");
-	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++)printf("%i ",node_ids[i]);
-	printf("\n");
-
-	printf("normal [%g,%g], length %g\n",normal[0],normal[1],normal[2]);
-	printf("fill: %i friction %g fraction %g fractionincrement %g \n",fill,friction,fraction,fractionincrement);
-	printf("penalty_offset %g\n",penalty_offset);
-	printf("penalty_lock %i\n",penalty_lock);
-	printf("active %i\n",active);
-	printf("frozen %i\n",frozen);
-	printf("counter %i\n",counter);
-	printf("prestable %i\n",prestable);
-	printf("material_converged %i\n",material_converged);
-	printf("shelf %i\n",shelf);
-}
-/*}}}1*/
-/*FUNCTION Riftfront::Enum {{{1*/
-int Riftfront::Enum(void){
-
-	return RiftfrontEnum;
-
-}
-/*}}}1*/
 /*FUNCTION Riftfront::FreezeConstraints{{{1*/
-void   Riftfront::FreezeConstraints(void* vinputs, int analysis_type){
+void   Riftfront::FreezeConstraints( int analysis_type){
 
 	/*Just set frozen flag to 1: */
@@ -470,5 +404,8 @@
 	int doflist_per_node[MAXDOFSPERNODE];
 	int numberofdofspernode;
-	
+	Node      **nodes           = NULL;
+	
+	nodes=(Node**)hnodes.deliverp();
+
 	for(i=0;i<MAX_RIFTFRONT_GRIDS;i++){
 		nodes[i]->GetDofList(&doflist_per_node[0],&numberofdofspernode);
@@ -482,12 +419,4 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::GetId {{{1*/
-int    Riftfront::GetId(void){ return id; }
-/*}}}1*/
-/*FUNCTION Riftfront::GetName {{{1*/
-char* Riftfront::GetName(void){
-	return "riftfront";
-}
-/*}}}1*/
 /*FUNCTION Riftfront::IsFrozen{{{1*/
 bool   Riftfront::IsFrozen(void){
@@ -499,14 +428,10 @@
 /*}}}1*/
 /*FUNCTION Riftfront::IsMaterialStable {{{1*/
-int   Riftfront::IsMaterialStable(void* vinputs, int analysis_type){
+int   Riftfront::IsMaterialStable( int analysis_type){
 
 	int found=0;
-	ParameterInputs* inputs=NULL;
 	double converged=0;
 
-	inputs=(ParameterInputs*)vinputs;
-
-	found=inputs->Recover("converged",&converged);
-	if(!found)ISSMERROR(" could not find converged flag  in inputs!");
+	this->inputs->GetParameterValue(&converged,ConvergedEnum);
 
 	if(converged){
@@ -521,25 +446,43 @@
 /*}}}1*/
 /*FUNCTION Riftfront::MaxPenetration {{{1*/
-int   Riftfront::MaxPenetration(double* ppenetration, void* vinputs, int analysis_type){
+int   Riftfront::MaxPenetration(double* ppenetration,  int analysis_type){
 
 	const int     numgrids=2;
-	int           dofs[2]={0,1};
-	double        vxvy_list[2][2]; //velocities for all grids 
 	double        max_penetration;
 	double        penetration=0;
 	int           found;
-
-	ParameterInputs* inputs=NULL;
-
-	inputs=(ParameterInputs*)vinputs;
+	double      vx1;
+	double      vy1;
+	double      vx2;
+	double      vy2;
+
+	/*Objects: */
+	Element   **elements        = NULL;
+	Node      **nodes           = NULL;
+	Tria       *tria1           = NULL;
+	Tria       *tria2           = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
 
 	//initialize: 
 	penetration=-1;
 
-	found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
-	if(!found)ISSMERROR(" could not find velocity in inputs!");
+	/*recover velocity: */
+	tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
+	tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
+	tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
+	tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
 
 	/*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
-	penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
+	penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
 
 	/*Now, we return penetration only if we are active!: */
@@ -552,10 +495,4 @@
 	*ppenetration=penetration;
 
-}
-/*}}}1*/
-/*FUNCTION Riftfront::MyRank {{{1*/
-int    Riftfront::MyRank(void){ 
-	extern int my_rank;
-	return my_rank; 
 }
 /*}}}1*/
@@ -575,19 +512,37 @@
 /*}}}1*/
 /*FUNCTION Riftfront::PenaltyCreateKMatrix {{{1*/
-void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
-
-	int i,j;
-	const int    numgrids=MAX_RIFTFRONT_GRIDS;
-	int              dofs[1]={0};
-	double           Ke_gg[4][4];
-	const int    numdof=2*numgrids;
-	int          doflist[numdof];
-	int          numberofdofspernode;
-	double       thickness;
-	ParameterInputs* inputs=NULL;
-	
-	/*Some pointer intialization: */
-	inputs=(ParameterInputs*)vinputs;
-
+void  Riftfront::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
+
+	int         i;
+	int         j;
+	const int   numgrids            = MAX_RIFTFRONT_GRIDS;
+	int         dofs[1]             = {0};
+	double      Ke_gg[4][4];
+	const int   numdof              = 2 *numgrids;
+	int         doflist[numdof];
+	int         numberofdofspernode;
+	double      thickness;
+	double      h[2];
+	double      penalty_offset;
+	double      friction;
+
+	/*Objects: */
+	Element   **elements            = NULL;
+	Node      **nodes               = NULL;
+	Tria       *tria1               = NULL;
+	Tria       *tria2               = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
+
+	
 	/* Get node coordinates and dof list: */
 	GetDofList(&doflist[0],&numberofdofspernode);
@@ -596,4 +551,7 @@
 	for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke_gg[i][j]=0.0;
 
+	/*Get some parameters: */
+	this->parameters->FindParam(&penalty_offset,"penalty_offset");
+	this->inputs->GetParameterValue(&friction,FrictionEnum);
 
 	if(this->active){
@@ -602,6 +560,8 @@
 		 *contact slip friction. */
 		  
-		/*Recover input parameters: */
-		inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
+		/*Recover thickness: */
+		tria1->inputs->GetParameterValueAtNode(&h[0],nodes[0],ThicknessEnum);
+		tria2->inputs->GetParameterValueAtNode(&h[1],nodes[1],ThicknessEnum);
+
 		if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
 		thickness=h[0];
@@ -664,33 +624,55 @@
 /*}}}1*/
 /*FUNCTION Riftfront::PenaltyCreatePVector {{{1*/
-void  Riftfront::PenaltyCreatePVector(Vec pg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){
-
-	int          i,j;
-	const int    numgrids=MAX_RIFTFRONT_GRIDS;
-	int          dofs[1]={0};
-	double       pe_g[4];
-	const int    numdof=2*numgrids;
-	int          doflist[numdof];
-	int          numberofdofspernode;
-	ParameterInputs* inputs=NULL;
-	double       rho_ice;
-	double       rho_water;
-	double       gravity;
-	double       thickness;
-	double       bed;
-	double       pressure;
-	double       pressure_litho;
-	double       pressure_air;
-	double       pressure_melange;
-	double       pressure_water;
-	
-	/*Some pointer intialization: */
-	inputs=(ParameterInputs*)vinputs;
+void  Riftfront::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
+
+	int         i                     ,j;
+	const int   numgrids            = MAX_RIFTFRONT_GRIDS;
+	double      pe_g[4]={0.0};
+	const int   numdof              = 2 *numgrids;
+	int         doflist[numdof];
+	int         numberofdofspernode;
+
+	double      rho_ice;
+	double      rho_water;
+	double      gravity;
+	double      thickness;
+	double      h[2];
+	double      bed;
+	double      b[2];
+	double      pressure;
+	double      pressure_litho;
+	double      pressure_air;
+	double      pressure_melange;
+	double      pressure_water;
+	double      fill;
+	bool        shelf;
+
+
+	/*Objects: */
+	Element   **elements            = NULL;
+	Node      **nodes               = NULL;
+	Tria       *tria1               = NULL;
+	Tria       *tria2               = NULL;
+	Matpar     *matpar              = NULL;
+
+	
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+	matpar=(Matpar*)hmatpar.delivers();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
 
 	/* Get node coordinates and dof list: */
 	GetDofList(&doflist[0],&numberofdofspernode);
 
-	/* Set pe_g to 0: */
-	for(i=0;i<numdof;i++) pe_g[i]=0;
+	/*Get some inputs: */
+	this->inputs->GetParameterValue(&fill,FillEnum);
+	this->inputs->GetParameterValue(&shelf,SegmentOnIceShelfEnum);
 
 	if(!this->active){
@@ -706,9 +688,13 @@
 
 		/*get thickness: */
-		inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
+		tria1->inputs->GetParameterValueAtNode(&h[0],nodes[0],ThicknessEnum);
+		tria2->inputs->GetParameterValueAtNode(&h[1],nodes[1],ThicknessEnum);
+
 		if (h[0]!=h[1])ISSMERROR(" different thicknesses not supported for rift fronts");
 		thickness=h[0];
 
-		inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
+		tria1->inputs->GetParameterValueAtNode(&b[0],nodes[0],BedEnum);
+		tria2->inputs->GetParameterValueAtNode(&b[1],nodes[1],BedEnum);
+
 		if (b[0]!=b[1])ISSMERROR(" different beds not supported for rift fronts");
 		bed=b[0];
@@ -765,23 +751,39 @@
 /*}}}1*/
 /*FUNCTION Riftfront::Penetration {{{1*/
-int   Riftfront::Penetration(double* ppenetration, void* vinputs, int analysis_type){
-
-	const int     numgrids=2;
-	int           dofs[2]={0,1};
-	double        vxvy_list[2][2]; //velocities for all grids 
-	double        max_penetration;
-	double        penetration;
-	int           found;
-
-	ParameterInputs* inputs=NULL;
-
-	inputs=(ParameterInputs*)vinputs;
-
-
-	found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
-	if(!found)ISSMERROR(" could not find velocity in inputs!");
-
-	/*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
-	penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
+int   Riftfront::Penetration(double* ppenetration,  int analysis_type){
+
+	double    vx1;
+	double    vy1;
+	double    vx2;
+	double    vy2;
+
+	double    penetration;
+	int       found;
+
+	/*Objects: */
+	Element **elements    = NULL;
+	Node    **nodes       = NULL;
+	Tria     *tria1       = NULL;
+	Tria     *tria2       = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
+
+	/*First recover velocity: */
+	tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
+	tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
+	tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
+	tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
+
+	/*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
+	penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
 
 	/*Now, we return penetration only if we are active!: */
@@ -794,25 +796,44 @@
 /*}}}1*/
 /*FUNCTION Riftfront::PotentialUnstableConstraint {{{1*/
-int   Riftfront::PotentialUnstableConstraint(int* punstable, void* vinputs, int analysis_type){
-
-
-	const int     numgrids=2;
-	int           dofs[2]={0,1};
-	double        vxvy_list[2][2]; //velocities for all grids 
-	double        max_penetration;
-	double        penetration;
-	int           activate;
-	int           unstable;
-	int           found;
-
-	ParameterInputs* inputs=NULL;
-
-	inputs=(ParameterInputs*)vinputs;
-
-	found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
-	if(!found)ISSMERROR(" could not find velocity in inputs!");
-
-	/*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
-	penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
+int   Riftfront::PotentialUnstableConstraint(int* punstable,  int analysis_type){
+
+
+	const int   numgrids        = 2;
+	double      max_penetration;
+	double      penetration;
+	int         activate;
+	int         unstable;
+	int         found;
+	double      vx1;
+	double      vy1;
+	double      vx2;
+	double      vy2;
+
+
+	/*Objects: */
+	Element   **elements        = NULL;
+	Node      **nodes           = NULL;
+	Tria       *tria1           = NULL;
+	Tria       *tria2           = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
+
+	/*First recover velocity: */
+	tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
+	tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
+	tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
+	tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
+
+	/*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
+	penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
 
 	/*Ok, we are looking for positive penetration in an active constraint: */
@@ -834,22 +855,41 @@
 /*}}}1*/
 /*FUNCTION Riftfront::PreConstrain {{{1*/
-int   Riftfront::PreConstrain(int* punstable, void* vinputs, int analysis_type){
-
-	const int     numgrids=2;
-	int           dofs[2]={0,1};
-	double        vxvy_list[2][2]; //velocities for all grids 
-	double        penetration;
-	int           unstable;
-	ParameterInputs* inputs=NULL;
-	int           found;
-
-	inputs=(ParameterInputs*)vinputs;
+int   Riftfront::PreConstrain(int* punstable,  int analysis_type){
+
+	const int   numgrids    = 2;
+	double      penetration;
+	int         unstable;
+	int         found;
+	double      vx1;
+	double      vy1;
+	double      vx2;
+	double      vy2;
+
+
+	/*Objects: */
+	Element   **elements    = NULL;
+	Node      **nodes       = NULL;
+	Tria       *tria1       = NULL;
+	Tria       *tria2       = NULL;
+
+	/*Recover hook objects: */
+	elements=(Element**)helements.deliverp();
+	nodes=(Node**)hnodes.deliverp();
+
+	/*enum of element? */
+	if(elements[0]->Enum()!=TriaEnum)ISSMERROR(" only Tria element allowed for Riftfront load!");
+
+	/*recover elements on both side of rift: */
+	tria1=(Tria*)elements[0];
+	tria2=(Tria*)elements[1];
 
 	/*First recover velocity: */
-	found=inputs->Recover("velocity",&vxvy_list[0][0],2,dofs,numgrids,(void**)nodes);
-	if(!found)ISSMERROR(" could not find velocity in inputs!");
-	
-	/*Grid 1 faces grid2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
-	penetration=(vxvy_list[1][0]-vxvy_list[0][0])*normal[0]+(vxvy_list[1][1]-vxvy_list[0][1])*normal[1];
+	tria1->inputs->GetParameterValueAtNode(&vx1,nodes[0],VxEnum);
+	tria2->inputs->GetParameterValueAtNode(&vx2,nodes[1],VxEnum);
+	tria1->inputs->GetParameterValueAtNode(&vy1,nodes[0],VyEnum);
+	tria2->inputs->GetParameterValueAtNode(&vy2,nodes[1],VyEnum);
+
+	/*Node 1 faces node 2, compute penetration of 2 into 1 (V2-V1).N (with N normal vector, and V velocity vector: */
+	penetration=(vx2-vx1)*normal[0]+(vy2-vy1)*normal[1];
 
 	/*Ok, we are preconstraining here. Ie, anything that penetrates is constrained until stability of the entire set 
@@ -895,16 +935,2 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::UpdateFromInputs {{{1*/
-void  Riftfront::UpdateFromInputs(void* vinputs){
-
-	int  dofs[1]={0};
-	ParameterInputs* inputs=NULL;	
-	
-	inputs=(ParameterInputs*)vinputs;
-
-	inputs->Recover("thickness",&h[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
-	inputs->Recover("bed",&b[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
-	inputs->Recover("surface",&s[0],1,dofs,MAX_RIFTFRONT_GRIDS,(void**)nodes);
-
-}
-/*}}}1*/
Index: /issm/trunk/src/c/objects/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Riftfront.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _RIFTFRONT_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Load.h"
 #include "./Matpar.h"
@@ -15,54 +17,39 @@
 
 class Element;
+/*}}}*/
+
 class Riftfront: public Load {
 
-	private: 
-		char	type[RIFTFRONTSTRING];
+	public:
 		int		id;
 
-		/*nodes: */
-		int   node_ids[MAX_RIFTFRONT_GRIDS]; //node ids
-		Node* nodes[MAX_RIFTFRONT_GRIDS]; //node pointers
-		int   node_offsets[MAX_RIFTFRONT_GRIDS]; //node offsets in nodes dataset
+		Hook hnodes; //2 nodes
+		Hook helements; //2 elements
+		Hook hmatpar;
+		
+		/*computational: */
+		int      penalty_lock;
+		bool     active;
+		bool     frozen;
+		int      counter;
+		bool     prestable;
+		bool     material_converged;
+		double   normal[2];
+		double   length;
+		double   fraction;
+		
+		Parameters* parameters; //pointer to solution parameters
+		Inputs*  inputs;
 
-		/*material: */
-		int mparid;
-		Matpar* matpar; 
-		int   matpar_offset;
-
-		/*properties: */
-		double		h[MAX_RIFTFRONT_GRIDS]; //thickness
-		double		b[MAX_RIFTFRONT_GRIDS]; //bed
-		double		s[MAX_RIFTFRONT_GRIDS]; //surface
-
-		double      normal[2];
-		double      length;
-		int         fill;
-		double      friction;
-		double      fraction;
-		double      fractionincrement;
-		bool        shelf;
-
-		double      penalty_offset;
-		int         penalty_lock;
-
-		/*computational: */
-		bool        active;
-		bool        frozen;
-		int         counter;
-		bool        prestable;
-		bool        material_converged;
-
-	public:
 
 		/*constructors,destructors: {{{1*/
 		Riftfront();
-		void Init(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
-		Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
-		Riftfront(int id, int i, IoModel* iomodel);
+		Riftfront(int riftfront_id,int* riftfront_node_ids, int riftfront_matpar_id);
+		Riftfront(int riftfront_id,Hook* riftfront_hnodes, Hook* riftfront_hmatpar, Parameters* parameters, Inputs* riftfront_inputs);
+		Riftfront(int riftfront_id,int i, IoModel* iomodel);
 		~Riftfront();
 		/*}}}*/
 		/*object management: {{{1*/
-		void  Configure(void* elements,void* nodes,void* materials);
+		void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* vertices,DataSet* materials,Parameters* parameters);
 		Object* copy();
 		void  DeepEcho();
@@ -78,20 +65,19 @@
 		/*}}}*/
 		/*numerics: {{{1*/
-		void  UpdateFromInputs(void* inputs);
 		void  GetDofList(int* doflist,int* pnumberofdofs);
-		void  CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type);
-		void  CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type);
-		void  PenaltyCreateKMatrix(Mat Kgg,void* inputs,double kmax,int analysis_type,int sub_analysis_type);
-		void  PenaltyCreatePVector(Vec pg,void* inputs,double kmax,int analysis_type,int sub_analysis_type);
+		void  CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type);
+		void  CreatePVector(Vec pg,  int analysis_type,int sub_analysis_type);
+		void  PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type);
+		void  PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type);
 		bool  PreStable();
 		void  SetPreStable();
-		int   PreConstrain(int* punstable, void* inputs, int analysis_type);
-		int   Constrain(int* punstable, void* inputs, int analysis_type);
-		void  FreezeConstraints(void* inputs, int analysis_type);
+		int   PreConstrain(int* punstable,  int analysis_type);
+		int   Constrain(int* punstable,  int analysis_type);
+		void  FreezeConstraints( int analysis_type);
 		bool  IsFrozen(void);
-		int   Penetration(double* ppenetration, void* inputs, int analysis_type);
-		int   MaxPenetration(double* ppenetration, void* inputs, int analysis_type);
-		int   PotentialUnstableConstraint(int* punstable, void* inputs, int analysis_type);
-		int   IsMaterialStable(void* inputs, int analysis_type);
+		int   Penetration(double* ppenetration,  int analysis_type);
+		int   MaxPenetration(double* ppenetration,  int analysis_type);
+		int   PotentialUnstableConstraint(int* punstable,  int analysis_type);
+		int   IsMaterialStable( int analysis_type);
 		void  OutputProperties(Vec riftproperties);
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Sing.h
===================================================================
--- /issm/trunk/src/c/objects/Sing.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Sing.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define  _SING_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Element.h"
 #include "./Node.h"
@@ -15,4 +17,5 @@
 #include "../DataSet/DataSet.h"
 #include "../DataSet/Parameters.h"
+/*}}}*/
 
 class Sing: public Element{
Index: /issm/trunk/src/c/objects/SingVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/SingVertexInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/SingVertexInput.h	(revision 3637)
@@ -3,8 +3,12 @@
  */
 
-#include "./Input.h"
 
 #ifndef _SINGVERTEXINPUT_H_
 #define _SINGVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
 
 class SingVertexInput: public Input{
Index: /issm/trunk/src/c/objects/SolPar.h
===================================================================
--- /issm/trunk/src/c/objects/SolPar.h	(revision 3636)
+++ /issm/trunk/src/c/objects/SolPar.h	(revision 3637)
@@ -6,5 +6,8 @@
 #define _SOLPAR_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
+/*}}}*/
 
 class SolPar: public Object{
Index: /issm/trunk/src/c/objects/Spc.h
===================================================================
--- /issm/trunk/src/c/objects/Spc.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Spc.h	(revision 3637)
@@ -6,6 +6,9 @@
 #define _SPC_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "../DataSet/DataSet.h"
+/*}}}*/
 
 class Spc: public Object{
Index: /issm/trunk/src/c/objects/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Tria.cpp	(revision 3636)
+++ /issm/trunk/src/c/objects/Tria.cpp	(revision 3637)
@@ -3,4 +3,6 @@
  */
 
+/*Headers:*/
+/*{{{1*/
 #ifdef HAVE_CONFIG_H
 	#include "config.h"
@@ -22,4 +24,5 @@
 #include "../include/typedefs.h"
 #include "../include/macros.h"
+/*}}}*/
 
 /*Object constructors and destructor*/
@@ -66,8 +69,9 @@
 Tria::Tria(int tria_id, int index, IoModel* iomodel){ //i is the element index
 
-	int i,j;
-	int tria_node_ids[3];
-	int tria_matice_id;
-	int tria_matpar_id;
+	int    i;
+	int    j;
+	int    tria_node_ids[3];
+	int    tria_matice_id;
+	int    tria_matpar_id;
 	double nodeinputs[3];
 
@@ -443,5 +447,4 @@
 /*}}}*/
 
-		
 /*Object functions*/
 /*FUNCTION Tria::ComputeBasalStress {{{1*/
@@ -518,7 +521,7 @@
 
 	/*dynamic objects pointed to by hooks: */
-	Node**  nodes=NULL;
-	Matpar* matpar=NULL;
-	Matice* matice=NULL;
+	Node**  nodes=   NULL;
+	Matpar* matpar    =NULL;
+	Matice* matice= NULL;
 
 	/*recover objects from hooks: */
Index: /issm/trunk/src/c/objects/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Tria.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Tria.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _TRIA_H_
 
+/*Headers:*/
+/*{{{1*/
 #include "./Object.h"
 #include "./Element.h"
@@ -14,4 +16,5 @@
 #include "../DataSet/Parameters.h"
 #include "../DataSet/Inputs.h"
+/*}}}*/
 
 class Tria: public Element{
Index: /issm/trunk/src/c/objects/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/TriaVertexInput.h	(revision 3636)
+++ /issm/trunk/src/c/objects/TriaVertexInput.h	(revision 3637)
@@ -3,8 +3,12 @@
  */
 
-#include "./Input.h"
 
 #ifndef _TRIAVERTEXINPUT_H_
 #define _TRIAVERTEXINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+/*}}}*/
 
 class TriaVertexInput: public Input{
Index: /issm/trunk/src/c/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/objects/Vertex.h	(revision 3636)
+++ /issm/trunk/src/c/objects/Vertex.h	(revision 3637)
@@ -6,4 +6,6 @@
 #define _VERTEX_H_
 
+/*Headers:*/
+/*{{{1*/
 class Object;
 class DofObject;
@@ -12,4 +14,5 @@
 #include "./Object.h"
 #include "./DofObject.h"
+/*}}}*/
 
 class Vertex: public Object,public DofObject{
