Index: branches/cleanup/src/util/Makefile.am
===================================================================
--- branches/cleanup/src/util/Makefile.am	(revision 10571)
+++ branches/cleanup/src/util/Makefile.am	(revision 10581)
@@ -24,10 +24,5 @@
 			animation/animation3d.cc \
 			animation/animation.cc \
-			animation/animation_player.cc \
-			\
-			track/pilot_node.cc \
-			track/track.cc \
-			track/track_manager.cc \
-			track/track_node.cc
+			animation/animation_player.cc
 
 noinst_HEADERS =        \
@@ -50,9 +45,3 @@
 			animation/animation.h \
 			animation/animation_player.h \
-			animation/t_animation.h \
-			\
-			track/pilot_node.h \
-			track/track.h \
-			track/track_manager.h \
-			track/track_node.h
-
+			animation/t_animation.h
Index: branches/cleanup/src/util/animation/animation.h
===================================================================
--- branches/cleanup/src/util/animation/animation.h	(revision 10571)
+++ branches/cleanup/src/util/animation/animation.h	(revision 10581)
@@ -10,5 +10,5 @@
 #include "debug.h"
 
-#include "list.h"
+#include <list>
 // FORWARD DECLARATION
 
Index: branches/cleanup/src/util/animation/animation3d.cc
===================================================================
--- branches/cleanup/src/util/animation/animation3d.cc	(revision 10571)
+++ branches/cleanup/src/util/animation/animation3d.cc	(revision 10581)
@@ -35,16 +35,12 @@
 
   // create a new List
-  this->keyFrameList = new tList<KeyFrame3D>();
-  KeyFrame3D* tmpKeyFrame = new KeyFrame3D;
-  tmpKeyFrame->position = Vector();
-  tmpKeyFrame->direction = Quaternion();
-  keyFrameList->add(tmpKeyFrame);
-
-  this->currentKeyFrame = tmpKeyFrame;
-  this->nextKeyFrame = tmpKeyFrame;
+  KeyFrame3D tmpKeyFrame;
+  keyFrameList.push_back(tmpKeyFrame);
+
+  this->currentKeyFrame = keyFrameList.begin();
+  this->nextKeyFrame = keyFrameList.begin();
 
   this->animFuncMov = NULL;//&Animation3D::mLinear;
   this->animFuncRot = NULL;//&Animation3D::rLinear;
-
 }
 
@@ -56,14 +52,4 @@
 Animation3D::~Animation3D()
 {
-  // delete all the KeyFrames
-  tIterator<KeyFrame3D>* itKF = keyFrameList->getIterator();
-  KeyFrame3D*  enumKF = itKF->firstElement();
-  while (enumKF)
-    {
-      delete enumKF;
-      enumKF = itKF->nextElement();
-    }
-  delete itKF;
-  delete this->keyFrameList;
 }
 
@@ -73,9 +59,9 @@
 void Animation3D::rewind()
 {
-  this->currentKeyFrame = keyFrameList->firstElement();
-  this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());
+  this->currentKeyFrame = keyFrameList.begin();
+  this->nextKeyFrame = keyFrameList.begin()++;
   this->localTime = 0.0;
-  this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
-  this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
+  this->setAnimFuncMov((*this->currentKeyFrame).animFuncMov);
+  this->setAnimFuncRot((*this->currentKeyFrame).animFuncRot);
 }
 
@@ -100,10 +86,9 @@
 //    animFuncRot = animFuncMov;
 
-  KeyFrame3D* tmpKeyFrame;
+  KeyFrame3D& tmpKeyFrame = keyFrameList.front();
 
   // when adding the first frame
   if (this->keyFrameCount == 0)
     {
-      tmpKeyFrame = this->keyFrameList->firstElement();
       //this->setAnimFuncMov(animFuncMov);
       //this->setAnimFuncRot(animFuncRot);
@@ -111,17 +96,16 @@
   else
     {
-      tmpKeyFrame = new KeyFrame3D;
       // when adding the second frame
+      this->keyFrameList.push_back(KeyFrame3D());
       if (this->currentKeyFrame == this->nextKeyFrame)
-        this->nextKeyFrame = tmpKeyFrame;
-      this->keyFrameList->add(tmpKeyFrame);
+        this->nextKeyFrame = --keyFrameList.end();
     }
 
-  tmpKeyFrame->position = position;
+  tmpKeyFrame.position = position;
   //tmpKeyFrame->lastPosition = position;
-  tmpKeyFrame->direction = direction;
-  tmpKeyFrame->duration = duration;
-  tmpKeyFrame->animFuncMov = animFuncMov;
-  tmpKeyFrame->animFuncRot = animFuncRot;
+  tmpKeyFrame.direction = direction;
+  tmpKeyFrame.duration = duration;
+  tmpKeyFrame.animFuncMov = animFuncMov;
+  tmpKeyFrame.animFuncRot = animFuncRot;
   this->keyFrameCount++;
 }
