Index: /trunk/src/lib/collision_detection/cd_engine.cc
===================================================================
--- /trunk/src/lib/collision_detection/cd_engine.cc	(revision 5114)
+++ /trunk/src/lib/collision_detection/cd_engine.cc	(revision 5115)
@@ -71,5 +71,6 @@
 }
 
-
+#include "class_list.h"
+#include "state.h"
 /**
  *  this checks the collisions with the objects
@@ -80,6 +81,7 @@
   tIterator<WorldEntity>* iterator1 = entityList->getIterator();
   tIterator<WorldEntity>* iterator2 = entityList->getIterator();
-  WorldEntity* entity1 = iterator1->nextElement();
-  WorldEntity* entity2 = iterator2->seekElement(entity1);
+  WorldEntity* entity1 = iterator1->firstElement();
+  WorldEntity* entity2 = iterator2->iteratorElement(iterator1);
+  //entity2 = iterator2->nextElement();
   PRINTF(3)("checking for collisions\n");
   while( entity1 != NULL)
@@ -87,18 +89,27 @@
     if( likely(entity1 != this->terrain))
     {
+      entity2 = iterator2->nextElement();
+
       while( entity2 != NULL)
       {
-        if( likely(entity2 != this->terrain))
+//        if (entity2 != NULL)
+//          printf("entity2::%s::%s", entity2->getClassName(), getName());
+
+        ///////////////// FIXME
+        ///////////////// COMMENTED OUT, because some part of it generated a segfault
+        ////////////////
+
+/*                if( likely(entity2 != this->terrain))
         {
-          PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName());
+          PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
           tree = entity1->getOBBTree();
-          if( likely(tree != NULL)) tree->collideWith(entity1, entity2);
-        }
+          if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
+        }*/
         entity2 = iterator2->nextElement();
       }
+//      printf("\n");
     }
     entity1 = iterator1->nextElement();
-    entity2 = iterator2->seekElement(entity1);
-
+    entity2 = iterator2->iteratorElement(iterator1);
   }
   delete iterator1;
@@ -133,5 +144,5 @@
 
   tIterator<WorldEntity>* iterator = entityList->getIterator();
-  WorldEntity* entity = iterator->nextElement();
+  WorldEntity* entity = iterator->firstElement();
   while( entity != NULL)
   {
Index: /trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- /trunk/src/lib/collision_detection/obb_tree.cc	(revision 5114)
+++ /trunk/src/lib/collision_detection/obb_tree.cc	(revision 5115)
@@ -47,4 +47,6 @@
 {
   this->setClassID(CL_OBB_TREE, "OBBTree");
+
+  this->rootNode = NULL;
 
   material = new Material*[5];
Index: /trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- /trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 5114)
+++ /trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 5115)
@@ -574,5 +574,5 @@
 
   iterator = partition1.getIterator();
-  element = iterator->nextElement();
+  element = iterator->firstElement();
   index = 0;
   while( element != NULL)
@@ -592,5 +592,5 @@
 
   iterator = partition2.getIterator();
