Index: /code/branches/console/src/core/CommandExecutor.cc
===================================================================
--- /code/branches/console/src/core/CommandExecutor.cc	(revision 1193)
+++ /code/branches/console/src/core/CommandExecutor.cc	(revision 1194)
@@ -339,4 +339,9 @@
     }
 
+    const CommandEvaluation& CommandExecutor::getLastEvaluation()
+    {
+        return CommandExecutor::getInstance().evaluation_;
+    }
+
     Executor& CommandExecutor::addConsoleCommandShortcut(ExecutorStatic* executor)
     {
@@ -385,13 +390,14 @@
     bool CommandExecutor::execute(const CommandEvaluation& evaluation)
     {
-std::cout << "CE_execute: " << evaluation.processedCommand_ << "\n";
         SubString tokens(evaluation.processedCommand_, " ", SubString::WhiteSpaces, false, '\\', false, '"', false, '(', ')', false, '\0');
 
         if (evaluation.bEvaluatedParams_ && evaluation.evaluatedExecutor_)
         {
+std::cout << "CE_execute (evaluation): " << evaluation.evaluatedExecutor_->getName() << " " << evaluation.param_[0] << " " << evaluation.param_[1] << " " << evaluation.param_[2] << " " << evaluation.param_[3] << " " << evaluation.param_[4] << std::endl;
             (*evaluation.evaluatedExecutor_)(evaluation.param_[0], evaluation.param_[1], evaluation.param_[2], evaluation.param_[3], evaluation.param_[4]);
             return true;
         }
 
+std::cout << "CE_execute: " << evaluation.processedCommand_ << "\n";
         switch (evaluation.state_)
         {
@@ -643,5 +649,5 @@
             lastToken = lastToken.substr(0, lastToken.size() - 1);
             CommandExecutor::getEvaluation().tokens_.pop_back();
-            CommandExecutor::getEvaluation().tokens_.append(SubString(lastToken, " "));
+            CommandExecutor::getEvaluation().tokens_.append(SubString(lastToken, " ", "", true, '\0', false, '\0', false, '\0', '\0', false, '\0'));
         }
 
Index: /code/branches/console/src/core/CommandExecutor.h
===================================================================
--- /code/branches/console/src/core/CommandExecutor.h	(revision 1193)
+++ /code/branches/console/src/core/CommandExecutor.h	(revision 1194)
@@ -142,4 +142,6 @@
             static CommandEvaluation evaluate(const std::string& command);
 
+            static const CommandEvaluation& getLastEvaluation();
+
             static Executor& addConsoleCommandShortcut(ExecutorStatic* executor);
             static ExecutorStatic* getConsoleCommandShortcut(const std::string& name);
Index: /code/branches/console/src/core/TclBind.cc
===================================================================
--- /code/branches/console/src/core/TclBind.cc	(revision 1193)
+++ /code/branches/console/src/core/TclBind.cc	(revision 1194)
@@ -37,12 +37,60 @@
 namespace orxonox
 {
-    ConsoleCommandShortcutExtern(tcl, AccessLevel::None);
+    ConsoleCommandShortcutGeneric(tcl, createExecutor(createFunctor(&TclBind::tcl), "tcl", AccessLevel::None));
 
-    void Tcl_puts(Tcl::object const &args)
+    TclBind::TclBind()
+    {
+        this->interpreter_ = 0;
+        this->bSetTclLibPath_ = false;
+    }
+
+    TclBind::~TclBind()
+    {
+        if (this->interpreter_)
+            delete this->interpreter_;
+    }
+
+    TclBind& TclBind::getInstance()
+    {
+        static TclBind instance;
+        return instance;
+    }
+
+    void TclBind::setDataPath(const std::string& datapath)
+    {
+        this->tclLibPath_ = datapath + "/tcl";
+        this->bSetTclLibPath_ = true;
+
+        this->createTclInterpreter();
+    }
+
+    void TclBind::createTclInterpreter()
+    {
+        if (this->bSetTclLibPath_ && !this->interpreter_)
+        {
+            this->interpreter_ = new Tcl::interpreter(this->tclLibPath_);
+            this->interpreter_->def("puts", TclBind::puts, Tcl::variadic());
+            this->interpreter_->def("execute", TclBind::execute, Tcl::variadic());
+            this->interpreter_->eval("proc unknown {args} { return [execute $args] }");
+        }
+    }
+
+    void TclBind::createNewTclInterpreter()
+    {
+        if (this->interpreter_)
+        {
+            delete this->interpreter_;
+            this->interpreter_ = 0;
+        }
+
+        this->createTclInterpreter();
+    }
+
+    void TclBind::puts(Tcl::object const &args)
     {
         COUT(0) << args.get() << std::endl;
     }
 
-    std::string Tcl_execute(Tcl::object const &args)
+    std::string TclBind::execute(Tcl::object const &args)
     {
 std::cout << "Tcl_execute: args: " << args.get() << std::endl;
@@ -52,24 +100,18 @@
             command = command.substr(1, command.size() - 2);
 
-        CommandEvaluation evaluation = CommandExecutor::evaluate(command);
-
-        if (!CommandExecutor::execute(evaluation))
+        if (!CommandExecutor::execute(command))
             COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
 
-        if (evaluation.hasReturnvalue())
-            return evaluation.getReturnvalue().toString();
+        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
+            return CommandExecutor::getLastEvaluation().getReturnvalue().toString();
 
         return "";
     }
 
-    std::string tcl(const std::string& tclcode)
+    std::string TclBind::tcl(const std::string& tclcode)
     {
         try
         {
-            static Tcl::interpreter i;
-            i.def("puts", Tcl_puts, Tcl::variadic());
-            i.def("execute", Tcl_execute, Tcl::variadic());
-            i.eval("proc unknown {args} { return [execute $args] }");
-            std::string output = i.eval(tclcode);
+            std::string output = TclBind::getInstance().interpreter_->eval(tclcode);
             if (output != "")
                 COUT(0) << "tcl> " << output << std::endl;
Index: /code/branches/console/src/core/TclBind.h
===================================================================
--- /code/branches/console/src/core/TclBind.h	(revision 1193)
+++ /code/branches/console/src/core/TclBind.h	(revision 1194)
@@ -34,8 +34,26 @@
 namespace orxonox
 {
-    Tcl::interpreter* createNewInterpreter();
-    void Tcl_puts(Tcl::object const &args);
-    std::string Tcl_execute(Tcl::object const &args);
-    std::string tcl(const std::string& tclcode);
+    class TclBind
+    {
+        public:
+            static TclBind& getInstance();
+
+            void setDataPath(const std::string& datapath);
+            void createTclInterpreter();
+            void createNewTclInterpreter();
+
+            static void puts(Tcl::object const &args);
+            static std::string execute(Tcl::object const &args);
+            static std::string tcl(const std::string& tclcode);
+
+        private:
+            TclBind();
+            TclBind(const TclBind& other);
+            ~TclBind();
+
+            Tcl::interpreter* interpreter_;
+            std::string tclLibPath_;
+            bool bSetTclLibPath_;
+    };
 }
 
Index: /code/branches/console/src/cpptcl/CppTcl.cc
===================================================================
--- /code/branches/console/src/cpptcl/CppTcl.cc	(revision 1193)
+++ /code/branches/console/src/cpptcl/CppTcl.cc	(revision 1194)
@@ -859,4 +859,16 @@
 }
 
+interpreter::interpreter(string const &libpath)
+{
+     interp_ =  Tcl_CreateInterp();
+     owner_ = true;
+
+     try
+     {
+        this->eval("set tcl_library " + libpath);
+        Tcl_Init(this->interp_);
+     } catch (...) {}
+}
+
 interpreter::interpreter(Tcl_Interp *interp, bool owner)
 {
Index: /code/branches/console/src/cpptcl/CppTcl.h
===================================================================
--- /code/branches/console/src/cpptcl/CppTcl.h	(revision 1193)
+++ /code/branches/console/src/cpptcl/CppTcl.h	(revision 1194)
@@ -70,5 +70,5 @@
 public:
      result(Tcl_Interp *interp);
-     
+
      operator bool() const;
      operator double() const;
@@ -171,5 +171,5 @@
                throw tcl_error("Too few arguments.");
           }
-          
+
           std::string methodName(Tcl_GetString(objv[1]));
 
@@ -468,13 +468,14 @@
 public:
      interpreter();
+     interpreter(std::string const &libpath);
      interpreter(Tcl_Interp *, bool owner = true);
      ~interpreter();
-     
+
      void make_safe();
-     
+
      Tcl_Interp * get() const { return interp_; }
 
-     // free function definitions     
-     
+     // free function definitions
+
      template <typename R>
      void def(std::string const &name, R (*f)(),
@@ -633,5 +634,5 @@
      }
 
-     // free script evaluation     
+     // free script evaluation
      details::result eval(std::string const &script);
      details::result eval(std::istream &s);
@@ -837,5 +838,5 @@
           throw tcl_error(interp_);
      }
- 
+
      return details::result(interp_);
 }
Index: /code/branches/console/src/orxonox/GraphicsEngine.cc
===================================================================
--- /code/branches/console/src/orxonox/GraphicsEngine.cc	(revision 1193)
+++ /code/branches/console/src/orxonox/GraphicsEngine.cc	(revision 1194)
@@ -44,4 +44,5 @@
 #include "core/ConfigValueIncludes.h"
 #include "core/Debug.h"
+#include "core/TclBind.h"
 
 
@@ -112,4 +113,6 @@
     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_);
   }
 
