Index: code/trunk/src/core/IRC.cc
===================================================================
--- code/trunk/src/core/IRC.cc	(revision 1791)
+++ code/trunk/src/core/IRC.cc	(revision 1792)
@@ -27,7 +27,7 @@
  */
 
+#include "IRC.h"
+
 #include <boost/thread/thread.hpp>
-
-#include "IRC.h"
 #include "ConsoleCommand.h"
 #include "TclThreadManager.h"
Index: code/trunk/src/core/Shell.cc
===================================================================
--- code/trunk/src/core/Shell.cc	(revision 1791)
+++ code/trunk/src/core/Shell.cc	(revision 1792)
@@ -50,6 +50,14 @@
     SetConsoleCommandShortcut(OutputHandler, debug);
 
+    Shell* Shell::singletonRef_s = 0;
+
     Shell::Shell()
     {
+        assert(singletonRef_s == 0);
+        singletonRef_s = this;
+
+        int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell);
+        Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
+
         RegisterRootObject(Shell);
 
@@ -70,4 +78,6 @@
 
         this->setConfigValues();
+
+        Core::setSoftDebugLevel(OutputHandler::LD_Shell, level);
     }
 
@@ -76,19 +86,5 @@
         if (this->inputBuffer_)
             delete this->inputBuffer_;
-    }
-
-    Shell& Shell::createShell()
-    {
-        int level = Core::getSoftDebugLevel(OutputHandler::LD_Shell);
-        Core::setSoftDebugLevel(OutputHandler::LD_Shell, -1);
-        static Shell instance;
-        Core::setSoftDebugLevel(OutputHandler::LD_Shell, level);
-        return instance;
-    }
-
-    Shell& Shell::getInstance()
-    {
-        static Shell& instance = createShell();
-        return instance;
+        singletonRef_s = 0;
     }
 
Index: code/trunk/src/core/Shell.h
===================================================================
--- code/trunk/src/core/Shell.h	(revision 1791)
+++ code/trunk/src/core/Shell.h	(revision 1792)
@@ -30,8 +30,8 @@
 #define _Shell_H__
 
+#include "CorePrereqs.h"
+
 #include <list>
 #include <vector>
-
-#include "CorePrereqs.h"
 
 #include "OrxonoxClass.h"
@@ -60,6 +60,8 @@
     {
         public:
-            static Shell& getInstance();
-            static Shell& createShell();
+            Shell();
+            virtual ~Shell();
+
+            static Shell& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
             static void clearShell();
@@ -104,7 +106,5 @@
 
         private:
-            Shell();
             Shell(const Shell& other);
-            virtual ~Shell();
 
             void configureInputBuffer();
@@ -142,4 +142,6 @@
             unsigned int historyOffset_;
             bool bAddOutputLevel_;
+
+            static Shell* singletonRef_s;
     };
 }
Index: code/trunk/src/core/TclBind.cc
===================================================================
--- code/trunk/src/core/TclBind.cc	(revision 1791)
+++ code/trunk/src/core/TclBind.cc	(revision 1792)
@@ -27,11 +27,11 @@
  */
 
+#include "TclBind.h"
+
 #include <iostream>
 #include <string>
-
 #include "ConsoleCommand.h"
 #include "CommandExecutor.h"
 #include "TclThreadManager.h"
-#include "TclBind.h"
 #include "util/Debug.h"
 #include "util/String.h"
@@ -42,8 +42,13 @@
     SetConsoleCommandShortcut(TclBind, bgerror);
 
-    TclBind::TclBind()
+    TclBind* TclBind::singletonRef_s = 0;
+
+    TclBind::TclBind(const std::string& datapath)
     {
+        assert(singletonRef_s == 0);
+        singletonRef_s = this;
         this->interpreter_ = 0;
         this->bSetTclLibPath_ = false;
+        this->setDataPath(datapath);
     }
 
@@ -52,10 +57,5 @@
         if (this->interpreter_)
             delete this->interpreter_;
-    }
-
-    TclBind& TclBind::getInstance()
-    {
-        static TclBind instance;
-        return instance;
+        singletonRef_s = 0;
     }
 
Index: code/trunk/src/core/TclBind.h
===================================================================
--- code/trunk/src/core/TclBind.h	(revision 1791)
+++ code/trunk/src/core/TclBind.h	(revision 1792)
@@ -39,5 +39,8 @@
     {
         public:
-            static TclBind& getInstance();
+            TclBind(const std::string& datapath);
+            ~TclBind();
+
+            static TclBind& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
             static std::string tcl(const std::string& tclcode);
@@ -56,11 +59,11 @@
 
         private:
-            TclBind();
             TclBind(const TclBind& other);
-            ~TclBind();
 
             Tcl::interpreter* interpreter_;
             std::string tclLibPath_;
             bool bSetTclLibPath_;
+
+            static TclBind* singletonRef_s;
     };
 }
Index: code/trunk/src/core/TclThreadManager.cc
===================================================================
--- code/trunk/src/core/TclThreadManager.cc	(revision 1791)
+++ code/trunk/src/core/TclThreadManager.cc	(revision 1792)
@@ -27,10 +27,10 @@
  */
 
+#include "TclThreadManager.h"
+
 #include <iostream>
 #include <string>
-
 #include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
-
 #include <OgreTimer.h>
 
@@ -39,5 +39,4 @@
 #include "CommandExecutor.h"
 #include "TclBind.h"
-#include "TclThreadManager.h"
 #include "util/Debug.h"
 #include "util/Convert.h"
@@ -59,11 +58,16 @@
     SetConsoleCommand(TclThreadManager, flush,   false).argumentCompleter(0, autocompletion::tclthreads());
 
-    TclThreadManager::TclThreadManager()
+    TclThreadManager* TclThreadManager::singletonRef_s = 0;
+
+    TclThreadManager::TclThreadManager(Tcl::interpreter* interpreter)
     {
         RegisterRootObject(TclThreadManager);
+
+        assert(singletonRef_s == 0);
+        singletonRef_s = this;
 
         this->threadCounter_ = 0;
         this->orxonoxInterpreterBundle_.id_ = 0;
-        this->orxonoxInterpreterBundle_.interpreter_ = TclBind::getInstance().getTclInterpreter();
+        this->orxonoxInterpreterBundle_.interpreter_ = interpreter;
 #if (BOOST_VERSION >= 103500)
         this->threadID_ = boost::this_thread::get_id();
@@ -84,10 +88,6 @@
         }
         this->destroy(threadID);
-    }
-
-    TclThreadManager& TclThreadManager::getInstance()
-    {
-        static TclThreadManager instance;
-        return instance;
+
+        singletonRef_s = 0;
     }
 
Index: code/trunk/src/core/TclThreadManager.h
===================================================================
--- code/trunk/src/core/TclThreadManager.h	(revision 1791)
+++ code/trunk/src/core/TclThreadManager.h	(revision 1792)
@@ -73,5 +73,8 @@
 
         public:
-            static TclThreadManager& getInstance();
+            TclThreadManager(Tcl::interpreter* interpreter);
+            ~TclThreadManager();
+
+            static TclThreadManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
             static unsigned int create();
@@ -92,7 +95,5 @@
 
         private:
-            TclThreadManager();
             TclThreadManager(const TclThreadManager& other);
-            ~TclThreadManager();
 
             static void tcl_execute(Tcl::object const &args);
@@ -130,4 +131,6 @@
             boost::thread threadID_;
 #endif
+
+            static TclThreadManager* singletonRef_s;
     };
 