@@ -146,7 +130,8 @@
               this->currentKeyFrame = this->nextKeyFrame;
               // checking, if we should still Play the animation
-              if (this->currentKeyFrame == this->keyFrameList->lastElement())
+              if (this->currentKeyFrame == --this->keyFrameList.end())
                 this->handleInfinity();
-              this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
+              this->nextKeyFrame = this->currentKeyFrame;
+	      this->nextKeyFrame++;
               this->setAnimFuncMov(this->currentKeyFrame->animFuncMov);
               this->setAnimFuncRot(this->currentKeyFrame->animFuncRot);
Index: branches/cleanup/src/util/animation/animation3d.h
===================================================================
--- branches/cleanup/src/util/animation/animation3d.h	(revision 10571)
+++ branches/cleanup/src/util/animation/animation3d.h	(revision 10581)
@@ -16,5 +16,6 @@
    This represents one point with direction of the animation
 */
-typedef struct KeyFrame3D {
+typedef struct KeyFrame3D
+{
   float             duration;              //!< The duration of this KeyFrame
   Vector            position;              //!< The position of this KeyFrame
@@ -31,5 +32,5 @@
 class Animation3D : public Animation
 {
- public:
+public:
   Animation3D(PNode* object);
   virtual ~Animation3D();
@@ -44,5 +45,5 @@
   virtual void tick(float dt);
 
- private:
+private:
   // animation functions
   void setAnimFuncMov(ANIM_FUNCTION animFunc);
@@ -69,8 +70,11 @@
 
 
- private:
-  KeyFrame3D*          currentKeyFrame;               //!< The current KeyFrame
-  KeyFrame3D*          nextKeyFrame;                  //!< The KeyFrame we iterate to
-  tList<KeyFrame3D>*   keyFrameList;                  //!< The KeyFrameList
+private:
+  typedef std::list<KeyFrame3D>  KeyFrameList;        //!< A Type definition for th KeyFrame List
+  typedef KeyFrameList::iterator KeyFrameIterator;        //!< A Type definition for th KeyFrame List
+
+  KeyFrameIterator     currentKeyFrame;               //!< The current KeyFrame
+  KeyFrameIterator     nextKeyFrame;                  //!< The KeyFrame we iterate to
+  KeyFrameList         keyFrameList;                  //!< The KeyFrameList
 
 
Index: branches/cleanup/src/util/animation/t_animation.h
===================================================================
--- branches/cleanup/src/util/animation/t_animation.h	(revision 10571)
+++ branches/cleanup/src/util/animation/t_animation.h	(revision 10581)
@@ -1,12 +1,12 @@
 /*
    orxonox - the future of 3D-vertical-scrollers
-
+ 
    Copyright (C) 2004 orx
-
+ 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
    any later version.
-
+ 
    ### File Specific:
    main-programmer: Benjamin Grauer
@@ -37,7 +37,6 @@
 template<class T> class tAnimation : public Animation
 {
- public:
+public:
   tAnimation(T* object = NULL, void (T::*funcToAnim)(float) = NULL);
-  virtual ~tAnimation();
 
   void setFuncToAnim(T* object, void (T::*funcToAnim)(float));
@@ -48,5 +47,5 @@
   virtual void tick(float dt);
 
- private:
+private:
   // animation functions
   void setAnimFunc(ANIM_FUNCTION animFunc);
@@ -61,10 +60,14 @@
 
 
+private:
+  typedef std::list<KeyFrameF> KeyFrameList;
+  typedef typename KeyFrameList::iterator KeyFrameIterator;
+
   //  ANIM_FUNCTION animFunc
   float (tAnimation<T>::*animFunc)(float) const;  //!< A Function for the AnimationType
 
-  KeyFrameF* currentKeyFrame;                     //!< The current KeyFrame
-  KeyFrameF* nextKeyFrame;                        //!< The KeyFrame we iterate to
-  tList<KeyFrameF>* keyFrameList;                 //!< The KeyFrameList
+  KeyFrameIterator   currentKeyFrame;                     //!< The current KeyFrame
+  KeyFrameIterator   nextKeyFrame;                        //!< The KeyFrame we iterate to
+  KeyFrameList       keyFrameList;                 //!< The KeyFrameList
 
   T* object;                                      //!< The Object from which to Animate something
@@ -83,12 +86,11 @@
 {
   // create a new List
-  this->keyFrameList = new tList<KeyFrameF>();
-  KeyFrameF* tmpKeyFrame = new KeyFrameF;
-  tmpKeyFrame->value = 0.0;
-  tmpKeyFrame->duration = 1.0;
-  keyFrameList->add(tmpKeyFrame);
-
-  this->currentKeyFrame = tmpKeyFrame;
-  this->nextKeyFrame = tmpKeyFrame;
+  KeyFrameF tmpKeyFrame;
+  tmpKeyFrame.value = 0.0;
+  tmpKeyFrame.duration = 1.0;
+  keyFrameList.push_back(tmpKeyFrame);
+
+  this->currentKeyFrame = keyFrameList.begin();
+  this->nextKeyFrame = keyFrameList.begin();
 
   this->animFunc = &tAnimation<T>::linear;
@@ -99,24 +101,4 @@
 
 /**
- *  standard deconstructor
-
-   deletes all the Keyframes
-*/
-template<class T>
-tAnimation<T>::~tAnimation ()
-{
-  // delete all the KeyFrames
-  tIterator<KeyFrameF>* itKF = keyFrameList->getIterator();
-  KeyFrameF*  enumKF = itKF->firstElement();
-  while (enumKF)
-    {
-      delete enumKF;
-      enumKF = itKF->nextElement();
-    }
-  delete itKF;
-  delete this->keyFrameList;
-}
-
-/**
  *  rewinds the Animation to the beginning (first KeyFrame and time == 0)
 */
@@ -124,8 +106,8 @@
 void tAnimation<T>::rewind()
 {
-  this->currentKeyFrame = keyFrameList->firstElement();
-  this->nextKeyFrame = keyFrameList->nextElement(keyFrameList->firstElement());
+  this->currentKeyFrame = keyFrameList.begin();
+  this->nextKeyFrame = ++keyFrameList.begin();
   this->localTime = 0.0;
-  this->setAnimFunc(this->currentKeyFrame->animFunc);
+  this->setAnimFunc((*this->currentKeyFrame).animFunc);
 }
 
@@ -157,24 +139,23 @@
     animFunc = ANIM_DEFAULT_FUNCTION;
 
-  KeyFrameF* tmpKeyFrame;
+  KeyFrameF& tmpKeyFrame = keyFrameList.front();
 
   // when adding the first frame
   if (this->keyFrameCount == 0)
-    {
-      tmpKeyFrame = this->keyFrameList->firstElement();
-      this->setAnimFunc(animFunc);
-    }
+  {
+    this->setAnimFunc(animFunc);
+  }
   else
-    {
-      tmpKeyFrame = new KeyFrameF;
-      // when adding the second frame
-      if (this->currentKeyFrame == this->nextKeyFrame)
-        this->nextKeyFrame = tmpKeyFrame;
-      this->keyFrameList->add(tmpKeyFrame);
-    }
-
-  tmpKeyFrame->value = value;
-  tmpKeyFrame->duration = duration;
-  tmpKeyFrame->animFunc = animFunc;
+  {
+    this->keyFrameList.push_back(KeyFrameF());
+    tmpKeyFrame = keyFrameList.back();
+    // when adding the second frame
+    if (this->currentKeyFrame == this->nextKeyFrame)
+      this->nextKeyFrame = --keyFrameList.end();
+  }
+
+  tmpKeyFrame.value = value;
+  tmpKeyFrame.duration = duration;
+  tmpKeyFrame.animFunc = animFunc;
   this->keyFrameCount++;
 }
@@ -188,30 +169,31 @@
 {
   if (this->bRunning)
+  {
+    this->localTime += dt;
+    if (localTime >= this->currentKeyFrame->duration)
     {
-      this->localTime += dt;
-      if (localTime >= this->currentKeyFrame->duration)
-        {
-          if (likely(this->keyFramesToPlay != 0))
-            {
-              if (unlikely(this->keyFramesToPlay > 0))
-                --this->keyFramesToPlay;
-              // switching to the next Key-Frame
-              this->localTime -= this->currentKeyFrame->duration;
-
-              this->currentKeyFrame = this->nextKeyFrame;
-              // checking, if we should still Play the animation
-              if (this->currentKeyFrame == this->keyFrameList->lastElement())
-                this->handleInfinity();
-              this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame);
-
-              //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
-              this->setAnimFunc(this->currentKeyFrame->animFunc);
-            }
-          else
-            this->pause();
-        }
-
-      (this->object->*(funcToAnim))((this->*animFunc)(this->localTime));
+      if (likely(this->keyFramesToPlay != 0))
+      {
+        if (unlikely(this->keyFramesToPlay > 0))
+          --this->keyFramesToPlay;
+        // switching to the next Key-Frame
+        this->localTime -= this->currentKeyFrame->duration;
+
+        this->currentKeyFrame = this->nextKeyFrame;
+        // checking, if we should still Play the animation
+        if (this->currentKeyFrame == --this->keyFrameList.end())
+          this->handleInfinity();
+        this->nextKeyFrame = this->currentKeyFrame;
+	this->nextKeyFrame++;
+
+        //printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value);
+        this->setAnimFunc(this->currentKeyFrame->animFunc);
+      }
+      else
+        this->pause();
     }
+
+    (this->object->*(funcToAnim))((this->*animFunc)(this->localTime));
+  }
 }
 
@@ -224,32 +206,32 @@
 {
   switch (animFunc)
-    {
-    default:
-    case ANIM_CONSTANT:
-      this->animFunc = &tAnimation<T>::constant;
-      break;
-    case ANIM_LINEAR:
-      this->animFunc = &tAnimation<T>::linear;
-      break;
-    case ANIM_SINE:
-      this->animFunc = &tAnimation<T>::sine;
-      break;
-    case ANIM_COSINE:
-      this->animFunc = &tAnimation<T>::cosine;
-      break;
-    case ANIM_EXP:
-      this->animFunc = &tAnimation<T>::exp;
-      break;
-    case ANIM_NEG_EXP:
-        this->animFunc = &tAnimation<T>::negExp;
-        expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
-        break;
-    case ANIM_QUADRATIC:
-      this->animFunc = &tAnimation<T>::quadratic;
-      break;
-    case ANIM_RANDOM:
-      this->animFunc = &tAnimation<T>::random;
-      break;
-    }
+  {
+  default:
+  case ANIM_CONSTANT:
+    this->animFunc = &tAnimation<T>::constant;
+    break;
+  case ANIM_LINEAR:
+    this->animFunc = &tAnimation<T>::linear;
+    break;
+  case ANIM_SINE:
+    this->animFunc = &tAnimation<T>::sine;
+    break;
+  case ANIM_COSINE:
+    this->animFunc = &tAnimation<T>::cosine;
+    break;
+  case ANIM_EXP:
+    this->animFunc = &tAnimation<T>::exp;
+    break;
+  case ANIM_NEG_EXP:
+    this->animFunc = &tAnimation<T>::negExp;
+    expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
+    break;
+  case ANIM_QUADRATIC:
+    this->animFunc = &tAnimation<T>::quadratic;
+    break;
+  case ANIM_RANDOM:
+    this->animFunc = &tAnimation<T>::random;
+    break;
+  }
 }
 
@@ -274,5 +256,5 @@
 {
   return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
-    * (timePassed / this->currentKeyFrame->duration);
+         * (timePassed / this->currentKeyFrame->duration);
 }
 
@@ -286,8 +268,8 @@
   if (timePassed * 2.0 < this->currentKeyFrame->duration)
     return this->currentKeyFrame->value + (this->nextKeyFrame->value - this->currentKeyFrame->value)
-      * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;
+           * sin( M_PI * timePassed / this->currentKeyFrame->duration)/2;
   else
     return this->nextKeyFrame->value - (this->nextKeyFrame->value - this->currentKeyFrame->value)
-      * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;
+           * sin( M_PI * (1.0 - timePassed / this->currentKeyFrame->duration))/2;
   /*
   printf("::%f::::%f::\n",timePassed/this->currentKeyFrame->duration,retVal);
@@ -304,6 +286,6 @@
 {
   return ((this->nextKeyFrame->value + this->currentKeyFrame->value) +
-    (this->currentKeyFrame->value - this->nextKeyFrame->value) *
-    cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;
+          (this->currentKeyFrame->value - this->nextKeyFrame->value) *
+          cos( M_PI * timePassed / this->currentKeyFrame->duration))/2;
 }
 
@@ -348,6 +330,6 @@
 {
   return this->currentKeyFrame->value +
-    (this->nextKeyFrame->value - this->currentKeyFrame->value) *
-    (float)rand()/(float)RAND_MAX;
+         (this->nextKeyFrame->value - this->currentKeyFrame->value) *
+         (float)rand()/(float)RAND_MAX;
 }
 
