Index: orxonox/trunk/src/camera.cc
===================================================================
--- orxonox/trunk/src/camera.cc	(revision 3541)
+++ orxonox/trunk/src/camera.cc	(revision 3543)
@@ -51,4 +51,16 @@
 Camera::~Camera ()
 {
+  this->destroy();
+}
+
+/**
+   \brief deletes all allocated memory
+*/
+void Camera::destroy(void)
+{
+  this->bound = NULL;
+  this->world = NULL;
+
+  static_cast<WorldEntity*>(this)->destroy();
 }
 
@@ -275,11 +287,2 @@
 
 
-/**
-   \brief destroy, reset the camera so that it doesn't perform anything anymore
-
-*/
-void Camera::destroy()
-{
-  this->bound = NULL;
-  this->world = NULL;
-}
Index: orxonox/trunk/src/camera.h
===================================================================
--- orxonox/trunk/src/camera.h	(revision 3541)
+++ orxonox/trunk/src/camera.h	(revision 3543)
@@ -7,7 +7,5 @@
 #define _CAMERA_H
 
-#include "stdincl.h"
 #include "world_entity.h"
-
 
 class World;
@@ -56,10 +54,10 @@
  public:
   Camera (World* world);
-  ~Camera ();
+  virtual ~Camera ();
+  void destroy(void);
   
   void timeSlice (Uint32 deltaT);
   void apply ();
   void bind (WorldEntity* entity);
-  void destroy();
 
   void setWorld(World* world);  
Index: orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
===================================================================
--- orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 3541)
+++ orxonox/trunk/src/glmenu/glmenu_imagescreen.cc	(revision 3543)
@@ -19,4 +19,5 @@
 #include "glmenu_imagescreen.h"
 
+#include "stdincl.h"
 #include "material.h"
 
@@ -27,5 +28,5 @@
 GLMenuImageScreen* GLMenuImageScreen::getInstance()
 {
-  if( singletonRef == NULL)
+  if(!singletonRef)
     singletonRef = new GLMenuImageScreen ();
   return singletonRef;
@@ -45,13 +46,22 @@
 /**
    \brief standard deconstructor
+*/
+GLMenuImageScreen::~GLMenuImageScreen() 
+{
+  this->destroy();
+}
+
+/**
+   \brief deletes all alocated Memory and also deletes everything from the Class this one is erived from
 
    \todo this deconstructor is not jet implemented - do it
 */
-GLMenuImageScreen::~GLMenuImageScreen() 
+void GLMenuImageScreen::destroy(void)
 {
   if (backMat)
     delete backMat;
-}
-
+
+  static_cast<BaseObject*>(this)->destroy();
+}
 
 /**
Index: orxonox/trunk/src/glmenu/glmenu_imagescreen.h
===================================================================
--- orxonox/trunk/src/glmenu/glmenu_imagescreen.h	(revision 3541)
+++ orxonox/trunk/src/glmenu/glmenu_imagescreen.h	(revision 3543)
@@ -8,6 +8,6 @@
 #define _GLMENU_IMAGESCREEN_H
 
-#include "stdincl.h"
-class Texture;
+#include "base_object.h"
+
 class Material;
 
@@ -19,4 +19,5 @@
  public:
   ~GLMenuImageScreen ();
+  void destroy(void);
 
   static GLMenuImageScreen* getInstance();
Index: orxonox/trunk/src/keynames.cc
===================================================================
--- orxonox/trunk/src/keynames.cc	(revision 3541)
+++ orxonox/trunk/src/keynames.cc	(revision 3543)
@@ -15,4 +15,6 @@
 
 #include "keynames.h"
+
+#include "stdincl.h"
 
 #include <string.h>
Index: orxonox/trunk/src/keynames.h
===================================================================
--- orxonox/trunk/src/keynames.h	(revision 3541)
+++ orxonox/trunk/src/keynames.h	(revision 3543)
@@ -7,15 +7,4 @@
 #ifndef _KEYNAMES_H
 #define _KEYNAMES_H
-
-
-#ifdef __WIN32__
-#include <windows.h>
-#endif
-
-#ifndef __APPLE__
-#include <SDL/SDL.h>
-#else
-#include <SDL.h>
-#endif
 
 /**
Index: orxonox/trunk/src/lib/coord/null_parent.cc
===================================================================
--- orxonox/trunk/src/lib/coord/null_parent.cc	(revision 3541)
+++ orxonox/trunk/src/lib/coord/null_parent.cc	(revision 3543)
@@ -26,5 +26,5 @@
 NullParent* NullParent::getInstance ()
 {
-  if( singletonRef == NULL)
+  if(!singletonRef)
     singletonRef = new NullParent ();
   return singletonRef;
Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 3541)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 3543)
@@ -22,5 +22,7 @@
 
 #include "p_node.h"
+
 #include "null_parent.h"
+#include "vector.h"
 
 using namespace std;
Index: orxonox/trunk/src/lib/coord/p_node.h
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.h	(revision 3541)
+++ orxonox/trunk/src/lib/coord/p_node.h	(revision 3543)
@@ -22,8 +22,10 @@
 #define _P_NODE_H
 
-#include "stdincl.h"
+#include "base_object.h"
 
-
+// FORWARD DEFINITION \\
 class PNode; /* forward decleration, so that parentEntry has access to PNode */
