Index: code/branches/ogre/src/core/CoreIncludes.h
===================================================================
--- code/branches/ogre/src/core/CoreIncludes.h	(revision 1241)
+++ code/branches/ogre/src/core/CoreIncludes.h	(revision 1243)
@@ -59,5 +59,7 @@
     if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
         this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \
-    orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this)
+    orxonox::ClassManager<ClassName>::getIdentifier()->addObject(this); \
+    if (orxonox::Identifier::isCreatingHierarchy()) \
+      return
 
 /**
Index: code/branches/ogre/src/orxonox/GraphicsEngine.cc
===================================================================
--- code/branches/ogre/src/orxonox/GraphicsEngine.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/GraphicsEngine.cc	(revision 1243)
@@ -44,5 +44,4 @@
 #include "core/ConfigValueIncludes.h"
 #include "core/Debug.h"
-#include "core/TclBind.h"
 
 
@@ -65,6 +64,4 @@
   {
     RegisterObject(GraphicsEngine);
-    //this->bOverwritePath_ = false;
-    this->setConfigValues();
     // set to standard values
     this->configPath_ = "";
@@ -72,4 +69,5 @@
     this->scene_ = 0;
     this->renderWindow_ = 0;
+    this->setConfigValues();
     COUT(4) << "*** GraphicsEngine: Constructed" << std::endl;
   }
@@ -113,6 +111,4 @@
     SetConfigValue(ogreLogLevelNormal_  , 4).description("Corresponding orxonox debug level for ogre Normal");
     SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical");
-
-    TclBind::getInstance().setDataPath(this->dataPath_);
   }
 
@@ -120,13 +116,15 @@
     @brief Creates the Ogre Root object and sets up the ogre log.
   */
-  void GraphicsEngine::setup()
-  {
+  bool GraphicsEngine::setup(std::string& dataPath)
+  {
+    // temporary overwrite of dataPath, change ini file for permanent change
+    if (dataPath != "")
+      dataPath_ = dataPath;
+    if (dataPath_ == "")
+      return false;
+    if (dataPath_[dataPath_.size() - 1] != '/')
+      dataPath_ += "/";
+
     //TODO: Check if file exists (maybe not here)
-/*#ifndef OGRE_STATIC_LIB
-    root_ = new Ogre::Root(configPath_ + "plugins.cfg", configPath_ + "ogre.cfg",
-                     configPath_ + "Ogre.log");
-#else
-    root_ = new Ogre::Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");
-#endif*/
 #if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && defined(_DEBUG)
     std::string plugin_filename = "plugins_d.cfg";
@@ -158,40 +156,12 @@
     root_ = new Ogre::Root(plugin_filename);
     COUT(4) << "*** GraphicsEngine: Creating Ogre Root done" << std::endl;
-  }
-
-  /**
-   * @return scene manager
-   */
-  Ogre::SceneManager* GraphicsEngine::getSceneManager()
-  {
-    if(!scene_)
-    {
-      scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
-      COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
-    }
-    return scene_;
-  }
-
-  bool GraphicsEngine::load(std::string dataPath)
-  {
-    // temporary overwrite of dataPath, change ini file for permanent change
-    if( dataPath != "" )
-      dataPath_ = dataPath + "/";
-    loadRessourceLocations(this->dataPath_);
-    if (!root_->restoreConfig() && !root_->showConfigDialog())
-      return false;
+
+    // specify where Ogre has to look for resources. This call doesn't parse anything yet!
+    declareRessourceLocations();
+
     return true;
   }
 
-  void GraphicsEngine::initialise()
-  {
-    this->renderWindow_ = root_->initialise(true, "OrxonoxV2");
-    Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, this);
-    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
-    //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load...
-    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-  }
-
-  void GraphicsEngine::loadRessourceLocations(std::string dataPath)
+  void GraphicsEngine::declareRessourceLocations()
   {
     //TODO: Specify layout of data file and maybe use xml-loader
@@ -199,5 +169,5 @@
     // Load resource paths from data file using configfile ressource type
     Ogre::ConfigFile cf;
-    cf.load(dataPath + "resources.cfg");
+    cf.load(dataPath_ + "resources.cfg");
 
     // Go through all sections & settings in the file
@@ -216,8 +186,39 @@
 
         Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
-                                           std::string(dataPath + archName),
+                                           std::string(dataPath_ + archName),
                                            typeName, secName);
       }
     }
