Index: orxonox/trunk/src/garbage_collector.cc
===================================================================
--- orxonox/trunk/src/garbage_collector.cc	(revision 3668)
+++ orxonox/trunk/src/garbage_collector.cc	(revision 3669)
@@ -116,5 +116,8 @@
     return;
   /* garbage collect */
-  PRINTF(3)("GarbageCollection is been done\n");
+  PRINTF(3)("=============================\n");
+  PRINTF(3)("Processing Garbage Collection\n");
+  PRINTF(3)("=============================\n");
+  int counter = 0;
   WorldInterface* wi = WorldInterface::getInstance();
   tList<WorldEntity>* list = wi->getEntityList();
@@ -126,15 +129,21 @@
       if( entity->isFinalized())
 	{
-	  PRINTF(1)("Finalizing object in list - not yet done realy\n");
+	  PRINTF(4)("= finalizing object\n");
+	  ++counter;
 	  
 	  /* first remove out of entity list */
 	  list->remove(entity);
 	  /* second remove out of pnode tree */
-	  //entity->remove();
-	  //delete entity;
+	  entity->remove();
+	  delete entity;
 	}
       entity = iterator->nextElement();
     }
+  PRINTF(3)("= collected %i unused objects\n", counter);
+  PRINTF(3)("=============================\n");
   
+  
+
+
   /* reset time to count again up to this->delay */
   this->time = 0;
Index: orxonox/trunk/src/lib/coord/null_parent.cc
===================================================================
--- orxonox/trunk/src/lib/coord/null_parent.cc	(revision 3668)
+++ orxonox/trunk/src/lib/coord/null_parent.cc	(revision 3669)
@@ -83,6 +83,8 @@
   *this->absCoordinate = *this->relCoordinate;
   *this->absDirection = parent->getAbsDir () * *this->relDirection;
-  
-  PNode* pn = this->children->enumerate ();
+
+  tIterator<PNode>* iterator = this->children->getIterator();
+  //PNode* pn = this->children->enumerate ();
+  PNode* pn = iterator->nextElement();
   while( pn != NULL) 
     { 
@@ -93,5 +95,6 @@
 	pn->parentDirChanged ();
       pn->update (dt);
-      pn = this->children->nextElement ();
+      //pn = this->children->nextElement ();
+      pn = iterator->nextElement();
     }
 
Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 3668)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 3669)
@@ -354,5 +354,5 @@
 {
   pNode->remove();
-  //this->children->remove (pNode);
+  this->children->remove (pNode);
   pNode->parent = NULL;
 }
@@ -378,5 +378,5 @@
     }
   delete iterator;
-  //this->parent->removeChild(this);
+  this->parent->children->remove(this);
 }
 
@@ -499,5 +499,7 @@
   
   
-  PNode* pn = this->children->enumerate();
+  tIterator<PNode>* iterator = this->children->getIterator();
+  //PNode* pn = this->children->enumerate();
+  PNode* pn = iterator->nextElement();
   while( pn != NULL) 
     { 
@@ -509,6 +511,8 @@
 
       pn->update(dt);
-      pn = this->children->nextElement();
-    }
+      //pn = this->children->nextElement();
+      pn = iterator->nextElement();
+    }
+  delete iterator;
 
   this->timeStamp = timeStamp;
Index: orxonox/trunk/src/lib/util/list.h
===================================================================
--- orxonox/trunk/src/lib/util/list.h	(revision 3668)
+++ orxonox/trunk/src/lib/util/list.h	(revision 3669)
@@ -65,6 +65,5 @@
  private:
   listElement<T>* currentEl;
-  listElement<T>* firstEl;
-  int counter;
+  listElement<T>* tmpEl;
 };
 
@@ -74,9 +73,5 @@
 {
   this->currentEl = startElement;
-  this->firstEl = startElement;
-  if( this->firstEl != NULL)
-    this->counter = -1;  
-  else 
-    this->counter = 0; 
+  this->tmpEl = NULL;
 }
 
@@ -92,16 +87,10 @@
 inline T* tIterator<T>::nextElement ()
 {
-  /*
-  this->counter++;
-  if( this->counter == 0)
-    return this->firstEl->curr;
-  */
-
   if( this->currentEl == NULL)
     return NULL;
 
-  listElement<T>* tmp = this->currentEl;
+  this->tmpEl = this->currentEl;
   this->currentEl = this->currentEl->next;
-  return tmp->curr;
+  return this->tmpEl->curr;
 }
 
