Index: ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 13908)
+++ ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp	(revision 13909)
@@ -1139,6 +1139,8 @@
 /*FUNCTION Tria::GetNumberOfNodes{{{*/
 int Tria::GetNumberOfNodes(void){
 
+	if(this->nodes==NULL) return 0;
+
 	switch(this->element_type){
 		case P1Enum:
 			return 3;
Index: ../trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/objects/Elements/Penta.cpp	(revision 13908)
+++ ../trunk-jpl/src/c/classes/objects/Elements/Penta.cpp	(revision 13909)
@@ -904,6 +904,8 @@
 /*FUNCTION Penta::GetNumberOfNodes{{{*/
 int Penta::GetNumberOfNodes(void){
 
+	if(this->nodes==NULL) return 0;
+
 	switch(this->element_type){
 		case P1Enum:
 			return 6;
Index: ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.cpp	(revision 13908)
+++ ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.cpp	(revision 13909)
@@ -69,7 +69,6 @@
 /*FUNCTION PentaHook::SetHookNodes{{{*/
 void PentaHook::SetHookNodes(int* node_ids,int analysis_counter){
 	this->hnodes[analysis_counter]= new Hook(node_ids,6);
-
 }
 /*}}}*/
 /*FUNCTION PentaHook::InitHookNeighbors{{{*/
Index: ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.h
===================================================================
--- ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.h	(revision 13908)
+++ ../trunk-jpl/src/c/classes/objects/Elements/PentaHook.h	(revision 13909)
@@ -12,20 +12,20 @@
 class PentaHook{
 
 	public: 
-		int   numanalyses; //number of analysis types
-		Hook** hnodes; // 6 nodes for each analysis type
-		Hook*  hmaterial; // 1 ice material
-		Hook*  hmatpar; // 1 material parameter
-		Hook*  hneighbors; // 2 elements, first down, second up
+		int    numanalyses;   //number of analysis types
+		Hook **hnodes;        // 6 nodes for each analysis type
+		Hook  *hmaterial;     // 1 ice material
+		Hook  *hmatpar;       // 1 material parameter
+		Hook  *hneighbors;    // 2 elements, first down, second up
 
-		/*FUNCTION constructors, destructors {{{*/
+		/*constructors, destructors*/
 		PentaHook();
 		PentaHook(int in_numanalyses,int material_id, IoModel* iomodel);
 		~PentaHook();
+
 		void SetHookNodes(int* node_ids,int analysis_counter);
 		void SpawnTriaHook(TriaHook* triahook,int* indices);
 		void InitHookNeighbors(int* element_ids);
-		/*}}}*/
 };
 
 #endif //ifndef _PENTAHOOK_H_
Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 13908)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 13909)
@@ -341,7 +341,7 @@
 	/*Intermediary*/
 	int  fsize,ssize,flocalsize,slocalsize;
 	int  connectivity, numberofdofspernode;
-	int  analysis_type,configuration_type;
+	int  configuration_type;
 	int  m,n,M,N;
 	int *d_nnz = NULL;
 	int *o_nnz = NULL;
@@ -356,15 +356,14 @@
 	bool oldalloc=true;
 
 	/*retrieve parameters: */
-	this->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	this->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
 	this->parameters->FindParam(&connectivity,MeshAverageVertexConnectivityEnum);
 
 	/*retrieve node info*/
 	fsize      = this->nodes->NumberOfDofs(configuration_type,FsetEnum);
 	ssize      = this->nodes->NumberOfDofs(configuration_type,SsetEnum);
-	flocalsize = this->nodes->NumberOfDofsLocal(analysis_type,FsetEnum);
-	slocalsize = this->nodes->NumberOfDofsLocal(analysis_type,SsetEnum);
+	flocalsize = this->nodes->NumberOfDofsLocal(configuration_type,FsetEnum);
+	slocalsize = this->nodes->NumberOfDofsLocal(configuration_type,SsetEnum);
 
 	numberofdofspernode=this->nodes->MaxNumDofs(configuration_type,GsetEnum);
 
@@ -407,7 +406,7 @@
 
 	/*Intermediary*/
 	int      i,j,k,index,offset,count;
-	int      analysis_type,configuration_type;
+	int      configuration_type;
 	int      d_nz,o_nz;
 	Element *element      = NULL;
 	int     *head         = NULL;
@@ -420,16 +419,15 @@
 	int *o_nnz = NULL;
 
 	/*retrive parameters: */
-	this->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 	this->parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
 
 	/*Get vector size and number of nodes*/
-	int numnodes            = nodes->NumberOfNodes(analysis_type);
+	int numnodes            = nodes->NumberOfNodes(configuration_type);
 	int numberofdofspernode = nodes->MaxNumDofs(configuration_type,GsetEnum);
-	int M                   = nodes->NumberOfDofs(analysis_type,set1enum);
-	int N                   = nodes->NumberOfDofs(analysis_type,set2enum);
-	int m                   = nodes->NumberOfDofsLocal(analysis_type,set1enum);
-	int n                   = nodes->NumberOfDofsLocal(analysis_type,set2enum);
+	int M                   = nodes->NumberOfDofs(configuration_type,set1enum);
+	int N                   = nodes->NumberOfDofs(configuration_type,set2enum);
+	int m                   = nodes->NumberOfDofsLocal(configuration_type,set1enum);
+	int n                   = nodes->NumberOfDofsLocal(configuration_type,set2enum);
 	int numnodesperobject   = elements->MaxNumNodes();
 
 	/*First, we are building chaining vectors so that we know what nodes are
@@ -470,7 +468,7 @@
 	/*Create connectivity vector*/
 	for(i=0;i<nodes->Size();i++){
 		Node* node=dynamic_cast<Node*>(nodes->GetObjectByOffset(i));
-		if(node->InAnalysis(analysis_type)){
+		if(node->InAnalysis(configuration_type)){
 
 			/*Reinitialize flags to 0*/
 			for(j=0;j<numnodes;j++) flags[j]=false;
@@ -508,7 +506,7 @@
 		o_nnz=xNew<int>(m);
 		for(i=0;i<nodes->Size();i++){
 			Node* node=dynamic_cast<Node*>(nodes->GetObjectByOffset(i));
-			if(node->InAnalysis(analysis_type) && !node->IsClone()){
+			if(node->InAnalysis(configuration_type) && !node->IsClone()){
 				for(j=0;j<node->indexing.fsize;j++){
 					_assert_(count<m);
 					d_nnz[count]=numberofdofspernode*(d_connectivity[node->Sid()] + all_connectivity_clone[node->Sid()]);
