Index: /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp
===================================================================
--- /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp	(revision 4000)
+++ /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.cpp	(revision 4001)
@@ -10,5 +10,5 @@
 #include "../../EnumDefinitions/EnumDefinitions.h"
 
-void SpcNodesx( DofVec** pyg, DataSet* nodes,DataSet* constraints){
+void SpcNodesx(Vec* pyg, DataSet* nodes,DataSet* constraints){
 
 	int i;
@@ -17,5 +17,5 @@
 
 	/*output: */
-	DofVec* yg=NULL;
+	Vec* yg=NULL;
 
 	/*First, recover number of dofs from nodes: */
@@ -24,21 +24,12 @@
 	if(numberofdofs){
 		
-		/*Allocate dofvec: */
-		yg=new DofVec("yg");
-		yg->numdofs=numberofdofs;
-
 		/*Allocate yg: */
-		yg->vector=NewVec(numberofdofs);
+		yg=NewVec(numberofdofs);
 
 		/*Now, go through constraints, and update the nodes and the constraint vector at the same time: */
-		constraints->SetupSpcs(nodes,yg->vector);
+		constraints->SetupSpcs(nodes,yg);
 
 		/*Specify numentries: */
 		VecGetSize(yg->vector,&gsize);
-		yg->numentries=(int)gsize/yg->numdofs;
-	}
-	else{
-		/*Allocate dofvec: */
-		yg=new DofVec("yg");
 	}
 
Index: /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h
===================================================================
--- /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h	(revision 4000)
+++ /issm/trunk/src/c/modules/SpcNodesx/SpcNodesx.h	(revision 4001)
@@ -11,6 +11,5 @@
 
 /* local prototypes: */
-void SpcNodesx( DofVec** pyg, DataSet* nodesin,DataSet* constraints);
+void SpcNodesx(Vec* pyg, DataSet* nodesin,DataSet* constraints);
 
 #endif  /* _SPCNODESX_H */
-
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4000)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4001)
@@ -43,9 +43,9 @@
 		Penta();
 		Penta(int penta_id,int i, IoModel* iomodel,int nummodels);
-		Update(IoModel* iomodel,int analysis_counter,int analysis_type);
 		~Penta();
 		/*}}}*/
 		/*FUNCTION object management {{{1*/
 		void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters,int analysis_counter);
+		void Update(IoModel* iomodel,int analysis_counter,int analysis_type);
 		Object* copy();
 		void  DeepEcho();
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4000)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4001)
@@ -38,9 +38,9 @@
 		Tria();
 		Tria(int tria_id,int i, IoModel* iomodel);
-		Update(IoModel* iomodel,int analysis_counter,int analysis_type);
 		~Tria();
 		/*}}}*/
 		/*FUNCTION object management {{{1*/
 		void  Configure(DataSet* elements,DataSet* loads,DataSet* nodes,DataSet* materials,Parameters* parameters);
+		void  Update(IoModel* iomodel,int analysis_counter,int analysis_type);
 		Object* copy();
 		void  DeepEcho();
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 4000)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 4001)
@@ -22,4 +22,7 @@
 /*FUNCTION FemModel::constructor {{{1*/
 FemModel::FemModel(int in_nummodels){
+
+	/*intermediary*/
+	int i;
 
 	nummodels=in_nummodels;
@@ -50,4 +53,5 @@
 FemModel::~FemModel(){
 
+	/*Intermediary*/
 	int i;
 
@@ -89,5 +93,4 @@
 /*Object management*/
 /*FUNCTION FemModel::Echo {{{1*/
-
 void FemModel::Echo(void){
 
@@ -95,11 +98,11 @@
 	printf("   number of fem models: %i\n",nummodels);
 	printf("   analysis_type_list: \n");
-	for(i=0;i<nummodels;i++)printf("     %i: %s\n",i,EnumAsString(analysis_type_list[i]));
+	for(int i=0;i<nummodels;i++)printf("     %i: %s\n",i,EnumAsString(analysis_type_list[i]));
 	printf("   current analysis_type: \n");
-	printf("     %i: %s\n",i,EnumAsString(analysis_type_list[analysis_counter]));
+	printf("     %i: %s\n",analysis_counter,EnumAsString(analysis_type_list[analysis_counter]));
 
 
 }
-/*}}}1*/
+/*}}}*/
 
 /*Numerics: */
@@ -112,8 +115,8 @@
 
 	/*intermediary: */
-	IoFemModel* iomodel=NULL;
+	IoModel* iomodel=NULL;
 	
 	_printf_("   fill model with matlab workspace data\n");
-	iomodel=new IoFemModel(IOMODEL);
+	iomodel = new IoModel(IOMODEL);
 
 	_printf_("   create datasets:\n");
@@ -133,5 +136,5 @@
 
 	_printf_("   reducing single point constraints vector:\n");
-	Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter]->vector,nodesets[analysis_counter]);
+	Reducevectorgtosx(&ys[analysis_counter], yg[analysis_counter],nodesets[analysis_counter]);
 	
 	_printf_("   normalizing rigid body constraints matrix:\n");
@@ -149,5 +152,5 @@
 /*}}}1*/
 /*FUNCTION FemModel::GetCurrentAnalysis {{{1*/
-FemFemModel* FemModel::GetCurrentAnalysis(){
+int FemModel::GetCurrentAnalysis(){
 	return analysis_type_list[analysis_counter];
 }
@@ -156,5 +159,5 @@
 void FemModel::SetCurrentAnalysis(int analysis_type){
 	int found=-1;
-	for(i=0;i<nummodels;i++){
+	for(int i=0;i<nummodels;i++){
 		if (analysis_type_list[i]==analysis_type){
 			found=i;
@@ -162,6 +165,6 @@
 		}
 	}
-	if(found)analysis_counter=i;
-	else ISSMERRR("%s%s%s"," could not find analysis_type ",EnumAsString(analysis_type) " in list of FemModel analyses");
+	if(found!=-1) analysis_counter=found;
+	else ISSMERROR("Could not find analysis_type %s in list of FemModel analyses",EnumAsString(analysis_type));
 }
 /*}}}1*/
Index: /issm/trunk/src/c/objects/FemModel.h
===================================================================
--- /issm/trunk/src/c/objects/FemModel.h	(revision 4000)
+++ /issm/trunk/src/c/objects/FemModel.h	(revision 4001)
@@ -42,5 +42,5 @@
 		Mat*                 Gmn;
 		NodeSets**           nodesets; //boundary conditions dof sets
-		Vec*             yg; //boundary conditions in global g-set
+		Vec*                 yg; //boundary conditions in global g-set
 		Vec*                 ys; //boundary conditions, in reduced s-set
 
@@ -50,13 +50,12 @@
 
 		/*Methods: */
-		Echo();
+		void Echo();
 
 		/*Fem: */
 		void  AddAnalysis(ConstDataHandle IOMODEL, int analysis_type);
-		int   SetCurrentAnalysis(int analysis_type);
-		void  GetCurrentAnalysis(void);
+		void  SetCurrentAnalysis(int analysis_type);
+		int   GetCurrentAnalysis(void);
 
 };
 
-
 #endif
Index: /issm/trunk/src/c/objects/objects.h
===================================================================
--- /issm/trunk/src/c/objects/objects.h	(revision 4000)
+++ /issm/trunk/src/c/objects/objects.h	(revision 4001)
@@ -15,5 +15,4 @@
 #include "./Node.h"
 #include "./NodeSets.h"
-#include "./Model.h"
 #include "./Result.h"
 #include "./IoModel.h"