+class Quaternion;
+class Vector;
 
 //! enumeration for the different translation-binding-types
Index: orxonox/trunk/src/light.cc
===================================================================
--- orxonox/trunk/src/light.cc	(revision 3541)
+++ orxonox/trunk/src/light.cc	(revision 3543)
@@ -52,4 +52,15 @@
 Light::~Light () 
 {
+  this->destroy();
+}
+
+
+/**
+   \brief frees all alocated memory
+
+   and in this case also deletes the lightSources and GL_LIGHTING
+*/
+void Light::destroy(void)
+{
   glDisable(GL_LIGHTING);
   
@@ -58,5 +69,8 @@
   delete lights;
   Light::singletonRef = NULL;
-}
+
+  static_cast<WorldEntity*>(this)->destroy();
+}
+
 
 /**
Index: orxonox/trunk/src/light.h
===================================================================
--- orxonox/trunk/src/light.h	(revision 3541)
+++ orxonox/trunk/src/light.h	(revision 3543)
@@ -60,5 +60,7 @@
  public:
   static Light* getInstance();
-  ~Light(void);
+  virtual ~Light(void);
+  void destroy(void);
+
 
   // set Attributes
Index: orxonox/trunk/src/orxonox.cc
===================================================================
--- orxonox/trunk/src/orxonox.cc	(revision 3541)
+++ orxonox/trunk/src/orxonox.cc	(revision 3543)
@@ -48,4 +48,12 @@
 Orxonox::~Orxonox () 
 {
+  this->destroy();
+}
+
+/**
+   \brief destroys orxonox. Frees al memory and so on.
+*/
+void Orxonox::destroy(void)
+{
   Orxonox::singletonRef = NULL;
   if( world != NULL) delete world;
@@ -53,6 +61,7 @@
   if( localcamera != NULL) delete localcamera;
   if( resources != NULL) delete resources;
-}
-
+
+  
+}
 
 /** \brief this is a singleton class to prevent duplicates */
Index: orxonox/trunk/src/orxonox.h
===================================================================
--- orxonox/trunk/src/orxonox.h	(revision 3541)
+++ orxonox/trunk/src/orxonox.h	(revision 3543)
@@ -24,6 +24,7 @@
   static Orxonox* singletonRef;
   Orxonox ();
-  ~Orxonox ();
-  
+  virtual ~Orxonox ();
+  void destroy(void);
+
   char configfilename[256];   //!< Filename of the configuration-file.
   World* world;               //!< Reference to the current running world.