+  }
+
+  bool GraphicsEngine::loadRenderer()
+  {
+    if (!root_->restoreConfig() && !root_->showConfigDialog())
+      return false;
+
+    this->renderWindow_ = root_->initialise(true, "OrxonoxV2");
+    if (!root_->isInitialised())
+      return false;
+    Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, this);
+    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    return true;
+  }
+
+  void GraphicsEngine::initialiseResources()
+  {
+    //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load...
+    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+  }
+
+  /**
+   * @brief Creates the SceneManager
+   */
+  bool GraphicsEngine::createNewScene()
+  {
+    if (scene_)
+      return false;
+    scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
+    COUT(3) << "Info: Created SceneManager: " << scene_ << std::endl;
+    return true;
   }
 
@@ -291,5 +292,5 @@
     }
     OutputHandler::getOutStream().setOutputLevel(orxonoxLevel)
-        << "*** Ogre: " << message << std::endl;
+        << "Ogre: " << message << std::endl;
   }
 
Index: code/branches/ogre/src/orxonox/GraphicsEngine.h
===================================================================
--- code/branches/ogre/src/orxonox/GraphicsEngine.h	(revision 1241)
+++ code/branches/ogre/src/orxonox/GraphicsEngine.h	(revision 1243)
@@ -52,16 +52,18 @@
     @brief Graphics engine manager class
     */
-    class _OrxonoxExport GraphicsEngine : public Ogre::WindowEventListener, public OrxonoxClass, public Ogre::LogListener
+    class _OrxonoxExport GraphicsEngine : public Ogre::WindowEventListener, public Ogre::LogListener, public OrxonoxClass
     {
-        friend class ClassIdentifier<GraphicsEngine>;
         public:
-            void setConfigPath(std::string path) { this->configPath_ = path; };
             void setConfigValues();
-            void setup();
-            bool load(std::string path);
-            void loadRessourceLocations(std::string path);
-            Ogre::SceneManager* getSceneManager();
-            void initialise();
+            bool setup(std::string& dataPath);
+            void declareRessourceLocations();
+            bool loadRenderer();
+            void initialiseResources();
+            bool createNewScene();
+
             void destroy();
+
+            Ogre::SceneManager* getSceneManager() { return scene_; }
+            std::string& getDataPath() { return dataPath_; }
 
             // several window properties
@@ -71,10 +73,10 @@
             int getWindowHeight() const;
 
-            static GraphicsEngine& getSingleton();
-            static GraphicsEngine* getSingletonPtr() { return &getSingleton(); }
-
             void windowMoved(Ogre::RenderWindow* rw);
             void windowResized(Ogre::RenderWindow* rw);
             void windowFocusChanged(Ogre::RenderWindow* rw);
+
+            static GraphicsEngine& getSingleton();
+            static GraphicsEngine* getSingletonPtr() { return &getSingleton(); }
 
         private:
Index: code/branches/ogre/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/ogre/src/orxonox/Orxonox.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/Orxonox.cc	(revision 1243)
@@ -65,4 +65,5 @@
 #include "core/InputBuffer.h"
 #include "core/InputManager.h"
+#include "core/TclBind.h"
 
 // audio
@@ -166,6 +167,5 @@
     this->ogre_ = &GraphicsEngine::getSingleton();
     this->timer_ = 0;
-    this->dataPath_ = "";
-    this->auMan_ = 0;
+    //this->auMan_ = 0;
     this->orxonoxHUD_ = 0;
     this->inputHandler_ = 0;
@@ -186,6 +186,6 @@
     Loader::close();
     InputManager::destroy();
-    if (this->auMan_)
-      delete this->auMan_;
+    //if (this->auMan_)
+    //  delete this->auMan_;
     if (this->timer_)
       delete this->timer_;
@@ -196,14 +196,4 @@
     if (server_g)
       delete server_g;
-  }
-
-  /**
-    @brief Immediately deletes the orxonox object.
-    Never use if you can help it while rendering!
-  */
-  void Orxonox::abortImmediateForce()
-  {
-    COUT(1) << "*** Orxonox Error: Orxonox object was unexpectedly destroyed." << std::endl;
-    delete this;
   }
 
