diff --git a/demos/scenario_2_bottleneck/bottleneck_ini.xml b/demos/scenario_2_bottleneck/bottleneck_ini.xml
index cafd6633901521e2c0b866c5bf3d42bd7e762a8f..a989374c258c841cf281fcca2182ce1344c415e7 100644
--- a/demos/scenario_2_bottleneck/bottleneck_ini.xml
+++ b/demos/scenario_2_bottleneck/bottleneck_ini.xml
@@ -2,7 +2,7 @@
 
 <JuPedSim project="JPS-Project" version="0.5"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
+xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
 
 	<!-- seed used for initialising random generator -->
 	<seed>12542</seed>
@@ -13,13 +13,13 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
 		<file location="bottleneck_traj.xml" />
 	</trajectories>
 	<!-- where to store the logs -->
-	<logfile>log</logfile>
+	<logfile>log.txt</logfile>
 
 	<!-- traffic information: e.g closed doors or smoked rooms -->
 	<traffic_constraints>
 		<!-- doors states are: close or open -->
 		<doors>
-			<door trans_id="2" caption="" state="open" />
+			<door trans_id="2" caption="main_exit" state="open" />
 		</doors>
 	</traffic_constraints>
 
@@ -38,68 +38,68 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
 	</routing>
 
 	<!--persons information and distribution -->
-	<agents operational_model_id="1">
+	<agents operational_model_id="2">
 		<agents_distribution>
 			<group group_id="1" agent_parameter_id="1" room_id="1" subroom_id="0" number="40" goal_id="0" router_id="1" />
 		</agents_distribution>
 	</agents>
 
 	    <!-- These parameters may be overwritten -->
- <operational_models>
-    <model operational_model_id="1" description="gcfm">
-      <model_parameters>
-        <solver>euler</solver>
-        <stepsize>0.01</stepsize>
-        <exitCrossingStrategy>4</exitCrossingStrategy>
-        <linkedcells enabled="true" cell_size="2.2" />
-        <force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
-        <force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
-      </model_parameters>
-      <agent_parameters agent_parameter_id="1">
-        <v0 mu="0.5" sigma="0.0" />
-        <bmax mu="0.25" sigma="0.001" />
-        <bmin mu="0.20" sigma="0.001" />
-        <amin mu="0.18" sigma="0.001" />
-        <tau mu="0.5" sigma="0.001" />
-        <atau mu="0.5" sigma="0.001" />
-      </agent_parameters>
-      <agent_parameters agent_parameter_id="2">
-        <v0 mu="0.5" sigma="0.0" />
-        <bmax mu="0.25" sigma="0.001" />
-        <bmin mu="0.20" sigma="0.001" />
-        <amin mu="0.18" sigma="0.001" />
-        <tau mu="0.5" sigma="0.001" />
-        <atau mu="0.5" sigma="0.001" />
-      </agent_parameters>
-    </model>
+	 <operational_models>
+		<model operational_model_id="1" description="gcfm">
+		  <model_parameters>
+			<solver>euler</solver>
+			<stepsize>0.01</stepsize>
+			<exitCrossingStrategy>4</exitCrossingStrategy>
+			<linkedcells enabled="true" cell_size="2.2" />
+			<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+			<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+		  </model_parameters>
+		  <agent_parameters agent_parameter_id="1">
+			<v0 mu="0.5" sigma="0.0" />
+			<bmax mu="0.25" sigma="0.001" />
+			<bmin mu="0.20" sigma="0.001" />
+			<amin mu="0.18" sigma="0.001" />
+			<tau mu="0.5" sigma="0.001" />
+			<atau mu="0.5" sigma="0.001" />
+		  </agent_parameters>
+		  <agent_parameters agent_parameter_id="2">
+			<v0 mu="0.5" sigma="0.0" />
+			<bmax mu="0.25" sigma="0.001" />
+			<bmin mu="0.20" sigma="0.001" />
+			<amin mu="0.18" sigma="0.001" />
+			<tau mu="0.5" sigma="0.001" />
+			<atau mu="0.5" sigma="0.001" />
+		  </agent_parameters>
+		</model>
 
-    <model operational_model_id="2" description="gompertz">
-      <model_parameters>
-        <solver>euler</solver>
-        <stepsize>0.01</stepsize>
-        <exitCrossingStrategy>3</exitCrossingStrategy>
-        <linkedcells enabled="true" cell_size="2.2" />
-        <force_ped nu="3"  b="0.25" c="3.0"/>
-        <force_wall nu="10" b="0.70" c="3.0"/>
-      </model_parameters>
-      <agent_parameters agent_parameter_id="1">
-        <v0 mu="0.5" sigma="0.0" />
-        <bmax mu="0.25" sigma="0.001" />
-        <bmin mu="0.20" sigma="0.001" />
-        <amin mu="0.18" sigma="0.001" />
-        <tau mu="0.5" sigma="0.001" />
-        <atau mu="0.5" sigma="0.001" />
-      </agent_parameters>
-      <agent_parameters agent_parameter_id="2">
-        <v0 mu="0" sigma="0.0" />
-        <bmax mu="0.25" sigma="0.001" />
-        <bmin mu="0.20" sigma="0.001" />
-        <amin mu="0.18" sigma="0.001" />
-        <tau mu="0.5" sigma="0.001" />
-        <atau mu="0.5" sigma="0.001" />
-      </agent_parameters>
-    </model>
-  </operational_models>
+		<model operational_model_id="2" description="gompertz">
+		  <model_parameters>
+			<solver>euler</solver>
+			<stepsize>0.01</stepsize>
+			<exitCrossingStrategy>3</exitCrossingStrategy>
+			<linkedcells enabled="true" cell_size="2.2" />
+			<force_ped nu="3"  b="0.25" c="3.0"/>
+			<force_wall nu="10" b="0.70" c="3.0"/>
+		  </model_parameters>
+		  <agent_parameters agent_parameter_id="1">
+			<v0 mu="0.5" sigma="0.0" />
+			<bmax mu="0.25" sigma="0.001" />
+			<bmin mu="0.20" sigma="0.001" />
+			<amin mu="0.18" sigma="0.001" />
+			<tau mu="0.5" sigma="0.001" />
+			<atau mu="0.5" sigma="0.001" />
+		  </agent_parameters>
+		  <agent_parameters agent_parameter_id="2">
+			<v0 mu="0" sigma="0.0" />
+			<bmax mu="0.25" sigma="0.001" />
+			<bmin mu="0.20" sigma="0.001" />
+			<amin mu="0.18" sigma="0.001" />
+			<tau mu="0.5" sigma="0.001" />
+			<atau mu="0.5" sigma="0.001" />
+		  </agent_parameters>
+		</model>
+	  </operational_models>
 
 	<route_choice_models>
 		<router router_id="1" description="global_shortest">