Index: orxonox/trunk/src/proto_class.cc
===================================================================
--- orxonox/trunk/src/proto_class.cc	(revision 3541)
+++ orxonox/trunk/src/proto_class.cc	(revision 3543)
@@ -19,4 +19,5 @@
 #include "proto_class.h"
 
+#include "stdincl.h" // maybe
 
 using namespace std;
@@ -35,9 +36,19 @@
 /**
    \brief standard deconstructor
-   \todo this deconstructor is not jet implemented - do it
 
 */
-ProtoClass::~ProtoClass () {}
+ProtoClass::~ProtoClass () 
+{
+  this->destroy();
+}
 
+/**
+   \brief deletes all data and also deletes all data from the class this is derived from
+*/
+ProtoClass::~destroy(void)
+{
+  // delete what has to be deleted here
+  static_cast<BaseObject*>(this)->destroy();
+}
 
 /**
Index: orxonox/trunk/src/proto_class.h
===================================================================
--- orxonox/trunk/src/proto_class.h	(revision 3541)
+++ orxonox/trunk/src/proto_class.h	(revision 3543)
@@ -11,5 +11,10 @@
 #define _PROTO_CLASS_H
 
-#include "stdincl.h"
+#include "what realy has to be included"
+#include "base_object.h"
+
+// FORWARD DEFINITION \\
+class someClassWeNeed;
+
 
 /*class Test;*/ /* forward definition of class Test (without including it here!)*/
@@ -22,6 +27,7 @@
 
  public:
-  ProtoClass ();
-  ~ProtoClass ();
+  ProtoClass();
+  virtual ~ProtoClass();
+  void destroy(void)
 
   bool doNonSense (int nothing);
Index: orxonox/trunk/src/story_entities/world.cc
===================================================================
--- orxonox/trunk/src/story_entities/world.cc	(revision 3541)
+++ orxonox/trunk/src/story_entities/world.cc	(revision 3543)
@@ -258,5 +258,5 @@
 
 	    //localCamera->setParent(TrackNode::getInstance());
-	    this->localPlayer->addChild (this->localCamera);
+	    TrackNode::getInstance()->addChild (this->localCamera);
 	    //Vector* cameraOffset = new Vector (0, 5, -10);
 	    Vector* cameraOffset = new Vector (-10, 5, 0);
Index: orxonox/trunk/src/track_manager.cc
===================================================================
--- orxonox/trunk/src/track_manager.cc	(revision 3541)
+++ orxonox/trunk/src/track_manager.cc	(revision 3543)
@@ -223,7 +223,14 @@
 /**
    \brief standard destructor
-
 */
 TrackManager::~TrackManager(void)
+{
+  this->destroy();
+}
+
+/**
+   \brief deletes all alocated Memory and also deletes everything from the Class this one is erived from
+*/
+void TrackManager::destroy(void)
 {
   PRINTF(3)("Destruct TrackManager\n");
@@ -234,6 +241,9 @@
   // we do not have a TrackManager anymore
   singletonRef = NULL;
-}
-
+  
+  static_cast<BaseObject*>(this)->destroy();
+}
+
+//! Singleton Reference to TrackManager
 TrackManager* TrackManager::singletonRef = NULL;
 
@@ -663,5 +673,5 @@
 
       Vector v(0.0, 1.0, 0.0);
-      Quaternion q(-1.57, v);
+      Quaternion q(-PI/2, v);
       //this->relDirection = this->relDirection * q;
       quat = quat * q;
Index: orxonox/trunk/src/track_manager.h
===================================================================
--- orxonox/trunk/src/track_manager.h	(revision 3541)
+++ orxonox/trunk/src/track_manager.h	(revision 3543)
@@ -121,5 +121,6 @@
   
  public:
-  ~TrackManager(void);
+  virtual ~TrackManager(void);
+  void destroy(void);
   static TrackManager* getInstance(void);
 