@@ -243,5 +233,5 @@
    * @param path path to config (in home dir or something)
    */
-  void Orxonox::init(int argc, char **argv, std::string path)
+  bool Orxonox::init(int argc, char **argv, std::string path)
   {
     //TODO: find config file (assuming executable directory)
@@ -249,57 +239,35 @@
     //TODO: give config file to Ogre
     std::string mode;
+    std::string dataPath;
 
     ArgReader ar(argc, argv);
     ar.checkArgument("mode", mode, false);
-    ar.checkArgument("data", this->dataPath_, false);
+    ar.checkArgument("data", dataPath, false);
     ar.checkArgument("ip", serverIp_, false);
-    if(ar.errorHandling()) abortImmediateForce();
-    if(mode == std::string("client"))
-    {
+    if(ar.errorHandling())
+      return false;
+
+    if (mode == "client")
       mode_ = CLIENT;
-      clientInit(path);
-    }
-    else if(mode== std::string("server")){
+    else if (mode == "server")
       mode_ = SERVER;
-      serverInit(path);
-    }
-    else{
+    else
       mode_ = STANDALONE;
-      standaloneInit(path);
-    }
-  }
-
-  void Orxonox::serverInit(std::string path)
-  {
-    COUT(2) << "initialising server" << std::endl;
-
-    ogre_->setConfigPath(path);
-    ogre_->setup();
-    //root_ = ogre_->getRoot();
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
-
-    server_g = new network::Server();
-  }
-
-  void Orxonox::clientInit(std::string path)
-  {
-    COUT(2) << "initialising client" << std::endl;\
-
-    ogre_->setConfigPath(path);
-    ogre_->setup();
-    if(serverIp_.compare("")==0)
-      client_g = new network::Client();
-    else
-      client_g = new network::Client(serverIp_, NETWORK_PORT);
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
-  }
-
-  void Orxonox::standaloneInit(std::string path)
-  {
-    COUT(2) << "initialising standalone mode" << std::endl;
-
-    ogre_->setConfigPath(path);
-    ogre_->setup();
-    if(!ogre_->load(this->dataPath_)) abortImmediateForce(/* unable to load */);
+
+    //if (mode_ == DEDICATED)
+      // TODO: decide what to do here
+    //else
+
+    // for playable server, client and standalone, the startup
+    // procedure until the GUI is the identical
+
+    TclBind::getInstance().setDataPath(dataPath);
+    ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
+    Factory::createClassHierarchy();
+
+    if (!ogre_->setup(path))       // creates ogre root and other essentials
+      return false;
+
+    return true;
   }
 
@@ -307,26 +275,67 @@
    * start modules
    */