diff --git a/demos/scenario_3_corner/corner_geo.xml b/demos/scenario_3_corner/corner_geo.xml
index 09278ba2ad200d4965914e4ebcd312de661381d3..e4914c27db29dd9b04ca6fb10dd30407ec883f18 100644
--- a/demos/scenario_3_corner/corner_geo.xml
+++ b/demos/scenario_3_corner/corner_geo.xml
@@ -26,7 +26,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_geometry.xsd">
 					<vertex px="15.0" py="4.0" />
 					<vertex px="10.0" py="4.0" />
 				</polygon>
-
+<!-- 
 				<obstacle id="0" caption="table" height="1.0" closed="1">
 					<polygon>
 						<vertex px="12.0" py="5.9" />
@@ -45,6 +45,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_geometry.xsd">
 						<vertex px="16.4" py="-2.0" />
 					</polygon>
 				</obstacle>
+				-->
 			</subroom>
 			<crossings>
 				<!-- virtual exits between subrooms -->
diff --git a/demos/scenario_3_corner/corner_ini.xml b/demos/scenario_3_corner/corner_ini.xml
index f4ecbedeb734a570dc814d1e5c90956b37c3af5d..96ce88e57c1790250a4609737960a526e8eb1043 100644
--- a/demos/scenario_3_corner/corner_ini.xml
+++ b/demos/scenario_3_corner/corner_ini.xml
@@ -40,7 +40,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
 	<!--persons information and distribution -->
 	<agents operational_model_id="1">
 		<agents_distribution>
-			<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="10"
+			<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="0" number="30"
 				goal_id="-1" router_id="1" />
 		</agents_distribution>
 
diff --git a/demos/scenario_4_stairs/stairs_ini.xml b/demos/scenario_4_stairs/stairs_ini.xml
index 2a74589d868516b3d7eaa251b47b86aedb18b06d..788046ddf3d429cd419fa661aafc613d8fd59c49 100644
--- a/demos/scenario_4_stairs/stairs_ini.xml
+++ b/demos/scenario_4_stairs/stairs_ini.xml
@@ -41,7 +41,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
 
 	
 	<!--persons information and distribution -->
-	<agents operational_model_id="1">
+	<agents operational_model_id="2">
 		<agents_distribution>
 		<group group_id="1" agent_parameter_id="1"  room_id="0" subroom_id="0" number="100" router_id="1"/>
 		</agents_distribution>
diff --git a/demos/scenario_6_tribuneStadium/arena_ini.xml b/demos/scenario_6_tribuneStadium/arena_ini.xml
index 5342cc6bc975dc30189987e73852f052a8facaec..9ded176224965d134f7777100e7d92bc80b3fd51 100644
--- a/demos/scenario_6_tribuneStadium/arena_ini.xml
+++ b/demos/scenario_6_tribuneStadium/arena_ini.xml
@@ -1,113 +1,109 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<JuPedSim project="arena-section-Project" version="0.5" 
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
+<JuPedSim project="arena-section-Project" version="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
 
-	<!-- seed used for initialising random generator -->
-	<seed>12542</seed>
-	<!-- geometry file -->
-	<max_sim_time>600</max_sim_time>
-	<!-- geometry file -->
-	<geometry>arena_geometry.xml</geometry>
-	<!-- trajectories file and format -->
-	<trajectories format="xml-plain" fps="8">
-		<file location="arena_trajectories.xml" />
-		<!--<socket hostname="127.0.0.1" port="8989"/> -->
-	</trajectories>
-	<!-- where to store the logs -->
-	<!--<logfile>outputfiles/log.txt</logfile> -->
+  <!-- seed used for initialising random generator -->
+  <seed>12542</seed>
+  <!-- geometry file -->
+  <max_sim_time>600</max_sim_time>
+  <!-- geometry file -->
+  <geometry>arena_geometry.xml</geometry>
+  <!-- trajectories file and format -->
+  <trajectories format="xml-plain" fps="8">
+    <file location="arena_trajectories.xml" />
+    <!--<socket hostname="127.0.0.1" port="8989"/> -->
+  </trajectories>
+  <!-- where to store the logs -->
+  <!--<logfile>outputfiles/log.txt</logfile> -->
 
 
-	<!-- traffic information: e.g closed doors or smoked rooms -->
-	<traffic_constraints>
-		<!-- doors states are: close or open -->
-		<doors>
-		<door trans_id="2503" caption="AR09URO08" state="close" />
-		<door trans_id="2512" caption="AR09URO07" state="close" />
-		<door trans_id="2501" caption="TREPPE001" state="close" />
-		</doors>
-	</traffic_constraints>
+  <!-- traffic information: e.g closed doors or smoked rooms -->
+  <traffic_constraints>
+    <!-- doors states are: close or open -->
+    <doors>
+      <door trans_id="2503" caption="AR09URO08" state="close" />
+      <door trans_id="2512" caption="AR09URO07" state="close" />
+      <door trans_id="2501" caption="TREPPE001" state="close" />
+    </doors>
+  </traffic_constraints>
 
