Index: /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.cpp	(revision 14303)
+++ /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.cpp	(revision 14304)
@@ -14,5 +14,4 @@
 	bool*   elementonwater=NULL;
 	int*    elements=NULL;
-	int*    connectivity=NULL;
 	int*    elementconnectivity=NULL;
 	int*    front=NULL;
@@ -20,22 +19,17 @@
 	bool    found;
 	int     numberofelements,numberofsegments;
-	int     N,M;
 	int     i,j,ii,jj,id;
+	int     dummy;
 
 	/*Boot module: */
 	MODULEBOOT();
 
-	/*checks on arguments on the matlab side: */
-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InternalFrontUsage);
+	/*checks on arguments: */
+	CHECKARGUMENTS(NLHS,NRHS,&InternalFrontUsage);
 
-	/*Fetch required fields*/
-	FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
-	if(numberofelements<=0) _error_("No elements found in the model");
-	FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements"));
-	if(M!=numberofelements || N!=3) _error_("Field 'elements' should be of size [md.numberofelements 3]");
-	FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater"));
-	if(M!=numberofelements || N!=1) _error_("Field 'elementonwater' should be of size [md.numberofelements 1]");
-	FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity"));
-	if(M!=numberofelements || N!=3) _error_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
+	/*Fetch inputs: */
+	FetchData(&elements,&numberofelements,&dummy,ELEMENTS);
+	FetchData(&elementonwater,&dummy,&dummy,ELEMENTONWATER);
+	FetchData(&elementconnectivity,&dummy,&dummy,ELEMENTCONNECTIVITY);
 
 	/*Allocate and initialize all variables*/
Index: /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.h	(revision 14303)
+++ /issm/trunk-jpl/src/wrappers/InternalFront/InternalFront.h	(revision 14304)
@@ -27,5 +27,7 @@
 #ifdef _HAVE_MATLAB_MODULES_
 /* serial input macros: */
-#define MODEL prhs[0]
+#define ELEMENTS prhs[0]
+#define ELEMENTONWATER prhs[1]
+#define ELEMENTCONNECTIVITY prhs[2]
 /* serial output macros: */
 #define FRONT (mxArray**)&plhs[0]
@@ -34,5 +36,7 @@
 #ifdef _HAVE_PYTHON_MODULES_
 /* serial input macros: */
-#define MODEL PyTuple_GetItem(args,0)
+#define ELEMENTS PyTuple_GetItem(args,0)
+#define ELEMENTONWATER PyTuple_GetItem(args,1)
+#define ELEMENTCONNECTIVITY PyTuple_GetItem(args,2)
 /* serial output macros: */
 #define FRONT output,0]
@@ -43,5 +47,5 @@
 #define NLHS  1
 #undef NRHS
-#define NRHS  1
+#define NRHS  3
 
 #endif