-  void Orxonox::start()
-  {
-    switch(mode_){
+  bool Orxonox::start()
+  {
+    //if (mode == DEDICATED)
+    // do something else
+    //else
+
+    if (!ogre_->loadRenderer())    // creates the render window
+      return false;
+
+    // Calls the InputHandler which sets up the input devices.
+    // The render window width and height are used to set up the mouse movement.
+    if (!InputManager::initialise(ogre_->getWindowHandle(),
+          ogre_->getWindowWidth(), ogre_->getWindowHeight()))
+      return false;
+
+    // TODO: Spread this so that this call onyl initialises things needed for the GUI
+    ogre_->initialiseResources();
+
+    // TOOD: load the GUI here
+    // set InputManager to GUI mode
+    InputManager::setInputState(InputManager::IS_GUI);
+    // TODO: run GUI here
+
+    // The following lines depend very much on the GUI, so they're probably misplaced here..
+
+    InputManager::setInputState(InputManager::IS_NONE);
+
+    if (!loadPlayground())
+      return false;
+
+    switch (mode_)
+    {
+    case SERVER:
+      if (!serverLoad())
+        return false;
+      break;
     case CLIENT:
-      clientStart();
-      break;
-    case SERVER:
-      serverStart();
+      if (!clientLoad())
+        return false;
       break;
     default:
-      standaloneStart();
+      if (!standaloneLoad())
+        return false;
     }
-  }
-
-  void Orxonox::clientStart(){
-    ogre_->initialise();
-    ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
-    Factory::createClassHierarchy();
-
-
-    auMan_ = new audio::AudioManager();
-
+
+    InputManager::setInputState(InputManager::IS_NORMAL);
+
+    return startRenderLoop();
+  }
+
+  bool Orxonox::loadPlayground()
+  {
+    ogre_->createNewScene();
+
+	  // Init audio
+    //auMan_ = new audio::AudioManager();
+    //auMan_->ambientAdd("a1");
+    //auMan_->ambientAdd("a2");
+    //auMan_->ambientAdd("a3");
+    //auMan->ambientAdd("ambient1");
+    //auMan_->ambientStart();
+
+    // Load the HUD
     Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
     orxonoxHUD_ = new HUD();
@@ -335,91 +344,4 @@
     hudOverlay->show();
 
-    client_g->establishConnection();
-    client_g->tick(0);
-
-
-    //setupInputSystem();
-
-    startRenderLoop();
-  }
-
-  void Orxonox::serverStart(){
-    //TODO: start modules
-    ogre_->initialise();
-    //TODO: run engine
-    ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
-    Factory::createClassHierarchy();
-    createScene();
-    setupInputSystem();
-
-    server_g->open();
-
-    startRenderLoop();
-  }
-
-  void Orxonox::standaloneStart(){
-    //TODO: start modules
-    ogre_->initialise();
-    //TODO: run engine
-    ConfigFileManager::getSingleton()->setFile(CFT_Settings, "orxonox.ini");
-    Factory::createClassHierarchy();
-    createScene();
-    setupInputSystem();
-
-    startRenderLoop();
-  }
-
-  void Orxonox::createScene(void)
-  {
-	  // Init audio
-    auMan_ = new audio::AudioManager();
-
-    // load this file from config
-    Level* startlevel = new Level("levels/sample.oxw");
-    Loader::open(startlevel);
-
-    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
-    orxonoxHUD_ = new HUD();
-    orxonoxHUD_->setEnergyValue(20);
-    orxonoxHUD_->setEnergyDistr(20,20,60);
-    hudOverlay->show();
-
-	/*
-    auMan_->ambientAdd("a1");
-    auMan_->ambientAdd("a2");
-    auMan_->ambientAdd("a3");
-    //auMan->ambientAdd("ambient1");
-    auMan_->ambientStart();
-  */
-  }
-
-  /**
-    @brief Calls the InputHandler which sets up the input devices.
-    The render window width and height are used to set up the mouse movement.
-  */
-  void Orxonox::setupInputSystem()
-  {
-    if (!InputManager::initialise(ogre_->getWindowHandle(),
-          ogre_->getWindowWidth(), ogre_->getWindowHeight()))
-      abortImmediateForce();
-    InputManager::setInputState(InputManager::IS_NORMAL);
-  }
-
-  /**
-    Main loop of the orxonox game.
-    This is a new solution, using the ogre engine instead of being used by it.
-    An alternative solution would be to simply use the timer of the Root object,
-    but that implies using Ogre in any case. There would be no way to test
-    our code without the help of the root object.
-    There's even a chance that we can dispose of the root object entirely
-    in server mode.
-    About the loop: The design is almost exactly like the one in ogre, so that
-    if any part of ogre registers a framelisteners, it will still behave
-    correctly. Furthermore the time smoothing feature from ogre has been
-    implemented too. If turned on (see orxonox constructor), it will calculate
-    the dt_n by means of the recent most dt_n-1, dt_n-2, etc.
-  */
-  void Orxonox::startRenderLoop()
-  {
     InputBuffer* ib = dynamic_cast<InputBuffer*>(InputManager::getKeyHandler("buffer"));
     /*
@@ -432,5 +354,4 @@
     ib->registerListener(console, &Testconsole::exit, (char)0x1B, true);
     */
-
     orxonoxConsole_ = new InGameConsole(ib);
     ib->registerListener(orxonoxConsole_, &InGameConsole::listen, true);
@@ -441,9 +362,70 @@
     ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true);
 
+    return true;
+  }
+
+  bool Orxonox::serverLoad()
+  {
+    COUT(2) << "initialising server" << std::endl;
+
+    server_g = new network::Server();
+
+    if (!loadScene())
+      return false;
+
+    server_g->open();
+
+    return true;
+  }
+
+  bool Orxonox::clientLoad()
+  {
+    COUT(2) << "initialising client" << std::endl;\
+
+    if (serverIp_.compare("") == 0)
+      client_g = new network::Client();
+    else
+      client_g = new network::Client(serverIp_, NETWORK_PORT);
+
+    client_g->establishConnection();
+    client_g->tick(0);
+
+    return true;
+  }
+
+  bool Orxonox::standaloneLoad()
+  {
+    COUT(2) << "initialising standalone mode" << std::endl;
+
+    if (!loadScene())
+      return false;
+
+    return true;
+  }
+
+  bool Orxonox::loadScene()
+  {
+    Level* startlevel = new Level("levels/sample.oxw");
+    Loader::open(startlevel);
+
+    return true;
+  }
+
+
+  /**
+    Main loop of the orxonox game.
+    About the loop: The design is almost exactly like the one in ogre, so that
+    if any part of ogre registers a framelisteners, it will still behave
+    correctly. Furthermore the time smoothing feature from ogre has been
+    implemented too. If turned on (see orxonox constructor), it will calculate
+    the dt_n by means of the recent most dt_n-1, dt_n-2, etc.
+  */
+  bool Orxonox::startRenderLoop()
+  {
     // first check whether ogre root object has been created
     if (Ogre::Root::getSingletonPtr() == 0)
     {
       COUT(2) << "*** Orxonox Error: Could not start rendering. No Ogre root object found" << std::endl;
-      return;
+      return false;
     }
     Ogre::Root& ogreRoot = Ogre::Root::getSingleton();
@@ -510,4 +492,6 @@
       ogreRoot._fireFrameEnded(evt);
 	  }
+
+    return true;
   }
 
