Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 10308)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 10309)
@@ -5,9 +5,7 @@
 #include "./GroundinglineMigrationx.h"
 #include "./GroundinglineMigrationxLocal.h"
-
 #include "../../shared/shared.h"
 #include "../../io/io.h"
 #include "../../include/include.h"
-#include "../../io/io.h"
 #include "../../toolkits/toolkits.h"
 #include "../../EnumDefinitions/EnumDefinitions.h"
@@ -16,5 +14,6 @@
 void GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
 
-	int migration_style;
+	int i, migration_style;
+	Element* element=NULL;
 	
 	_printf_(VerboseModule(),"   Migrating grounding line\n");
@@ -24,6 +23,42 @@
 
 	/*call different migration modules, according to user wishes: */
-	if(migration_style==AgressiveMigrationEnum) AgressiveMigration(elements,nodes, vertices,loads,materials, parameters);
-	else if(migration_style==SoftMigrationEnum) SoftMigration(elements,nodes, vertices,loads,materials, parameters);
+	if(migration_style==AgressiveMigrationEnum){
+		/*Migrate grounding line : */
+		for(i=0;i<elements->Size();i++){
+			element=(Element*)elements->GetObjectByOffset(i);
+			element->AgressiveMigration();
+		}
+
+		/*Synchronise mask: */
+		for(i=0;i<elements->Size();i++){
+			element=(Element*)elements->GetObjectByOffset(i);
+			element->ShelfSync();
+		}
+	}
+	else if(migration_style==SoftMigrationEnum){
+
+		/*Create flag for nodes above the hydrostatic equilibrium: */
+		double* potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters);
+
+		/*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */
+		double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,potential_sheet_ungrounding);
+
+		/*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf 
+		 * that want to: */
+		for(i=0;i<elements->Size();i++){
+			element=(Element*)elements->GetObjectByOffset(i);
+			element->SoftMigration(sheet_ungrounding);
+		}
+
+		/*Synchronise mask*/
+		for(i=0;i<elements->Size();i++){
+			element=(Element*)elements->GetObjectByOffset(i);
+			element->ShelfSync();
+		}
+
+		/*free ressouces: */
+		xfree((void**)&potential_sheet_ungrounding);
+		xfree((void**)&sheet_ungrounding);
+	}
 	else if(migration_style==NoneEnum) _printf_(true,"%s\n","NoneEnum supplied for migration style, doing nothing!");
 	else _error_("%s not supported yet!",EnumToStringx(migration_style));
Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h	(revision 10308)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h	(revision 10309)
@@ -11,6 +11,4 @@
 
 /* local prototypes: */
-void       AgressiveMigration(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
-void       SoftMigration(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
 double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters);
 double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* potential_sheet_ungrounding);
Index: /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp
===================================================================
--- /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp	(revision 10308)
+++ /issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp	(revision 10309)
@@ -12,63 +12,4 @@
 #include "../../EnumDefinitions/EnumDefinitions.h"
 
-/*FUNCTION AgressiveMigration{{{1*/
-void AgressiveMigration(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
-	/*Here, whatever nodes inside the ice sheet want to unground, we allow -> instantaneous transmission of water through the bedrock: */
-
-	int i;
-	Element* element=NULL;
-
-	_printf_(VerboseModule(),"   Migrating grounding line\n");
-
-	/*Carry out grounding line migration for those elements: */
-	for(i=0;i<elements->Size();i++){
-		element=(Element*)elements->GetObjectByOffset(i);
-		element->AgressiveMigration();
-	}
-
-	/*Synchronize shelf status: */
-	for(i=0;i<elements->Size();i++){
-		element=(Element*)elements->GetObjectByOffset(i);
-		element->ShelfSync();
-	}
-
-} 
-/*}}}*/
-/*FUNCTION SoftMigration {{{1*/
-void       SoftMigration(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){ 
-
-	/*intermediary: */
-	int     i;
-	double* potential_sheet_ungrounding=NULL;
-	double* sheet_ungrounding=NULL;
-	Element* element=NULL;
-	
-	_printf_(VerboseModule(),"   Migrating grounding line\n");
-
-	/*First, figure out which nodes that are on the ice sheet want to unground. Build a flags vector for this (size number of nodes: */
-	potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters);
-	
-	/*Now, propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */
-	sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,potential_sheet_ungrounding);
-	
-	/*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf 
-	 * that want to: */
-	for(i=0;i<elements->Size();i++){
-		element=(Element*)elements->GetObjectByOffset(i);
-		element->SoftMigration(sheet_ungrounding);
-	}
-	
-	/*Synchronize shelf status: */
-	for(i=0;i<elements->Size();i++){
-		element=(Element*)elements->GetObjectByOffset(i);
-		element->ShelfSync();
-	}
-
-	/*free ressouces: */
-	xfree((void**)&potential_sheet_ungrounding);
-	xfree((void**)&sheet_ungrounding);
-
-}
-/*}}}*/
 /*FUNCTION PotentialSheetUngrounding {{{1*/
 double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters){ 
@@ -168,9 +109,8 @@
 }
 /*}}}*/
-/*FUNCTION CreateElementOnGroundingnine {{{1*/
+/*FUNCTION CreateElementOnGroundingline {{{1*/
 bool*      CreateElementOnGroundingline(Elements* elements,double* element_on_iceshelf){ 
 
-	int      i;
-	int      j;
+	int      i,j;
 	Element *element       = NULL;
 	bool    *element_on_gl = NULL;
@@ -330,5 +270,4 @@
 	Node*   node=NULL;
 
-
 	/*First, initialize nodes_on_iceshelf, which will track which nodes have changed status: */
 	numnods=nodes->NumberOfNodes(configuration_type);