-	<routing>
-		<goals>
-			<goal id="0" final="false" caption="goal 1">
-				<polygon>
-					<vertex px="-115.0" py="-95.0" />
-					<vertex px="-100.0" py="-95.0" />
-					<vertex px="-100.0" py="-80.0" />
-					<vertex px="-115.0" py="-80.0" />
-					<vertex px="-115.0" py="-95.0" />
-				</polygon>
-			</goal>
-			<goal id="1" final="false" caption="goal 2">
-				<polygon>
-					<vertex px="-115.0" py="95.0" />
-					<vertex px="-100.0" py="95.0" />
-					<vertex px="-100.0" py="80.0" />
-					<vertex px="-115.0" py="80.0" />
-					<vertex px="-115.0" py="95.0" />
-				</polygon>
-			</goal>
-		</goals>	
-	</routing>
+  <routing>
+    <goals>
+      <goal id="0" final="false" caption="goal 1">
+        <polygon>
+          <vertex px="-115.0" py="-95.0" />
+          <vertex px="-100.0" py="-95.0" />
+          <vertex px="-100.0" py="-80.0" />
+          <vertex px="-115.0" py="-80.0" />
+          <vertex px="-115.0" py="-95.0" />
+        </polygon>
+      </goal>
+      <goal id="1" final="false" caption="goal 2">
+        <polygon>
+          <vertex px="-115.0" py="95.0" />
+          <vertex px="-100.0" py="95.0" />
+          <vertex px="-100.0" py="80.0" />
+          <vertex px="-115.0" py="80.0" />
+          <vertex px="-115.0" py="95.0" />
+        </polygon>
+      </goal>
+    </goals>
+  </routing>
 
-	<!--persons information and distribution -->
-	<agents operational_model_id="1" >
-		<agents_distribution>
-			<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="60" router_id="1"/>
-		</agents_distribution>
-	</agents>
+  <!--persons information and distribution -->
+  <agents operational_model_id="1">
+    <agents_distribution>
+      <group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="60" router_id="1" />
+    </agents_distribution>
+  </agents>
 
-	<!-- These parameters may be overwritten -->
-	<operational_models>
-		<model operational_model_id="1" description="gcfm">
-		<model_parameters>
-			<solver>euler</solver>
-			<stepsize>0.01</stepsize>
-			<exitCrossingStrategy>3</exitCrossingStrategy>
-			<linkedcells enabled="true" cell_size="2.2" />
-			<force_ped nu="0.3" dist_max="3" disteff_max="2"
-				interpolation_width="0.1" />
-			<force_wall nu="0.2" dist_max="3" disteff_max="2"
-				interpolation_width="0.1" />
-		</model_parameters>
-		<agent_parameters agent_parameter_id="1">
-	        <v0 mu="0.5" sigma="0.0" />
-	        <bmax mu="0.25" sigma="0.001" />
-	        <bmin mu="0.20" sigma="0.001" />
-	        <amin mu="0.18" sigma="0.001" />
-	        <tau mu="0.5" sigma="0.001" />
-	        <atau mu="0.5" sigma="0.001" />
-        </agent_parameters>
-	</model>
-	<model operational_model_id="2" description="gompertz">
-		<model_parameters>
-			<solver>euler</solver>
-			<stepsize>0.01</stepsize>
-			<exitCrossingStrategy>5</exitCrossingStrategy>
-			<linkedcells enabled="true" cell_size="2.2" />
-			<force_ped nu="0.3" />
-			<force_wall nu="0.2" />
-		</model_parameters>
-		<agent_parameters agent_parameter_id="1">
-	        <v0 mu="0.5" sigma="0.0" />
-	        <bmax mu="0.25" sigma="0.001" />
-	        <bmin mu="0.20" sigma="0.001" />
-	        <amin mu="0.18" sigma="0.001" />
-	        <tau mu="0.5" sigma="0.001" />
-	        <atau mu="0.5" sigma="0.001" />
-        </agent_parameters>
-	</model>
-	</operational_models>
+  <!-- These parameters may be overwritten -->
+  <operational_models>
+    <model operational_model_id="1" description="gcfm">
+      <model_parameters>
+        <solver>euler</solver>
+        <stepsize>0.01</stepsize>
+        <exitCrossingStrategy>3</exitCrossingStrategy>
+        <linkedcells enabled="true" cell_size="2.2" />
+        <force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+        <force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+      </model_parameters>
+      <agent_parameters agent_parameter_id="1">
+        <v0 mu="0.5" sigma="0.0" />
+        <bmax mu="0.25" sigma="0.001" />
+        <bmin mu="0.20" sigma="0.001" />
+        <amin mu="0.18" sigma="0.001" />
+        <tau mu="0.5" sigma="0.001" />
+        <atau mu="0.5" sigma="0.001" />
+      </agent_parameters>
+    </model>
+    <model operational_model_id="2" description="gompertz">
+      <model_parameters>
+        <solver>euler</solver>
+        <stepsize>0.01</stepsize>
+        <exitCrossingStrategy>5</exitCrossingStrategy>
+        <linkedcells enabled="true" cell_size="2.2" />
+        <force_ped nu="0.3" />
+        <force_wall nu="0.2" />
+      </model_parameters>
+      <agent_parameters agent_parameter_id="1">
+        <v0 mu="0.5" sigma="0.0" />
+        <bmax mu="0.25" sigma="0.001" />
+        <bmin mu="0.20" sigma="0.001" />
+        <amin mu="0.18" sigma="0.001" />
+        <tau mu="0.5" sigma="0.001" />
+        <atau mu="0.5" sigma="0.001" />
+      </agent_parameters>
+    </model>
+  </operational_models>
 
-	<route_choice_models>
-		<router router_id="1" description="global_shortest">
-			<parameters>
-				<!-- extra routing information -->
-				<navigation_lines file="arena_routing.xml" />
-			</parameters>
-		</router>
-	</route_choice_models>
+  <route_choice_models>
+    <router router_id="1" description="global_shortest">
+      <parameters>
+        <!-- extra routing information -->
+        <navigation_lines file="arena_routing.xml" />
+      </parameters>
+    </router>
+  </route_choice_models>
 
 </JuPedSim>