Index: code/branches/ogre/src/orxonox/Orxonox.h
===================================================================
--- code/branches/ogre/src/orxonox/Orxonox.h	(revision 1241)
+++ code/branches/ogre/src/orxonox/Orxonox.h	(revision 1243)
@@ -57,9 +57,9 @@
   {
     public:
-      void init(int argc, char **argv, std::string path);
-      void start();
-      void abortImmediateForce();
+      bool init(int argc, char **argv, std::string path);
+      bool start();
+
       void abortRequest();
-      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
+      //inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
 
       static Orxonox* getSingleton();
@@ -79,23 +79,19 @@
       ~Orxonox();
 
-      // init functions
-      void serverInit(std::string path);
-      void clientInit(std::string path);
-      void standaloneInit(std::string path);
+      bool loadPlayground();
 
-      // run functions
-      void serverStart();
-      void clientStart();
-      void standaloneStart();
+      bool serverLoad();
+      bool clientLoad();
+      bool standaloneLoad();
 
-      void createScene();
-      void setupInputSystem();
-      void startRenderLoop();
+      bool loadScene();
+
+      bool startRenderLoop();
+
       float calculateEventTime(unsigned long, std::deque<unsigned long>&);
 
     private:
       GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
-      std::string           dataPath_;      //!< path to data
-      audio::AudioManager*  auMan_;         //!< audio manager
+      //audio::AudioManager*  auMan_;         //!< audio manager
       InputManager*         inputHandler_;  //!< Handles input with key bindings
       Ogre::Timer*          timer_;         //!< Main loop timer
Index: code/branches/ogre/src/orxonox/objects/Explosion.cc
===================================================================
--- code/branches/ogre/src/orxonox/objects/Explosion.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/objects/Explosion.cc	(revision 1243)
@@ -47,8 +47,8 @@
     Explosion::Explosion(WorldEntity* owner)
     {
-        RegisterObject(Explosion);
-
         this->particle_ = 0;
         this->lifetime_ = 0.4;
+
+        RegisterObject(Explosion);
 
         if (owner)
Index: code/branches/ogre/src/orxonox/objects/SpaceShip.cc
===================================================================
--- code/branches/ogre/src/orxonox/objects/SpaceShip.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/objects/SpaceShip.cc	(revision 1243)
@@ -64,10 +64,5 @@
     SpaceShip::SpaceShip()
     {
-        RegisterObject(SpaceShip);
-        this->registerAllVariables();
-
         SpaceShip::instance_s = this;
-
-        this->setConfigValues();
 
         this->setMouseEventCallback_ = false;
@@ -139,4 +134,7 @@
 //         this->create();
 
+        RegisterObject(SpaceShip);
+        this->registerAllVariables();
+        this->setConfigValues();
 
         COUT(3) << "Info: SpaceShip was loaded" << std::endl;
@@ -166,4 +164,10 @@
     void SpaceShip::init()
     {
+        if (!setMouseEventCallback_)
+        {
+          InputManager::addMouseHandler(this, "SpaceShip");
+          setMouseEventCallback_ = true;
+        }
+
         // START CREATING THRUSTER
         this->tt_ = new ParticleInterface(GraphicsEngine::getSingleton().getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
@@ -428,10 +432,4 @@
     void SpaceShip::tick(float dt)
     {
-        if (!setMouseEventCallback_)
-        {
-          InputManager::addMouseHandler(this, "SpaceShip");
-          setMouseEventCallback_ = true;
-        }
-
         if (this->redNode_ && this->greenNode_)
         {
Index: code/branches/ogre/src/orxonox/objects/WorldEntity.cc
===================================================================
--- code/branches/ogre/src/orxonox/objects/WorldEntity.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/objects/WorldEntity.cc	(revision 1243)
@@ -47,8 +47,4 @@
     WorldEntity::WorldEntity()
     {
-        RegisterObject(WorldEntity);
-
-        //create();
-
         this->bStatic_ = true;
         this->velocity_ = Vector3(0, 0, 0);
@@ -57,4 +53,6 @@
         this->rotationRate_ = 0;
         this->momentum_ = 0;
+
+        RegisterObject(WorldEntity);
 
         if (GraphicsEngine::getSingleton().getSceneManager())
Index: code/branches/ogre/src/orxonox/tools/Timer.cc
===================================================================
--- code/branches/ogre/src/orxonox/tools/Timer.cc	(revision 1241)
+++ code/branches/ogre/src/orxonox/tools/Timer.cc	(revision 1243)
@@ -68,6 +68,4 @@
     TimerBase::TimerBase()
     {
-        RegisterRootObject(TimerBase);
-
         this->executor_ = 0;
         this->interval_ = 0;
@@ -76,4 +74,6 @@
 
         this->time_ = 0;
+
+        RegisterRootObject(TimerBase);
     }
 
@@ -83,5 +83,6 @@
     TimerBase::~TimerBase()
     {
-        delete this->executor_;
+      if (this->executor_)
+          delete this->executor_;
     }
 