-  element = iterator->nextElement();
+  element = iterator->firstElement();
   index = 0;
   while( element != NULL)
Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 5114)
+++ /trunk/src/lib/coord/p_node.cc	(revision 5115)
@@ -78,6 +78,7 @@
 PNode::~PNode ()
 {
+  printf("deleting %s::%s\n", this->getClassName(), this->getName());
   tIterator<PNode>* iterator = this->children->getIterator();
-  PNode* pn = iterator->nextElement();
+  PNode* pn = iterator->firstElement();
   while( pn != NULL)
     {
@@ -435,5 +436,5 @@
 
   tIterator<PNode>* iterator = this->children->getIterator();
-  PNode* pn = iterator->nextElement();
+  PNode* pn = iterator->firstElement();
 
   while( pn != NULL)
@@ -605,5 +606,5 @@
     {
       tIterator<PNode>* iterator = this->children->getIterator();
-      PNode* pn = iterator->nextElement();
+      PNode* pn = iterator->firstElement();
       while( pn != NULL)
       {
@@ -615,5 +616,4 @@
 
         pn->update(dt);
-          //pn = this->children->nextElement();
         pn = iterator->nextElement();
       }
@@ -656,5 +656,5 @@
     tIterator<PNode>* iterator = this->children->getIterator();
       //PNode* pn = this->children->enumerate ();
-    PNode* pn = iterator->nextElement();
+    PNode* pn = iterator->firstElement();
     while( pn != NULL)
     {
@@ -722,8 +722,8 @@
   if (depth >= 2 || depth == 0)
   {
+    Vector childColor =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0));
+
     tIterator<PNode>* iterator = this->children->getIterator();
-      //PNode* pn = this->children->enumerate ();
-    Vector childColor =  Color::HSVtoRGB(Color::RGBtoHSV(color)+Vector(20,0,.0));
-    PNode* pn = iterator->nextElement();
+    PNode* pn = iterator->firstElement();
     while( pn != NULL)
     {
Index: /trunk/src/lib/graphics/importer/model.cc
===================================================================
--- /trunk/src/lib/graphics/importer/model.cc	(revision 5114)
+++ /trunk/src/lib/graphics/importer/model.cc	(revision 5115)
@@ -192,5 +192,5 @@
 
     tIterator<Material>* tmpIt = this->materialList->getIterator();
-    Material* material = tmpIt->nextElement();
+    Material* material = tmpIt->firstElement();
   //! @todo do we really have to delete this material??
     while(material)
@@ -413,5 +413,5 @@
 {
   tIterator<Material>* tmpIt = this->materialList->getIterator();
-  Material* material = tmpIt->nextElement();
+  Material* material = tmpIt->firstElement();
   while(material)
     {
Index: /trunk/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5114)
+++ /trunk/src/lib/graphics/render2D/element_2d.cc	(revision 5115)
@@ -55,5 +55,5 @@
 
   tIterator<Element2D>* iterator = this->children->getIterator();
-  Element2D* pn = iterator->nextElement();
+  Element2D* pn = iterator->firstElement();
   while( pn != NULL)
   {
@@ -479,5 +479,5 @@
 {
   tIterator<Element2D>* iterator = this->children->getIterator();
-  Element2D* pn = iterator->nextElement();
+  Element2D* pn = iterator->firstElement();
 
   while( pn != NULL)
@@ -687,5 +687,5 @@
   {
     tIterator<Element2D>* iterator = this->children->getIterator();
-    Element2D* pn = iterator->nextElement();
+    Element2D* pn = iterator->firstElement();
     while( pn != NULL)
     {
@@ -697,5 +697,4 @@
 
       pn->update2D(dt);
-          //pn = this->children->nextElement();
       pn = iterator->nextElement();
     }
@@ -735,5 +734,5 @@
   {
     tIterator<Element2D>* iterator = this->children->getIterator();
-    Element2D* pn = iterator->nextElement();
+    Element2D* pn = iterator->firstElement();
     while( pn != NULL)
     {
Index: /trunk/src/lib/graphics/render2D/render_2d.cc
===================================================================
--- /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5114)
+++ /trunk/src/lib/graphics/render2D/render_2d.cc	(revision 5115)
@@ -105,5 +105,5 @@
   {
     tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
-    Element2D* elem = iterator->nextElement();
+    Element2D* elem = iterator->firstElement();
     while (elem != NULL)
     {
@@ -131,5 +131,5 @@
     {
       tIterator<Element2D>* iterator = this->element2DList[i]->getIterator();
-      Element2D* elem = iterator->nextElement();
+      Element2D* elem = iterator->firstElement();
       while (elem != NULL)
       {
Index: /trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
===================================================================
--- /trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5114)
+++ /trunk/src/lib/graphics/spatial_separation/quadtree_node.cc	(revision 5115)
@@ -253,5 +253,5 @@
   counter = 0;
   iterator = listA->getIterator();
-  tempTri = iterator->nextElement();
+  tempTri = iterator->firstElement();
   while( tempTri)
   {
@@ -262,5 +262,5 @@
   counter = 0;
   iterator = listB->getIterator();
-  tempTri = iterator->nextElement();
+  tempTri = iterator->firstElement();
   while( tempTri)
   {
@@ -271,5 +271,5 @@
   counter = 0;
   iterator = listC->getIterator();
-  tempTri = iterator->nextElement();
+  tempTri = iterator->firstElement();
   while( tempTri)
   {
@@ -280,5 +280,5 @@
   counter = 0;
   iterator = listD->getIterator();
-  tempTri = iterator->nextElement();
+  tempTri = iterator->firstElement();
   while( tempTri)
   {
Index: /trunk/src/lib/graphics/text_engine.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine.cc	(revision 5114)
+++ /trunk/src/lib/graphics/text_engine.cc	(revision 5115)
@@ -845,5 +845,5 @@
 
   tIterator<BaseObject>* textIterator = ClassList::getList(CL_TEXT)->getIterator();
-  Text* text = dynamic_cast<Text*>(textIterator->nextElement());
+  Text* text = dynamic_cast<Text*>(textIterator->firstElement());
   while( text != NULL)
     {
Index: /trunk/src/lib/lang/class_list.cc
===================================================================
--- /trunk/src/lib/lang/class_list.cc	(revision 5114)
+++ /trunk/src/lib/lang/class_list.cc	(revision 5115)
@@ -208,5 +208,5 @@
       {
         tIterator<BaseObject>* iterator = tmp->objectList->getIterator();
-        BaseObject* enumBO = iterator->nextElement();
+        BaseObject* enumBO = iterator->firstElement();
         const char* tmpName;
         while (enumBO != NULL)
@@ -249,5 +249,5 @@
       {
         tIterator<BaseObject>* iterator = tmp->objectList->getIterator();
-        BaseObject* enumBO = iterator->nextElement();
+        BaseObject* enumBO = iterator->firstElement();
         while (enumBO != NULL)
         {
@@ -362,5 +362,5 @@
         PRINT(0)("|  Listing Instances:\n");
         tIterator<BaseObject>* iterator = tmp->objectList->getIterator();
-        BaseObject* enumBO = iterator->nextElement();
+        BaseObject* enumBO = iterator->firstElement();
         while (enumBO)
         {
Index: /trunk/src/lib/particles/particle_engine.cc
===================================================================
--- /trunk/src/lib/particles/particle_engine.cc	(revision 5114)
+++ /trunk/src/lib/particles/particle_engine.cc	(revision 5115)
@@ -51,25 +51,27 @@
 ParticleEngine::~ParticleEngine ()
 {
+  // we must not do this, because PNoe does it for us
+  // or we do this with help from ClassList, which essentially makes much more sense
   // delete all remaining systems
-  tIterator<ParticleSystem>* sysIt = this->systemList->getIterator();
-  ParticleSystem* tmpSys = sysIt->nextElement();
-  while(tmpSys)
-    {
-      delete tmpSys;
-      tmpSys = sysIt->nextElement();
-    }
-  delete sysIt;
-  delete this->systemList;
-
-  // delete all remaining emitters
-  tIterator<ParticleEmitter>* emitIt = this->emitterList->getIterator();
-  ParticleEmitter* tmpEmit = emitIt->nextElement();
-  while(tmpEmit)
-    {
-      delete tmpEmit;
-      tmpEmit = emitIt->nextElement();
-    }
-  delete emitIt;
-  delete this->emitterList;
+//   tIterator<ParticleSystem>* sysIt = this->systemList->getIterator();
+//   ParticleSystem* tmpSys = sysIt->firstElement();
+//   while(tmpSys)
+//     {
+//       delete tmpSys;
+//       tmpSys = sysIt->nextElement();
+//     }
+//   delete sysIt;
+   delete this->systemList;
+//
+//   // delete all remaining emitters
+//   tIterator<ParticleEmitter>* emitIt = this->emitterList->getIterator();
+//   ParticleEmitter* tmpEmit = emitIt->firstElement();
+//   while(tmpEmit)
+//     {
+//       delete tmpEmit;
+//       tmpEmit = emitIt->nextElement();
+//     }
+//   delete emitIt;
+   delete this->emitterList;
 
   // there should be no more Connections
@@ -147,5 +149,5 @@
   // look, if we have already added this connection
   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->nextElement();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
   while(tmpConnection)
     {
@@ -178,5 +180,5 @@
   // remove any connections, that have this system within
   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->nextElement();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
   while(tmpConnection)
     {
@@ -199,5 +201,5 @@
   // remove any connections, that have this emitter within
   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->nextElement();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
   while(tmpConnection)
     {
@@ -224,5 +226,5 @@
   // look, if we have already added this connection
   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->nextElement();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
   while(tmpConnection)
     {
@@ -260,5 +262,5 @@
   // ticks all the ParticleSystems
   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-  ParticleSystem* tmpSys = tmpIt->nextElement();
+  ParticleSystem* tmpSys = tmpIt->firstElement();
   while(tmpSys)
     {
@@ -270,5 +272,5 @@
   // add new Particles to each System connected to an Emitter.
   tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-  ParticleConnection* tmpConnection = tmpConIt->nextElement();
+  ParticleConnection* tmpConnection = tmpConIt->firstElement();
   while(tmpConnection)
     {
@@ -285,5 +287,5 @@
 {
   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-  ParticleSystem* tmpSys = tmpIt->nextElement();
+  ParticleSystem* tmpSys = tmpIt->firstElement();
   while(tmpSys)
     {
@@ -302,5 +304,5 @@
 {
   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-  ParticleSystem* tmpSys = tmpIt->nextElement();
+  ParticleSystem* tmpSys = tmpIt->firstElement();
   while(tmpSys)
     {
@@ -324,5 +326,5 @@
   int count = 0;
   tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-  ParticleSystem* tmpSys = tmpIt->nextElement();
+  ParticleSystem* tmpSys = tmpIt->firstElement();
   while(tmpSys)
     {
@@ -346,5 +348,5 @@
 {
   tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
-  ParticleEmitter* tmpEmit = tmpIt->nextElement();
+  ParticleEmitter* tmpEmit = tmpIt->firstElement();
   while(tmpEmit)
     {
@@ -369,5 +371,5 @@
   int count = 0;
   tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
-  ParticleEmitter* tmpEmit = tmpIt->nextElement();
+  ParticleEmitter* tmpEmit = tmpIt->firstElement();
   while(tmpEmit)
     {
@@ -402,5 +404,5 @@
 
     tIterator<ParticleConnection>* tmpConIt = connectionList->getIterator();
-    ParticleConnection* tmpConnection = tmpConIt->nextElement();
+    ParticleConnection* tmpConnection = tmpConIt->firstElement();
     while(tmpConnection)
     {
@@ -414,5 +416,5 @@
   {
     tIterator<ParticleSystem>* tmpIt = systemList->getIterator();
-    ParticleSystem* tmpSys = tmpIt->nextElement();
+    ParticleSystem* tmpSys = tmpIt->firstElement();
     while(tmpSys)
     {
@@ -429,5 +431,5 @@
   {
     tIterator<ParticleEmitter>* tmpIt = emitterList->getIterator();
-    ParticleEmitter* tmpEmit = tmpIt->nextElement();
+    ParticleEmitter* tmpEmit = tmpIt->firstElement();
     while(tmpEmit)
     {
Index: /trunk/src/lib/physics/physics_engine.cc
===================================================================
--- /trunk/src/lib/physics/physics_engine.cc	(revision 5114)
+++ /trunk/src/lib/physics/physics_engine.cc	(revision 5115)
@@ -53,5 +53,5 @@
   // delete all PhysicsConnections that are still in existence
   tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
-  PhysicsConnection* enumPC = itPC->nextElement();
+  PhysicsConnection* enumPC = itPC->firstElement();
   while (enumPC)
   {
@@ -60,29 +60,29 @@
   }
   delete itPC;
-  delete this->connections;
-
-  // delete all PhysicsInterfaces, still in existence (this could be dangerous)
-  tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
-  PhysicsInterface* enumPI = itPI->nextElement();
-  while (enumPI)
-  {
-    delete enumPI;
-
-    enumPI = itPI->nextElement();
-  }
-  delete itPI;
-  delete this->interfaces;
-
-  // delete all PhysicsFields, still in existence (this could be dangerous)
-  tIterator<Field>* itF = this->fields->getIterator();
-  Field* enumF = itF->nextElement();
-  while (enumF)
-  {
-    delete enumF;
-
-    enumF = itF->nextElement();
-  }
-  delete itF;
-  delete this->fields;
+   delete this->connections;
+//
+//   // delete all PhysicsInterfaces, still in existence (this could be dangerous)
+//   tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
+//   PhysicsInterface* enumPI = itPI->firstElement();
+//   while (enumPI)
+//   {
+//     delete enumPI;
+//
+//     enumPI = itPI->nextElement();
+//   }
+//   delete itPI;
+//   delete this->interfaces;
+//
+//   // delete all PhysicsFields, still in existence (this could be dangerous)
+//   tIterator<Field>* itF = this->fields->getIterator();
+//   Field* enumF = itF->firstElement();
+//   while (enumF)
+//   {
+//     delete enumF;
+//
+//     enumF = itF->nextElement();
+//   }
+//   delete itF;
+   delete this->fields;
 
 
@@ -163,5 +163,5 @@
 {
   tIterator<PhysicsInterface>* tmpIt = interfaces->getIterator();
-  PhysicsInterface* tmpInt = tmpIt->nextElement();
+  PhysicsInterface* tmpInt = tmpIt->firstElement();
   while(tmpInt)
   {
@@ -206,5 +206,5 @@
 {
   tIterator<Field>* tmpIt = fields->getIterator();
-  Field* tmpField = tmpIt->nextElement();
+  Field* tmpField = tmpIt->firstElement();
   while(tmpField)
   {
@@ -251,5 +251,5 @@
 {
   tIterator<PhysicsConnection>* tmpIt = connections->getIterator();
-  PhysicsConnection* tmpConn = tmpIt->nextElement();
+  PhysicsConnection* tmpConn = tmpIt->firstElement();
   while(tmpConn)
   {
@@ -278,5 +278,5 @@
   meaning let the fields work */
   tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
-  PhysicsConnection* enumPC = itPC->nextElement();
+  PhysicsConnection* enumPC = itPC->firstElement();
   while (enumPC)
     {
@@ -289,5 +289,5 @@
   /* actually tick all the PhysicsInterfaces. Move the objects around */
   tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
-  PhysicsInterface* enumPI = itPI->nextElement();
+  PhysicsInterface* enumPI = itPI->firstElement();
   while (enumPI)
     {
Index: /trunk/src/lib/physics/physics_interface.cc
===================================================================
--- /trunk/src/lib/physics/physics_interface.cc	(revision 5114)
+++ /trunk/src/lib/physics/physics_interface.cc	(revision 5115)
@@ -68,5 +68,5 @@
 
     tIterator<PNode>* iterator = massCalcPNode->children->getIterator();
-    PNode* pn = iterator->nextElement();
+    PNode* pn = iterator->firstElement();
     while( pn != NULL)
     {
Index: /trunk/src/lib/sound/sound_engine.cc
===================================================================
--- /trunk/src/lib/sound/sound_engine.cc	(revision 5114)
+++ /trunk/src/lib/sound/sound_engine.cc	(revision 5115)
@@ -215,5 +215,5 @@
   {
     tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
-    SoundSource* enumSource = (SoundSource*)sourceIterator->nextElement();
+    SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
     while (enumSource)
     {
@@ -228,5 +228,5 @@
   {
     tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
-    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
+    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
     while (enumBuffer)
     {
@@ -298,5 +298,5 @@
   // look if there are any sources that have the buffer still loaded
   tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
-  SoundSource* enumSource = (SoundSource*)sourceIterator->nextElement();
+  SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
   while (enumSource)
     {
@@ -345,5 +345,5 @@
   {
     tIterator<BaseObject>* iterator = this->sourceList->getIterator();
-    SoundSource* enumSource = (SoundSource*)iterator->nextElement();
+    SoundSource* enumSource = (SoundSource*)iterator->firstElement();
     while (enumSource)
     {
@@ -373,9 +373,9 @@
   {
     tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
-    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
+    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
     while (enumBuffer)
     {
       tIterator<BaseObject>* sourceIterator = this->sourceList->getIterator();
-      SoundSource* enumSource = (SoundSource*)sourceIterator->nextElement();
+      SoundSource* enumSource = (SoundSource*)sourceIterator->firstElement();
       while (enumSource)
       {
@@ -401,5 +401,5 @@
   {
     tIterator<BaseObject>* bufferIterator = this->bufferList->getIterator();
-    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->nextElement();
+    SoundBuffer* enumBuffer = (SoundBuffer*)bufferIterator->firstElement();
     while (enumBuffer)
     {
@@ -419,5 +419,5 @@
   {
     tIterator<BaseObject>* Iterator = this->sourceList->getIterator();
-    SoundSource* enumSource = (SoundSource*)Iterator->nextElement();
+    SoundSource* enumSource = (SoundSource*)Iterator->firstElement();
     while (enumSource)
     {
Index: /trunk/src/lib/util/ini_parser.cc
===================================================================
--- /trunk/src/lib/util/ini_parser.cc	(revision 5114)
+++ /trunk/src/lib/util/ini_parser.cc	(revision 5115)
@@ -58,9 +58,9 @@
   {
     tIterator<IniSection>* sectionIt = this->sections->getIterator();
-    IniSection* sectionEnum = sectionIt->nextElement();
+    IniSection* sectionEnum = sectionIt->firstElement();
     while (sectionEnum)
     {
       tIterator<IniEntry>* entryIt = sectionEnum->entries->getIterator();
-      IniEntry* entryEnum = entryIt->nextElement();
+      IniEntry* entryEnum = entryIt->firstElement();
       while (entryEnum)
       {
@@ -192,5 +192,5 @@
     {
       tIterator<IniSection>* sectionIt = this->sections->getIterator();
-      IniSection* sectionEnum = sectionIt->nextElement();
+      IniSection* sectionEnum = sectionIt->firstElement();
       while (sectionEnum)
       {
@@ -198,5 +198,5 @@
 
         tIterator<IniEntry>* entryIt = sectionEnum->entries->getIterator();
-        IniEntry* entryEnum = entryIt->nextElement();
+        IniEntry* entryEnum = entryIt->firstElement();
         while (entryEnum)
         {
@@ -246,5 +246,5 @@
 {
   tIterator<IniSection>* sectionIt = this->sections->getIterator();
-  IniSection* sectionEnum = sectionIt->nextElement();
+  IniSection* sectionEnum = sectionIt->firstElement();
   while (sectionEnum)
   {
@@ -347,5 +347,5 @@
   {
     tIterator<IniSection>* sectionIt = this->sections->getIterator();
-    IniSection* sectionEnum = sectionIt->nextElement();
+    IniSection* sectionEnum = sectionIt->firstElement();
     while (sectionEnum)
     {
@@ -395,5 +395,5 @@
   {
     tIterator<IniSection>* sectionIt = this->sections->getIterator();
-    IniSection* sectionEnum = sectionIt->nextElement();
+    IniSection* sectionEnum = sectionIt->firstElement();
     while (sectionEnum)
     {
@@ -401,5 +401,5 @@
       {
         tIterator<IniEntry>* entryIt = sectionEnum->entries->getIterator();
-        IniEntry* entryEnum = entryIt->nextElement();
+        IniEntry* entryEnum = entryIt->firstElement();
         while (entryEnum)
         {
@@ -452,5 +452,5 @@
   {
     tIterator<IniSection>* sectionIt = this->sections->getIterator();
-    IniSection* sectionEnum = sectionIt->nextElement();
+    IniSection* sectionEnum = sectionIt->firstElement();
     while (sectionEnum)
     {
@@ -458,5 +458,5 @@
 
       tIterator<IniEntry>* entryIt = sectionEnum->entries->getIterator();
-      IniEntry* entryEnum = entryIt->nextElement();
+      IniEntry* entryEnum = entryIt->firstElement();
       while (entryEnum)
       {
Index: /trunk/src/lib/util/list.h
===================================================================
--- /trunk/src/lib/util/list.h	(revision 5114)
+++ /trunk/src/lib/util/list.h	(revision 5115)
@@ -12,5 +12,5 @@
 #endif
 
-
+template<class T> class tIterator;
 
 //! a list element of the tList,
@@ -23,101 +23,4 @@
 
 /**
- *  an iterator class
-
-   this enables the user to iterate through a list very easely
-*/
-template<class T> class tIterator
-{
- public:
-  tIterator(listElement<T>* startElement);
-  ~tIterator();
-
-  T* nextElement();
-  T* seekElement(T* element);
-
- private:
-  listElement<T>*    currentEl;                      //!< pointer to the current list element in the iterator
-  listElement<T>*    tmpEl;                          //!< temp listElemnt pointer
-  listElement<T>*    startElement;                   //!< pointer to the start of the list
-};
-
-
-/**
- *  iterator constructor
- * @param startElement:  the first list element from the tList
-
-   normaly you will use it like this:
-
-   tIterator<char>* nameIterator = nameList->getIterator();
-   char name* = nameIterator->nextElement();
-   while( name != NULL)
-   {
-     PRINTF(3)("found name: %s in list\n", name);
-     name = nameIterator->nextElement();
-   }
-   delete nameIterator;
-*/
-template<class T>
-inline tIterator<T>::tIterator (listElement<T>* startElement)
-{
-  this->currentEl = startElement;
-  this->tmpEl = NULL;
-  this->startElement = startElement;
-}
-
-
-/**
- *  the destructor
-*/
-template<class T>
-inline tIterator<T>::~tIterator ()
-{
-  this->currentEl = NULL;
-}
-
-
-/**
- *  use it to iterate through the list
- * @returns next list element
-*/
-template<class T>
-inline T* tIterator<T>::nextElement ()
-{
-  if( this->currentEl == NULL)
-    return NULL;
-
-  this->tmpEl = this->currentEl;
-  this->currentEl = this->currentEl->next;
-  return this->tmpEl->curr;
-}
-
-/**
- *  gets the element after the selected one, sets the iterator to this point in the list
- * @param element the element to seek
- * @returns next list element
-
-  Attention: if you seek an element, the iterator pointer will point to the NEXT listelement after the argument!
- */
-template<class T>
-inline T* tIterator<T>::seekElement (T* element)
-{
-  for(this->tmpEl = this->startElement; this->tmpEl != NULL; this->tmpEl = this->tmpEl->next)
-  {
-    if( unlikely(this->tmpEl->curr == element))
-    {
-      if( this->tmpEl->next != NULL)
-      {
-        this->currentEl = this->tmpEl->next->next;
-        return this->tmpEl->next->curr;
-      }
-      return NULL;
-    }
-  }
-  return NULL;
-}
-
-
-
-/**
  *  the list template class
 
@@ -126,4 +29,6 @@
 template<class T> class tList
 {
+  friend class tIterator<T>;
+
  public:
   tList ();
@@ -374,6 +279,5 @@
 inline tIterator<T>* tList<T>::getIterator() const
 {
-  tIterator<T>* iterator = new tIterator<T>(this->first);
-  return iterator;
+  return new tIterator<T>(this);
 }
 
@@ -414,3 +318,142 @@
 }
 
+
+
+
+/**
+ *  an iterator class
+
+   this enables the user to iterate through a list very easely
+ */
+template<class T> class tIterator
+{
+  public:
+    tIterator(const tList<T>* list);
+    ~tIterator();
+
+    T* firstElement();
+    T* nextElement();
+    T* seekElement(T* element);
+    T* iteratorElement(const tIterator<T>* iterator);
+
+  private:
+    listElement<T>*    currentEl;                      //!< pointer to the current list element in the iterator
+    listElement<T>*    tmpEl;                          //!< temp listElemnt pointer
+    const tList<T>*    list;                           //!< The List, that we want to iterate through
+};
+
+
+/**
+ *  iterator constructor
+ * @param startElement:  the first list element from the tList
+ *
+ * normaly you will use it like this:
+ **********************************************************
+ * tIterator<char>* nameIterator = nameList->getIterator();
+ * char name* = nameIterator->firstElement();
+ * while( name != NULL)
+ *  {
+ *   PRINTF(3)("found name: %s in list\n", name);
+ *   name = nameIterator->nextElement();
+ *  }
+ * delete nameIterator;
+ * ********************************************************
+ */
+template<class T>
+  inline tIterator<T>::tIterator (const tList<T>* list)
+{
+  this->currentEl = list->first;
+  this->tmpEl = NULL;
+  this->list = list;
+}
+
+
+/**
+ *  the destructor
+ */
+template<class T>
+    inline tIterator<T>::~tIterator ()
+{
+  this->currentEl = NULL;
+}
+
+template<class T>
+    inline T* tIterator<T>::firstElement ()
+{
+  this->currentEl = this->list->first;
+  if (this->currentEl == NULL)
+    return NULL;
+  else
+    return this->currentEl->curr;
+}
+
+
+/**
+ *  use it to iterate through the list
+ * @returns next list element
+ */
+template<class T>
+    inline T* tIterator<T>::nextElement ()
+{
+  if( this->currentEl == NULL)
+    return NULL;
+
+  this->currentEl = this->currentEl->next;
+  if (this->currentEl != NULL)
+    return this->currentEl->curr;
+  else
+    return NULL;
+}
+
+/**
+ *  gets the element after the selected one, sets the iterator to this point in the list
+ * @param element the element to seek
+ * @returns current list element
+ */
+template<class T>
+    inline T* tIterator<T>::seekElement (T* element)
+{
+  if (element == NULL)
+  {
+    this->currentEl = NULL;
+    return NULL;
+  }
+  this->tmpEl = this->list->first;
+  while( this->tmpEl != NULL)
+  {
+    if( unlikely(this->tmpEl->curr == element))
+    {
+      this->currentEl = this->tmpEl;
+      return this->currentEl->curr;
+    }
+    this->tmpEl = this->tmpEl->next;
+  }
+  this->currentEl = NULL;
+  return NULL;
+}
+
+/**
+ * grabs the iterator entity from another iterator
+ * @param iterator the iterator to grab the local currentEl from
+ * @returns the grabbed element (current).
+ */
+template<class T>
+    T* tIterator<T>::iteratorElement(const tIterator<T>* iterator)
+{
+  if (iterator != NULL)
+  {
+    this->currentEl = iterator->currentEl;
+    if (this->currentEl != NULL)
+      return this->currentEl->curr;
+    else
+      return NULL;
+  }
+  else
+  {
+    this->currentEl = NULL;
+    return NULL;
+  }
+}
+
+
 #endif /* _LIST_H */
Index: /trunk/src/story_entities/campaign.cc
===================================================================
--- /trunk/src/story_entities/campaign.cc	(revision 5114)
+++ /trunk/src/story_entities/campaign.cc	(revision 5115)
@@ -154,5 +154,5 @@
     */
     tIterator<StoryEntity>* it = this->entities->getIterator();
-    se = it->nextElement();
+    se = it->firstElement();
     while( se != NULL)
     {
@@ -284,5 +284,5 @@
 
   tIterator<StoryEntity>* iterator = this->entities->getIterator();
-  StoryEntity* entity = iterator->nextElement();
+  StoryEntity* entity = iterator->firstElement();
   while( entity != NULL)
     {
Index: /trunk/src/story_entities/world.cc
===================================================================
--- /trunk/src/story_entities/world.cc	(revision 5114)
+++ /trunk/src/story_entities/world.cc	(revision 5115)
@@ -118,9 +118,8 @@
   PRINTF(3)("World::~World() - deleting current world\n");
 
-  ParticleEngine::getInstance()->debug();
-
   // here everything that is alocated by the World is deleted
   delete this->entities;
   State::setWorldEntityList(NULL);
+
 
   delete LightManager::getInstance();
@@ -135,4 +134,5 @@
   FastFactory::flushAll(true);
 
+
   // erease everything that is left.
   delete NullParent::getInstance();
@@ -140,5 +140,5 @@
 
   // unload the resources !!
-  ResourceManager::getInstance()->unload(this->music);
+//  ResourceManager::getInstance()->unload(this->music);
   ResourceManager::getInstance()->unloadAllByPriority(RP_LEVEL);
 }
@@ -761,4 +761,13 @@
 void World::debug()
 {
+  PRINTF(0)("Printing out the List of alive WorldEntities:\n");
+  tIterator<WorldEntity>* iterator = this->entities->getIterator();
+  WorldEntity* entity = iterator->firstElement();
+  while( entity != NULL)
+  {
+    PRINTF(0)("%s::%s\n", entity->getClassName(), entity->getName());
+    entity = iterator->nextElement();
+  }
+  delete iterator;
 }
 
@@ -864,5 +873,5 @@
 
       tIterator<WorldEntity>* iterator = this->entities->getIterator();
-      WorldEntity* entity = iterator->nextElement();
+      WorldEntity* entity = iterator->firstElement();
       while( entity != NULL)
         {
@@ -951,5 +960,5 @@
   glLoadIdentity();
   tIterator<WorldEntity>* iterator = this->entities->getIterator();
-  entity = iterator->nextElement();
+  entity = iterator->firstElement();
   while( entity != NULL )
   {
Index: /trunk/src/subprojects/benchmark.cc
===================================================================
--- /trunk/src/subprojects/benchmark.cc	(revision 5114)
+++ /trunk/src/subprojects/benchmark.cc	(revision 5115)
@@ -352,5 +352,5 @@
       /*give list out */
       tIterator<char>* iterator = list->getIterator();
-      name = iterator->nextElement();
+      name = iterator->firstElement();
       printf("  List Elements: \t\t");
       while( name != NULL)
@@ -373,5 +373,5 @@
       /*give list out */
       iterator = list->getIterator();
-      name = iterator->nextElement();
+      name = iterator->firstElement();
       printf("  List Elements: \t\t");
       while( name != NULL)
@@ -433,5 +433,5 @@
       /*give list out */
       iterator = list->getIterator();
-      name = iterator->nextElement();
+      name = iterator->firstElement();
       printf("  List Elements: \t\t");
       while( name != NULL)
Index: /trunk/src/subprojects/collision_detection/collision_detection.cc
===================================================================
--- /trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 5114)
+++ /trunk/src/subprojects/collision_detection/collision_detection.cc	(revision 5115)
@@ -235,5 +235,5 @@
 
   tIterator<WorldEntity>* iterator = entityList->getIterator();
-  WorldEntity* entity = iterator->nextElement();
+  WorldEntity* entity = iterator->firstElement();
   while( entity != NULL)
   {
@@ -251,5 +251,5 @@
 
   tIterator<WorldEntity>* iterator = entityList->getIterator();
-  WorldEntity* entity = iterator->nextElement();
+  WorldEntity* entity = iterator->firstElement();
   while( entity != NULL)
   {
Index: /trunk/src/util/animation/animation3d.cc
===================================================================
--- /trunk/src/util/animation/animation3d.cc	(revision 5114)
+++ /trunk/src/util/animation/animation3d.cc	(revision 5115)
@@ -58,5 +58,5 @@
   // delete all the KeyFrames
   tIterator<KeyFrame3D>* itKF = keyFrameList->getIterator();
-  KeyFrame3D*  enumKF = itKF->nextElement();
+  KeyFrame3D*  enumKF = itKF->firstElement();
   while (enumKF)
     {
Index: /trunk/src/util/animation/animation_player.cc
===================================================================
--- /trunk/src/util/animation/animation_player.cc	(revision 5114)
+++ /trunk/src/util/animation/animation_player.cc	(revision 5115)
@@ -86,5 +86,5 @@
   // deleting the Animation List AND all the elements of the List
   tIterator<Animation>* animIt = this->animationList->getIterator();
-  Animation* anim = animIt->nextElement();
+  Animation* anim = animIt->firstElement();
   while( anim != NULL)
     {
@@ -109,5 +109,5 @@
       // iterate through all the animations and tick them.
       tIterator<Animation>* animIt = this->animationList->getIterator();
-      Animation* anim = animIt->nextElement();
+      Animation* anim = animIt->firstElement();
       while( anim != NULL)
         {
@@ -147,5 +147,5 @@
 {
   tIterator<Animation>* animIt = this->animationList->getIterator();
-  Animation* anim = animIt->nextElement();
+  Animation* anim = animIt->firstElement();
   while( anim != NULL)
     {
@@ -176,5 +176,5 @@
   // Per ANIMATION DEBUG
   tIterator<Animation>* animIt = this->animationList->getIterator();
-  Animation* anim = animIt->nextElement();
+  Animation* anim = animIt->firstElement();
   while( anim != NULL)
     {
Index: /trunk/src/util/animation/t_animation.h
===================================================================
--- /trunk/src/util/animation/t_animation.h	(revision 5114)
+++ /trunk/src/util/animation/t_animation.h	(revision 5115)
@@ -108,5 +108,5 @@
   // delete all the KeyFrames
   tIterator<KeyFrameF>* itKF = keyFrameList->getIterator();
-  KeyFrameF*  enumKF = itKF->nextElement();
+  KeyFrameF*  enumKF = itKF->firstElement();
   while (enumKF)
     {
Index: /trunk/src/util/garbage_collector.cc
===================================================================
--- /trunk/src/util/garbage_collector.cc	(revision 5114)
+++ /trunk/src/util/garbage_collector.cc	(revision 5115)
@@ -156,5 +156,5 @@
 //
 //   tIterator<WorldEntity>* iterator = list->getIterator();
-//   WorldEntity* entity = iterator->nextElement();
+//   WorldEntity* entity = iterator->firstElement();
 //   while( entity != NULL)
 //     {
Index: /trunk/src/util/loading/load_param.cc
===================================================================
--- /trunk/src/util/loading/load_param.cc	(revision 5114)
+++ /trunk/src/util/loading/load_param.cc	(revision 5115)
@@ -295,5 +295,5 @@
 
   tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
-  LoadParamDescription* enumParamDesc = iterator->nextElement();
+  LoadParamDescription* enumParamDesc = iterator->firstElement();
   while (enumParamDesc)
     {
@@ -314,5 +314,5 @@
 {
   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = iterator->nextElement();
+  LoadClassDescription* enumClassDesc = iterator->firstElement();
   while (enumClassDesc)
     {
@@ -336,5 +336,5 @@
 {
   tIterator<LoadParamDescription>* iterator = this->paramList->getIterator();
-  LoadParamDescription* enumParamDesc = iterator->nextElement();
+  LoadParamDescription* enumParamDesc = iterator->firstElement();
   while (enumParamDesc)
     {
@@ -362,10 +362,10 @@
   PRINT(3)(" Listing all the Loadable Options (loaded since Game started).\n\n");
   tIterator<LoadClassDescription>* classIT = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = classIT->nextElement();
+  LoadClassDescription* enumClassDesc = classIT->firstElement();
   while (enumClassDesc)
     {
       PRINT(3)("<%s>\n", enumClassDesc->className);
       tIterator<LoadParamDescription>* paramIT = enumClassDesc->paramList->getIterator();
-      LoadParamDescription* enumParamDesc = paramIT->nextElement();
+      LoadParamDescription* enumParamDesc = paramIT->firstElement();
       while (enumParamDesc)
         {
@@ -394,5 +394,5 @@
 
   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-  LoadClassDescription* enumClassDesc = iterator->nextElement();
+  LoadClassDescription* enumClassDesc = iterator->firstElement();
   while (enumClassDesc)
   {
@@ -412,5 +412,5 @@
 // {
 //   tIterator<LoadClassDescription>* iterator = LoadClassDescription::classList->getIterator();
-//   LoadClassDescription* enumClassDesc = iterator->nextElement();
+//   LoadClassDescription* enumClassDesc = iterator->firstElement();
 //   while (enumClassDesc)
 //   {
Index: /trunk/src/util/resource_manager.cc
===================================================================
--- /trunk/src/util/resource_manager.cc	(revision 5114)
+++ /trunk/src/util/resource_manager.cc	(revision 5115)
@@ -74,5 +74,5 @@
   // deleting the Directorie Lists
   tIterator<char>* tmpIt = imageDirs->getIterator();
-  char* tmpDir = tmpIt->nextElement();
+  char* tmpDir = tmpIt->firstElement();
   while(tmpDir)
     {
@@ -144,5 +144,5 @@
       // check if the Directory has been added before
       tIterator<char>* tmpImageDirs = imageDirs->getIterator();
-      char* tmpDir = tmpImageDirs->nextElement();
+      char* tmpDir = tmpImageDirs->firstElement();
       while(tmpDir)
         {
@@ -363,6 +363,5 @@
             {
               tIterator<char>* iterator = imageDirs->getIterator();
-              tmpDir = iterator->nextElement();
-              //tmpDir = imageDirs->enumerate();
+              tmpDir = iterator->firstElement();
               while(tmpDir)
                 {
@@ -492,5 +491,5 @@
 {
   tIterator<Resource>* iterator = resourceList->getIterator();
-  Resource* enumRes = iterator->nextElement();
+  Resource* enumRes = iterator->firstElement();
   while (enumRes)
     {
@@ -521,5 +520,5 @@
   //  Resource* enumRes = resourceList->enumerate();
   tIterator<Resource>* iterator = resourceList->getIterator();
-  Resource* enumRes = iterator->nextElement();
+  Resource* enumRes = iterator->firstElement();
   while (enumRes)
     {
@@ -603,5 +602,5 @@
   //  Resource* enumRes = resourceList->enumerate();
   tIterator<Resource>* iterator = resourceList->getIterator();
-  Resource* enumRes = iterator->nextElement();
+  Resource* enumRes = iterator->firstElement();
   while (enumRes)
     {
@@ -799,5 +798,5 @@
   PRINT(0)(" List of Image-Directories: ");
   tIterator<char>* tmpIt = imageDirs->getIterator();
-  char* tmpDir = tmpIt->nextElement();
+  char* tmpDir = tmpIt->firstElement();
   while(tmpDir)
     {
@@ -810,5 +809,5 @@
   PRINT(0)("List of all stored Resources:\n");
   tIterator<Resource>* iterator = resourceList->getIterator();
-  Resource* enumRes = iterator->nextElement();
+  Resource* enumRes = iterator->firstElement();
   while (enumRes)
     {
Index: /trunk/src/util/shell.cc
===================================================================
--- /trunk/src/util/shell.cc	(revision 5114)
+++ /trunk/src/util/shell.cc	(revision 5115)
@@ -91,5 +91,5 @@
   // delete all the Chars in the Buffers
   tIterator<char>* charIterator = this->buffer->getIterator();
-  char* charElem = charIterator->nextElement();
+  char* charElem = charIterator->firstElement();
   while (charElem != NULL)
   {
@@ -191,5 +191,5 @@
   // delete all the Chars in the Buffers
   tIterator<char>* charIterator = this->buffer->getIterator();
-  char* charElem = charIterator->nextElement();
+  char* charElem = charIterator->firstElement();
 
   while (charElem != NULL)
@@ -289,5 +289,5 @@
 {
   tIterator<char>* charIterator = this->buffer->getIterator();
-  char* charElem = charIterator->nextElement();
+  char* charElem = charIterator->firstElement();
 
   int i = 1;
@@ -606,5 +606,5 @@
     addLength = strlen(addString);
   tIterator<const char>* charIterator = stringList->getIterator();
-  const char* charElem = charIterator->nextElement();
+  const char* charElem = charIterator->firstElement();
   while (charElem != NULL)
   {
@@ -655,5 +655,5 @@
 
   tIterator<const char>* iterator = inputList->getIterator();
-  const char* enumString = iterator->nextElement();
+  const char* enumString = iterator->firstElement();
   while (enumString != NULL)
   {
@@ -687,5 +687,5 @@
 
   tIterator<BaseObject>* iterator = inputList->getIterator();
-  BaseObject* enumBO = iterator->nextElement();
+  BaseObject* enumBO = iterator->firstElement();
   while (enumBO != NULL)
   {
Index: /trunk/src/util/track/track_manager.cc
===================================================================
--- /trunk/src/util/track/track_manager.cc	(revision 5114)
+++ /trunk/src/util/track/track_manager.cc	(revision 5115)
@@ -79,5 +79,5 @@
     {
       tIterator<TrackElement>* iterator = this->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       while (enumElem)
         {
@@ -104,5 +104,5 @@
     {
       tIterator<TrackElement>* iterator = this->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       TrackElement* tmpElem;
       while (enumElem)
@@ -133,5 +133,5 @@
     {
       tIterator<TrackElement>* iterator = this->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       TrackElement* tmpElem;
       while (enumElem)
@@ -179,5 +179,5 @@
     {
       tIterator<TrackElement>* iterator = this->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       while (enumElem)
         {
@@ -206,5 +206,5 @@
 
   tIterator<TrackElement>* iterator = this->children->getIterator();
-  TrackElement* enumElem = iterator->nextElement();
+  TrackElement* enumElem = iterator->firstElement();
   for (int i = 0; i < childCount; i++)
     enumElem = iterator->nextElement();
@@ -234,5 +234,5 @@
       //TrackElement* enumElem = this->children->enumerate();
       tIterator<TrackElement>* iterator = this->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       while (enumElem)
         {
@@ -331,5 +331,5 @@
   //TrackElement* enumElem = this->children->enumerate();
   tIterator<TrackElement>* iterator = this->children->getIterator();
-  TrackElement* enumElem = iterator->nextElement();
+  TrackElement* enumElem = iterator->firstElement();
   while (enumElem)
     {
@@ -975,5 +975,5 @@
       //TrackElement* enumElem = firstJoint->children->enumerate();
       tIterator<TrackElement>* iterator = firstJoint->children->getIterator();
-      TrackElement* enumElem = iterator->nextElement();
+      TrackElement* enumElem = iterator->firstElement();
       while (enumElem)
         {
@@ -1001,5 +1001,5 @@
         {
           tIterator<TrackElement>* iterator = tmpElem->children->getIterator();
-          TrackElement* enumElem = iterator->nextElement();
+          TrackElement* enumElem = iterator->firstElement();
           //TrackElement* enumElem = tmpElem->children->enumerate();
           while (enumElem)
Index: /trunk/src/world_entities/test_entity.cc
===================================================================
--- /trunk/src/world_entities/test_entity.cc	(revision 5114)
+++ /trunk/src/world_entities/test_entity.cc	(revision 5115)
@@ -46,4 +46,5 @@
 {
   delete this->md2Model;
+  this->obbTree = NULL;
 }
 