diff --git a/events/EventManager.cpp b/events/EventManager.cpp
index fa8b32bb1bcfa4789a767751a2060f3e7ee642a9..55c373fbd2b81d1f2efff9b4a7a1e671da604445 100644
--- a/events/EventManager.cpp
+++ b/events/EventManager.cpp
@@ -46,7 +46,7 @@ EventManager::EventManager(Building *_b)
      _dynamic=false;
      _file = fopen("../events/events.txt","r");
      if(!_file) {
-          Log->Write("INFO:\tDatei events.txt nicht gefunden. Dynamisches Eventhandling nicht moeglich.");
+          //Log->Write("INFO:\tDatei events.txt nicht gefunden. Dynamisches Eventhandling nicht moeglich.");
      } else {
           Log->Write("INFO:\tDatei events.txt gefunden. Dynamisches Eventhandling moeglich.");
           _dynamic=true;
@@ -68,7 +68,6 @@ void EventManager::SetProjectRootDir(const std::string &filename)
 
 void EventManager::readEventsXml()
 {
-     Log->Write("INFO: \tReading events\n ");
      //get the geometry filename from the project file
      TiXmlDocument doc(_projectFilename);
      if (!doc.LoadFile()) {
@@ -87,11 +86,12 @@ void EventManager::readEventsXml()
 
      TiXmlDocument docEvent(eventfile);
      if(!docEvent.LoadFile()) {
-          Log->Write("INFO: \t%s",docEvent.ErrorDesc());
-          Log->Write("INFO: \t could not parse the event file. So no Events are found.");
+          //Log->Write("INFO: \t%s",docEvent.ErrorDesc());
+          //Log->Write("INFO: \t could not parse the event file. So no Events are found.");
           //exit(EXIT_FAILURE);
           return;
      }
+     Log->Write("INFO: \tReading events\n ");
 
      TiXmlElement* xRootNode = docEvent.RootElement();
      if(!xRootNode) {
diff --git a/geometry/Point.cpp b/geometry/Point.cpp
index 1299f7dd623c15f28bdcb82067093a80c1f8739a..00f425cfa910888d609ac65fb07cf98ed36295aa 100644
--- a/geometry/Point.cpp
+++ b/geometry/Point.cpp
@@ -63,7 +63,7 @@ std::string Point::toString() const
      std::stringstream tmp;
      tmp<<"( "<<_x<<" : " <<_y<<" )";
      return tmp.str();
-};
+}
 
 void Point::SetX(double x)
 {
diff --git a/inputfiles/arena_section/131021_arena_section_ini.xml b/inputfiles/arena_section/131021_arena_section_ini.xml
index 6306b979d90ac4a5786ea243d7cd0c06da2f0a80..a29ebacc3229190fb91f86c468c439710a171717 100644
--- a/inputfiles/arena_section/131021_arena_section_ini.xml
+++ b/inputfiles/arena_section/131021_arena_section_ini.xml
@@ -1,100 +1,100 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 
-<JuPedSim project="arena-section-Project" version="0.5" 
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
+<JuPedSim project="arena-section-Project" version="0.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://134.94.2.137/jps_ini_core.xsd">
 
-	<!-- seed used for initialising random generator -->
-	<seed>12542</seed>
-	<!-- geometry file -->
-	<max_sim_time>60</max_sim_time>
-	<!-- geometry file -->
-	<geometry>131021_arena_section.xml</geometry>
-	<!-- trajectories file and format -->
-	<trajectories format="xml-plain" fps="8">
-		<file location="trajectories-arena-section.xml" />
-		<!--<socket hostname="127.0.0.1" port="8989"/> -->
-	</trajectories>
-	<!-- where to store the logs -->
-	<!--<logfile>outputfiles/log.txt</logfile> -->
+  <!-- seed used for initialising random generator -->
+  <seed>12542</seed>
+  <!-- geometry file -->
+  <max_sim_time>600</max_sim_time>
+  <!-- geometry file -->
+  <geometry>131021_arena_section.xml</geometry>
+  <!-- trajectories file and format -->
+  <trajectories format="xml-plain" fps="8">
+    <file location="trajectories-arena-section.xml" />
+    <!--<socket hostname="127.0.0.1" port="8989"/> -->
+  </trajectories>
+  <!-- where to store the logs -->
+  <!--<logfile>outputfiles/log.txt</logfile> -->
 
 
-	<!-- traffic information: e.g closed doors or smoked rooms -->
-	<traffic_constraints>
-		<!-- room states are: good or smoked -->
-		<!-- doors states are: close or open -->
-		<doors>
-		</doors>
-	</traffic_constraints>
+  <!-- traffic information: e.g closed doors or smoked rooms -->
+  <traffic_constraints>
+    <!-- doors states are: close or open -->
+    <doors>
+      <door trans_id="2503" caption="AR09URO08" state="close" />
+      <door trans_id="2512" caption="AR09URO07" state="close" />
+      <door trans_id="2501" caption="TREPPE001" state="close" />
+    </doors>
+  </traffic_constraints>
 
-	<routing>
-		<goals>
-			<goal id="0" final="false" caption="goal 1">
-				<polygon>
-					<vertex px="-115.0" py="-95.0" />
-					<vertex px="-100.0" py="-95.0" />
-					<vertex px="-100.0" py="-80.0" />
-					<vertex px="-115.0" py="-80.0" />
-					<vertex px="-115.0" py="-95.0" />
-				</polygon>
-			</goal>
-			<goal id="1" final="false" caption="goal 2">
-				<polygon>
-					<vertex px="-115.0" py="95.0" />
-					<vertex px="-100.0" py="95.0" />
-					<vertex px="-100.0" py="80.0" />
-					<vertex px="-115.0" py="80.0" />
-					<vertex px="-115.0" py="95.0" />
-				</polygon>
-			</goal>
-			<goal id="2" final="true" caption="goal 3">
-				<polygon>
-					<vertex px="115.0" py="95.0" />
-					<vertex px="100.0" py="95.0" />
-					<vertex px="100.0" py="80.0" />
-					<vertex px="115.0" py="80.0" />
-					<vertex px="115.0" py="95.0" />
-				</polygon>
-			</goal>
-		</goals>	
-	</routing>
+  <routing>
+    <goals>
+      <goal id="0" final="false" caption="goal 1">
+        <polygon>
+          <vertex px="-115.0" py="-95.0" />
+          <vertex px="-100.0" py="-95.0" />
+          <vertex px="-100.0" py="-80.0" />
+          <vertex px="-115.0" py="-80.0" />
+          <vertex px="-115.0" py="-95.0" />
+        </polygon>
+      </goal>
+      <goal id="1" final="false" caption="goal 2">
+        <polygon>
+          <vertex px="-115.0" py="95.0" />
+          <vertex px="-100.0" py="95.0" />
+          <vertex px="-100.0" py="80.0" />
+          <vertex px="-115.0" py="80.0" />
+          <vertex px="-115.0" py="95.0" />
+        </polygon>
+      </goal>
+      <goal id="2" final="true" caption="goal 3">
+        <polygon>
+          <vertex px="115.0" py="95.0" />
+          <vertex px="100.0" py="95.0" />
+          <vertex px="100.0" py="80.0" />
+          <vertex px="115.0" py="80.0" />
+          <vertex px="115.0" py="95.0" />
+        </polygon>
+      </goal>
+    </goals>
+  </routing>
 
-	<!--persons information and distribution -->
-	<agents operational_model_id="1">
-		<agents_distribution>
-			<group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="60" router_id="1"/>
-		</agents_distribution>
-	</agents>
+  <!--persons information and distribution -->
+  <agents operational_model_id="1">
+    <agents_distribution>
+      <group group_id="0" agent_parameter_id="1" room_id="0" subroom_id="0" number="60" router_id="1" />
+    </agents_distribution>
+  </agents>
 
-	<!-- These parameters may be overwritten -->
-	<operational_models>
-		<model operational_model_id="1" description="gcfm">
-			<model_parameters>
-				<solver>euler</solver>
-				<stepsize>0.01</stepsize>
-				<exitCrossingStrategy>3</exitCrossingStrategy>
-				<linkedcells enabled="true" cell_size="2.2" />
-				<force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
-				<force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
-			</model_parameters>
-			<agent_parameters agent_parameter_id="1">
-		        <v0 mu="0.5" sigma="0.0" />
-		        <bmax mu="0.25" sigma="0.001" />
-		        <bmin mu="0.20" sigma="0.001" />
-		        <amin mu="0.18" sigma="0.001" />
-		        <tau mu="0.5" sigma="0.001" />
-		        <atau mu="0.5" sigma="0.001" />
-     		</agent_parameters>
-		</model>
-	</operational_models>
+  <!-- These parameters may be overwritten -->
+  <operational_models>
+    <model operational_model_id="1" description="gcfm">
+      <model_parameters>
+        <solver>euler</solver>
+        <stepsize>0.001</stepsize>
+        <exitCrossingStrategy>4</exitCrossingStrategy>
+        <linkedcells enabled="true" cell_size="2.2" />
+        <force_ped nu="0.3" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+        <force_wall nu="0.2" dist_max="3" disteff_max="2" interpolation_width="0.1" />
+      </model_parameters>
+      <agent_parameters agent_parameter_id="1">
+        <v0 mu="0.5" sigma="0.0" />
+        <bmax mu="0.25" sigma="0.001" />
+        <bmin mu="0.20" sigma="0.001" />
+        <amin mu="0.18" sigma="0.001" />
+        <tau mu="0.5" sigma="0.001" />
+        <atau mu="0.5" sigma="0.001" />
+      </agent_parameters>
+    </model>
+  </operational_models>
 
-	<route_choice_models>
-		<router router_id="1" description="global_shortest">
-			<parameters>
-				<!-- extra routing information -->
-				<navigation_lines file="131021_arena_routing.xml" />
-			</parameters>
-		</router>
-	</route_choice_models>
+  <route_choice_models>
+    <router router_id="1" description="global_shortest">
+      <parameters>
+        <!-- extra routing information -->
+        <navigation_lines file="131021_arena_routing.xml" />
+      </parameters>
+    </router>
+  </route_choice_models>
 
 </JuPedSim>
diff --git a/routing/DirectionStrategy.cpp b/routing/DirectionStrategy.cpp
index 3ac4d3ba10ed2ecea67948162405113a0e9bcb8c..0a4712462ba3b228588f35d60540c25147375d0e 100644
--- a/routing/DirectionStrategy.cpp
+++ b/routing/DirectionStrategy.cpp
@@ -39,9 +39,6 @@ DirectionStrategy::DirectionStrategy()
 {
 }
 
-DirectionStrategy::DirectionStrategy(const DirectionStrategy& orig)
-{
-}
 
 DirectionStrategy::~DirectionStrategy()
 {
@@ -66,7 +63,7 @@ Point DirectionMinSeperationShorterLine::GetTarget(Room* room, Pedestrian* ped)
      if(p1 == p2) return p1;
 
      double length = (p1 - p2).Norm(); 
-     if(d >= 0.5*length) return (p1 - p2)*0.5; // return the middle point, since line is anyway toot short 
+     if(d >= 0.5*length) return (p1 + p2)*0.5; // return the middle point, since line is anyway too short
      double u = d/length; // d is supposed to be smaller than length, then u is in [0, 1]
      //Point diff = (p1 - p2).Normalized() * d;
      Line e_neu = Line(p1 + (p2-p1)*u, p1 + (p2-p1)*(1-u));
diff --git a/routing/DirectionStrategy.h b/routing/DirectionStrategy.h
index f96eafb004073d289f5ba0111a94b2603465a119..4f9b6e7d538f6cac4339aa32ae3c907cf8b1eecd 100644
--- a/routing/DirectionStrategy.h
+++ b/routing/DirectionStrategy.h
@@ -38,7 +38,6 @@ class DirectionStrategy {
 
 public:
      DirectionStrategy();
-     DirectionStrategy(const DirectionStrategy& orig);
      virtual ~DirectionStrategy();
      virtual Point GetTarget(Room* room, Pedestrian* ped) const = 0;
 };
diff --git a/routing/GraphRouter.cpp b/routing/GraphRouter.cpp
index 19ed0f17bf8fd91423ce45ff9560175b33883f73..b0c54fa1045259bb6de3db8f635cb7285038d6ac 100644
--- a/routing/GraphRouter.cpp
+++ b/routing/GraphRouter.cpp
@@ -49,8 +49,6 @@ GraphRouter::~GraphRouter()
 
 int GraphRouter::FindExit(Pedestrian* p)
 {
-     //std::cout << p->Getdt() << "\n";
-
      set<int> closed_doors = p->GetKnownClosedDoors();
 
      if(p->GetLastDestination() == -1) {
@@ -147,7 +145,6 @@ void GraphRouter::Init(Building* b)
 {
      GlobalRouter::Init(b);
 
-
      Log->Write("ERROR: GRAPHROUTER  is not ready to use yet.");
      _building = b;
      g.init(b);
diff --git a/routing/NavMesh.cpp b/routing/NavMesh.cpp
index e9d01598190623db08fa1b67bb69d8b68ca9cb02..c610f61ec448823c55e0688048c050b0d59b1edb 100644
--- a/routing/NavMesh.cpp
+++ b/routing/NavMesh.cpp
@@ -654,7 +654,7 @@ void NavMesh::WriteToString(std::string& output)
      //writing the nodes
      //      int mynodes[] = {47, 30 ,38};
      //      int mynodes[] = {41, 1521};
-     int mynodes[] = {};
+     int mynodes[] = {0};
      //int mynodes[] = { 28, 27, 40};
      vector<int> nodes_to_plot (mynodes, mynodes + sizeof(mynodes) / sizeof(int) );
 
diff --git a/routing/QuickestPathRouter.cpp b/routing/QuickestPathRouter.cpp
index 5d4db27a006f50901e1a2187866aec6dca559fa2..913de3c55854595eeaedc8f35f07722ce2ea4ae7 100644
--- a/routing/QuickestPathRouter.cpp
+++ b/routing/QuickestPathRouter.cpp
@@ -33,7 +33,6 @@
 #include "../IO/OutputHandler.h"
 
 
-
 using namespace std;
 
 QuickestPathRouter::QuickestPathRouter( ):GlobalRouter() { }
@@ -91,7 +90,6 @@ int QuickestPathRouter::FindExit(Pedestrian* ped)
                ped->ResetTimeInJam();
                ped->SetSpotlight(true);
           }
-          //cout<<"I am feeling like in Jam next: "<<ped->GetID()<<endl;
           //ped->RerouteIn(2.50); // seconds
      } else if(ped->IsReadyForRerouting()) {
           Redirect(ped);
@@ -206,7 +204,6 @@ int QuickestPathRouter::GetQuickestRoute(Pedestrian*ped, AccessPoint* nearestAP)
      // get all AP connected to the nearest
      //const vector<AccessPoint*>& aps = nearestAP->GetConnectingAPs();
 
-     //TODO: should be get relevant destination
      //const vector<AccessPoint*>& aps = nearestAP->GetTransitAPsTo(ped->GetFinalDestination());
 
      vector <AccessPoint*> aps;
@@ -297,164 +294,21 @@ double QuickestPathRouter::gain(double time)
 }
 
 
-
-
-void QuickestPathRouter::ReduceGraph()
-{
-
-     for(unsigned int i=0; i<_accessPoints.size(); i++) {
-          vector<AccessPoint*>toBeDeleted;
-          AccessPoint* from_AP=_accessPoints[i];
-          int from_door=from_AP->GetID();
-
-          // get all AP connected to the nearest
-          const vector<AccessPoint*>& aps = from_AP->GetConnectingAPs();
-
-          //loop over all accesspoint connections and
-          //collect the connections to remove
-
-          for(unsigned int j=0; j<aps.size(); j++) {
-               AccessPoint* to_AP=aps[j];
-
-               /* TODO: check all final destinations
-               for( map<int, int>::iterator it = pMapIdToFinalDestination.begin();
-                               it != pMapIdToFinalDestination.end(); it++) {
-                       int fid=it->first;
-                */
-
-
-               //remove all AP which point to me
-               if(to_AP->GetNearestTransitAPTO(FINAL_DEST_OUT)==from_door) {
-                    toBeDeleted.push_back(to_AP);
-               }
-
-               //don't remove if that is the best destination
-               //TODO: if there are more suitable final destinations?
-               if(GetCommonDestinationCount(from_AP, to_AP)>0) {
-                    if(from_AP->GetNearestTransitAPTO(FINAL_DEST_OUT)!=to_AP->GetID())
-                         toBeDeleted.push_back(to_AP);
-               }
-
-               // remove all APs wich have at least one common destination with me
-               //                      if (to_AP->GetNextApTo(FINAL_DEST_OUT)==from_AP->GetNextApTo(FINAL_DEST_OUT)) {
-               //                              toBeDeleted.push_back(to_AP);
-               //
-               //                      }
-          }
-
-          // now remove the aps/connections
-          std::sort(toBeDeleted.begin(), toBeDeleted.end());
-          toBeDeleted.erase(std::unique(toBeDeleted.begin(), toBeDeleted.end()), toBeDeleted.end());
-          for(unsigned int k=0; k<toBeDeleted.size(); k++) {
-               from_AP->RemoveConnectingAP(toBeDeleted[k]);
-          }
-     }
-
-     //clear double links
-     CheckAndClearDoubleLinkedNodes();
-}
-
-void QuickestPathRouter::CheckAndClearDoubleLinkedNodes()
-{
-
-     for(unsigned int i=0; i<_accessPoints.size(); i++) {
-          vector<AccessPoint*>toBeDeleted;
-          AccessPoint* from_AP=_accessPoints[i];
-          const vector<AccessPoint*>& from_aps = from_AP->GetConnectingAPs();
-
-          for(unsigned int j=0; j<_accessPoints.size(); j++) {
-               AccessPoint* to_AP=_accessPoints[j];
-               const vector<AccessPoint*>& to_aps = to_AP->GetConnectingAPs();
-
-               // if one contains the other
-               if(IsElementInVector(from_aps,to_AP)&&IsElementInVector(to_aps,from_AP)) {
-                    //check the distances
-                    double dist1=from_AP->GetDistanceTo(to_AP) +to_AP->GetDistanceTo(FINAL_DEST_OUT);
-                    double dist2=to_AP->GetDistanceTo(from_AP) +from_AP->GetDistanceTo(FINAL_DEST_OUT);
-                    if(dist1<dist2) {
-                         to_AP->RemoveConnectingAP(from_AP);
-                    } else {
-                         from_AP->RemoveConnectingAP(to_AP);
-                    }
-               }
-          }
-     }
-}
-
-void QuickestPathRouter::ExpandGraph()
-{
-
-     for(unsigned int i=0; i<_accessPoints.size(); i++) {
-          vector<AccessPoint*>toBeDeleted;
-          AccessPoint* tmp=_accessPoints[i];
-
-          // get all AP connected to the nearest
-          const vector<AccessPoint*>& aps = tmp->GetConnectingAPs();
-
-          //loop over all accesspoint connections and
-          //collect the connections to remove
-
-          for(unsigned int j=0; j<aps.size(); j++) {
-               AccessPoint* tmp1=aps[j];
-
-               if(tmp->GetNearestTransitAPTO(FINAL_DEST_OUT)==tmp1->GetNearestTransitAPTO(FINAL_DEST_OUT))
-                    toBeDeleted.push_back(tmp1);
-               if(tmp->GetID()==tmp1->GetNearestTransitAPTO(FINAL_DEST_OUT))
-                    toBeDeleted.push_back(tmp1);
-               if(tmp1->GetDistanceTo(FINAL_DEST_OUT)>tmp->GetDistanceTo(FINAL_DEST_OUT))
-                    toBeDeleted.push_back(tmp1);
-
-               int bestID=tmp1->GetNearestTransitAPTO(FINAL_DEST_OUT);
-               double dist1=_accessPoints[bestID]->GetDistanceTo(tmp)+tmp->GetDistanceTo(tmp1);
-               double dist2=tmp->GetDistanceTo(tmp1);
-               if(dist1<dist2)
-                    toBeDeleted.push_back(tmp1);
-
-               //                      for(unsigned int l=0;l<aps.size();l++)
-               //                      {
-               //                              AccessPoint* tmp2=aps[l];
-               //                              if(tmp2->GetID()==tmp1->GetID())continue;
-               //
-               //                              const vector<AccessPoint*>& aps1 = tmp1->GetConnectingAPs();
-               //                              for(unsigned int k=0;k<aps1.size();k++)
-               //                              {
-               //                                      AccessPoint* tmp3=aps1[k];
-               //                                      if(tmp3->GetID()==tmp2->GetID()){
-               //                                              toBeDeleted.push_back(tmp1);
-               //                                      }
-               //                              }
-               //                      }
-          }
-
-          // now remove the aps/connections
-          for(unsigned int k=0; k<toBeDeleted.size(); k++) {
-               tmp->RemoveConnectingAP(toBeDeleted[k]);
-          }
-
-     }
-}
-
 void QuickestPathRouter::Init(Building* building)
 {
-
      Log->Write("INFO:\tInit Quickest Path Router Engine");
      GlobalRouter::Init(building);
 
      // activate the spotlight for tracking some pedestrians
      //Pedestrian::ActivateSpotlightSystem(true);
 
-     //      pBuilding=building;
-     //TODO: reduce graph is missbehaving
-     //ReduceGraph();
-     //ExpandGraph();
      //vector<string> rooms;
      //rooms.push_back("150");
      //rooms.push_back("outside");
      //WriteGraphGV("routing_graph.gv",FINAL_DEST_ROOM_040,rooms);
      //WriteGraphGV("routing_graph.gv",FINAL_DEST_OUT,rooms);
      //DumpAccessPoints(1185);
-
-     //      exit(0);
+     //exit(0);
      Log->Write("INFO:\tDone with Quickest Path Router Engine!");
 }
 
@@ -465,7 +319,6 @@ void QuickestPathRouter::SelectReferencePedestrian(Pedestrian* myself, Pedestria
 
      Hline* crossing=_building->GetTransOrCrossByUID(exitID);
 
-
      double radius=3.0;//start radius for looking at the reference in metres
      bool done=false;
 
@@ -516,45 +369,23 @@ void QuickestPathRouter::SelectReferencePedestrian(Pedestrian* myself, Pedestria
                     *myref=NULL;
                     *flag=UNREACHEABLE_EXIT;
                     done=true;
-
                     Log->Write("ERROR: reference ped cannot be found for ped %d within [%f] m  around the exit [%d]\n",myself->GetID(),radius,crossing->GetID());
                     exit(EXIT_FAILURE);
                }
           }
 
-          /////delete me after
-          //              if(done==true){
-          //                      //debug area
-          //                      if(*myref){
-          //
-          //                              if(myself->GetID()==488){
-          //                                      myself->SetSpotlight(true);
-          //                                      (*myref)->SetSpotlight(true);
-          //                                      (*myref)->Dump((*myref)->GetID());
-          //
-          //                                      //highlight the queue
-          //                                      for(unsigned int p=0;p<queue.size();p++){
-          //                                              Pedestrian* ped = queue[p];
-          //                                              ped->SetSpotlight(true);
-          //                                      }
-          //
-          //                              }
-          //                      }
-          //              }
-          //// delete me after
      } while (done==false);
 
 
      //debug area
      if(*myref) {
-
-          //              if(myself->GetID()==488){
-          //                      myself->SetSpotlight(true);
-          //                      (*myref)->SetSpotlight(true);
-          //                      (*myref)->Dump((*myref)->GetID());
+          // if(myself->GetID()==488){
+          //  myself->SetSpotlight(true);
+          //     (*myref)->SetSpotlight(true);
+          //     (*myref)->Dump((*myref)->GetID());
           //
           //
-          //              }
+          // }
 
      } else {
           //cout<<"no ref ped found: " <<endl;
@@ -751,6 +582,7 @@ int QuickestPathRouter::isCongested(Pedestrian* ped)
      const vector<Pedestrian*>& allPeds=sub->GetAllPedestrians();
 
      //in the case there are only few people in the room
+     //revise this condition
      if(allPeds.size()<=OBSTRUCTION) return false;
 
      double myDist=ped->GetDistanceToNextTarget();
@@ -778,59 +610,6 @@ int QuickestPathRouter::isCongested(Pedestrian* ped)
      if(ratio>0.8) return true;
 
      return false;
-
-     /*
-     //collect the pedestrians within 1 metre radius
-     vector<Pedestrian*> neighbourhood;
-     double range=1.0;//1m
-
-     _building->GetGrid()->GetNeighbourhood(ped,neighbourhood);
-
-     std::vector<int> conflictings;
-     std::vector<int>::iterator per;
-
-     //int congested=1;
-     int pedCrossing=0;
-
-     //Debug::Messages("congested ( %hd ): [ ",myID);
-
-     Point start=ped->GetPos();
-     //looping on a circle
-     for(double phi=0.0; phi<2*M_PI; phi+=0.1){
-
-             Point end= start+Point(range*cos(phi), range*sin(phi));//translation
-
-             Line line= Line(start, end);
-
-             for(unsigned int p=0;p<neighbourhood.size();p++){
-                     Pedestrian* ref = neighbourhood[p];
-
-                     //skipping those in other rooms
-                     if(ped->GetUniqueRoomID()!=ref->GetUniqueRoomID()) continue;
-
-                     if((ped->GetPos()-ref->GetPos()).NormSquare()>1.0) continue;
-                     // do not add a pedestrian twice
-                     vector<int>::iterator per = find(conflictings.begin(), conflictings.end(), ref->GetID());
-                     if (per != conflictings.end()) continue;
-
-                     if(line.IntersectionWithCircle(ref->GetPos())==false) continue;
-
-                     const Point& pos1=ref->GetPos();
-                     Point pos2= start-pos1;
-                     Point vel1=ped->GetV();
-
-                     // only those  behind me
-                     if(pos2.ScalarP(vel1)) pedCrossing++;
-
-                     conflictings.push_back(ref->GetID());
-
-             }
-
-     }
-
-     if(pedCrossing<OBSTRUCTION) return false;
-     return true;
-      */
 }
 
 
@@ -966,7 +745,6 @@ void QuickestPathRouter::Redirect(Pedestrian* ped)
      //compare it with my preferred/current (shortest nearest)
      if(quickest!=preferredExit) {
           double cba = CBA(gain(preferredExitTime),gain(minTime));
-          //cout<<"cba:" <<cba<<endl;
           if (cba>CBA_THRESHOLD) {
                ped->SetExitIndex(quickest);
                ped->SetExitLine(_accessPoints[quickest]->GetNavLine());
diff --git a/routing/QuickestPathRouter.h b/routing/QuickestPathRouter.h
index fddc16312c7625c2effaa06e7928e30fce254f86..417b7310afd4719c701c4c65cde36d01afdfc5a5 100644
--- a/routing/QuickestPathRouter.h
+++ b/routing/QuickestPathRouter.h
@@ -53,6 +53,7 @@ public:
      virtual ~QuickestPathRouter();
 
      virtual int FindExit(Pedestrian* ped);
+
      virtual void Init(Building* building);
 
 private:
@@ -148,6 +149,10 @@ private:
      int redirect(int pedindex,int actualexit=-1);
 
 
+     /**
+      * return the JAM size at a specific exit
+      * NOT IMPLEMENTED
+      */
      double GetJamSizeAtExit(int exitID);
 
      /**
@@ -163,18 +168,18 @@ private:
      /**
       * extend the graph by connecting alternative routes.
       */
-     void ExpandGraph();
+    // void ExpandGraph();
 
      /**
       * reduce the graph, making it to a directed graph to the outside
       */
-     void ReduceGraph();
+     //void ReduceGraph();
 
 
      /**
       * check the nodes that are double self linked and remove the connection with the highest radian
       */
-     void CheckAndClearDoubleLinkedNodes();
+     //void CheckAndClearDoubleLinkedNodes();
 
      /**
       * return the number of common nodes the two aps are connected  with or pointing to.
diff --git a/routing/graph/RoutingGraph.cpp b/routing/graph/RoutingGraph.cpp
index b2e55e4d14d76b7ab2038e122496c75505572400..6dbdd65a86f97297406255d328df1c2619faadaa 100644
--- a/routing/graph/RoutingGraph.cpp
+++ b/routing/graph/RoutingGraph.cpp
@@ -50,19 +50,17 @@ RoutingGraph::RoutingGraph(Building * b) : building(b)
 {
      vertexes = map<int, Vertex>();
      BuildGraph();
-
-};
+}
 
 RoutingGraph::RoutingGraph()
 {
      vertexes = map<int, Vertex>();
      building=NULL;
-
 }
 RoutingGraph::~RoutingGraph()
 {
 
-};
+}
 
 RoutingGraph::RoutingGraph(RoutingGraph * orig)
 {