Index: code/branches/core2/src/orxonox/GraphicsEngine.cc
===================================================================
--- code/branches/core2/src/orxonox/GraphicsEngine.cc	(revision 989)
+++ code/branches/core2/src/orxonox/GraphicsEngine.cc	(revision 993)
@@ -42,6 +42,4 @@
 namespace orxonox {
 
-  using namespace Ogre;
-
   GraphicsEngine::GraphicsEngine()
   {
@@ -71,5 +69,5 @@
     std::string plugin_filename = "plugins.cfg";
 #endif
-    root_ = new Root(plugin_filename);
+    root_ = new Ogre::Root(plugin_filename);
   }
 
@@ -77,9 +75,9 @@
    * @return scene manager
    */
-  SceneManager* GraphicsEngine::getSceneManager()
+  Ogre::SceneManager* GraphicsEngine::getSceneManager()
   {
     if(!scene_)
     {
-      scene_ = root_->createSceneManager(ST_GENERIC, "Default SceneManager");
+      scene_ = root_->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
       COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
     }
@@ -98,6 +96,6 @@
   {
     root_->initialise(true, "OrxonoxV2");
-    TextureManager::getSingleton().setDefaultNumMipmaps(5);
-    ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
   }
 
@@ -107,9 +105,9 @@
     //TODO: Work with ressource groups (should be generated by a special loader)
     // Load resource paths from data file using configfile ressource type
-    ConfigFile cf;
+    Ogre::ConfigFile cf;
     cf.load(dataPath + "resources.cfg");
 
     // Go through all sections & settings in the file
-    ConfigFile::SectionIterator seci = cf.getSectionIterator();
+    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
 
     std::string secName, typeName, archName;
@@ -117,6 +115,6 @@
     {
       secName = seci.peekNextKey();
-      ConfigFile::SettingsMultiMap *settings = seci.getNext();
-      ConfigFile::SettingsMultiMap::iterator i;
+      Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
+      Ogre::ConfigFile::SettingsMultiMap::iterator i;
       for (i = settings->begin(); i != settings->end(); ++i)
       {
@@ -124,5 +122,5 @@
         archName = i->second; // name (and location) of archive
 
-        ResourceGroupManager::getSingleton().addResourceLocation(
+        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(
                                            std::string(dataPath + archName),
                                            typeName, secName);
Index: code/branches/core2/src/orxonox/Orxonox.cc
===================================================================
--- code/branches/core2/src/orxonox/Orxonox.cc	(revision 989)
+++ code/branches/core2/src/orxonox/Orxonox.cc	(revision 993)
@@ -86,4 +86,5 @@
 #include "objects/test3.h"
 
+#include "core/ConsoleCommand.h"
 #include "core/CommandExecutor.h"
 #include "core/InputBuffer.h"
@@ -93,4 +94,6 @@
 namespace orxonox
 {
+    ConsoleCommandShortcut(Orxonox, exit, AccessLevel::None);
+
     class Testlistener : public InputBufferListener
     {
@@ -150,5 +153,5 @@
 
         mKeyboard->capture();
-        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
+        return (!mKeyboard->isKeyDown(OIS::KC_ESCAPE) && !Orxonox::getSingleton()->shouldExit());
       }
 /*
@@ -185,4 +188,5 @@
     this->frameListener_ = 0;
     this->root_ = 0;
+    this->bExit_ = false;
   }
 
Index: code/branches/core2/src/orxonox/Orxonox.h
===================================================================
--- code/branches/core2/src/orxonox/Orxonox.h	(revision 989)
+++ code/branches/core2/src/orxonox/Orxonox.h	(revision 993)
@@ -45,4 +45,6 @@
       inline OIS::Mouse* getMouse()                        { return this->mouse_; }
 //      inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
+      static inline void exit()                            { Orxonox::getSingleton()->bExit_ = true; }
+      inline bool shouldExit()                             { return this->bExit_; }
 
     private:
@@ -78,4 +80,5 @@
       OrxListener*          frameListener_;
       Ogre::Root*           root_;
+      bool                  bExit_;
 
       // this is used to identify the mode (server/client/...) we're in
Index: code/branches/core2/src/orxonox/core/CommandExecutor.cc
===================================================================
--- code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 989)
+++ code/branches/core2/src/orxonox/core/CommandExecutor.cc	(revision 993)
@@ -45,4 +45,40 @@
     ConsoleCommandShortcutGeneric(keyword3, createExecutor((FunctorStatic*)0, "bind", AccessLevel::User));
 
+    ConsoleCommandShortcutExtern(exec, AccessLevel::None);
+
+    void exec(const std::string& filename)
+    {
+        static std::set<std::string> executingFiles;
+
+        std::set<std::string>::const_iterator it = executingFiles.find(filename);
+        if (it != executingFiles.end())
+        {
+            COUT(1) << "Error: Recurring exec command in \"" << filename << "\". Stopped execution." << std::endl;
+            return;
+        }
+
+        // Open the file
+        std::ifstream file;
+        file.open(filename.c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't execute file \"" << filename << "\"." << std::endl;
+            return;
+        }
+
+        executingFiles.insert(filename);
+
+        // Iterate through the file and put the lines into the CommandExecutor
+        char line[1024];
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            CommandExecutor::execute(line);
+        }
+
+        executingFiles.erase(filename);
+    }
+
 
     ///////////////////////
Index: code/branches/core2/src/orxonox/core/CommandExecutor.h
===================================================================
--- code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 989)
+++ code/branches/core2/src/orxonox/core/CommandExecutor.h	(revision 993)
@@ -60,4 +60,6 @@
         CS_Error
     };
+
+    void exec(const std::string& filename);
 
     enum KeybindMode {}; // temporary
Index: code/branches/core2/src/orxonox/core/ConsoleCommand.h
===================================================================
--- code/branches/core2/src/orxonox/core/ConsoleCommand.h	(revision 989)
+++ code/branches/core2/src/orxonox/core/ConsoleCommand.h	(revision 993)
@@ -43,6 +43,9 @@
 
 
-#define ConsoleCommandShortcut(function, accesslevel) \
+#define ConsoleCommandShortcut(classname, function, accesslevel) \
     ConsoleCommandShortcutGeneric(function##consolecommand__, orxonox::createExecutor(orxonox::createFunctor(&classname::function), #function, accesslevel))
+
+#define ConsoleCommandShortcutExtern(function, accesslevel) \
+    ConsoleCommandShortcutGeneric(function##consolecommand__, orxonox::createExecutor(orxonox::createFunctor(&function), #function, accesslevel))
 
 #define ConsoleCommandShortcutGeneric(fakevariable, executor) \
Index: code/branches/core2/src/orxonox/core/CorePrereqs.h
===================================================================
--- code/branches/core2/src/orxonox/core/CorePrereqs.h	(revision 989)
+++ code/branches/core2/src/orxonox/core/CorePrereqs.h	(revision 993)
@@ -93,4 +93,10 @@
   class CommandEvaluation;
   class CommandExecutor;
+  class ConfigFile;
+  class ConfigFileEntry;
+  class ConfigFileEntryComment;
+  class ConfigFileEntryValue;
+  class ConfigFileManager;
+  class ConfigFileSection;
   class ConfigValueContainer;
   class DebugLevel;
