Index: code/branches/objecthierarchy/src/core/BaseObject.cc
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2005)
+++ code/branches/objecthierarchy/src/core/BaseObject.cc	(revision 2010)
@@ -36,5 +36,5 @@
 #include "CoreIncludes.h"
 #include "XMLPort.h"
-#include "Level.h"
+#include "XMLFile.h"
 #include "Template.h"
 #include "util/String.h"
@@ -56,5 +56,5 @@
         this->bVisible_ = true;
 
-        this->level_ = 0;
+        this->file_ = 0;
         this->namespace_ = 0;
     }
@@ -86,8 +86,8 @@
         @return The levelfile
     */
-    const std::string& BaseObject::getLevelfile() const
+    const std::string& BaseObject::getFilename() const
     {
-        if (this->level_)
-            return this->level_->getFile();
+        if (this->file_)
+            return this->file_->getFilename();
         else
             return blankString;
Index: code/branches/objecthierarchy/src/core/BaseObject.h
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2005)
+++ code/branches/objecthierarchy/src/core/BaseObject.h	(revision 2010)
@@ -81,9 +81,9 @@
             virtual void changedVisibility() {}
 
-            /** @brief Sets a pointer to the level that loaded this object. @param level The pointer to the level */
-            inline void setLevel(const Level* level) { this->level_ = level; }
-            /** @brief Returns a pointer to the level that loaded this object. @return The level */
-            inline const Level* getLevel() const { return this->level_; }
-            const std::string& getLevelfile() const;
+            /** @brief Sets a pointer to the xml file that loaded this object. @param file The pointer to the XMLFile */
+            inline void setFile(const XMLFile* file) { this->file_ = file; }
+            /** @brief Returns a pointer to the XMLFile that loaded this object. @return The XMLFile */
+            inline const XMLFile* getFile() const { return this->file_; }
+            const std::string& getFilename() const;
 
             void addTemplate(const std::string& name);
@@ -111,5 +111,5 @@
 
             bool bInitialized_;                         //!< True if the object was initialized (passed the object registration)
-            const Level* level_;                        //!< The level that loaded this object
+            const XMLFile* file_;                       //!< The XMLFile that loaded this object
             std::string loaderIndentation_;             //!< Indentation of the debug output in the Loader
             Namespace* namespace_;
Index: code/branches/objecthierarchy/src/core/CorePrereqs.h
===================================================================
--- code/branches/objecthierarchy/src/core/CorePrereqs.h	(revision 2005)
+++ code/branches/objecthierarchy/src/core/CorePrereqs.h	(revision 2010)
@@ -129,5 +129,4 @@
   class Language;
   class LanguageEntry;
-  class Level;
   class Loader;
   class MetaObjectList;
@@ -153,4 +152,5 @@
   class Template;
   class Tickable;
+  class XMLFile;
   template <class T, class O>
   class XMLPortClassObjectContainer;
Index: code/branches/objecthierarchy/src/core/Level.h
===================================================================
--- code/branches/objecthierarchy/src/core/Level.h	(revision 2005)
+++ 	(revision )
@@ -1,55 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Level_H__
-#define _Level_H__
-
-#include "CorePrereqs.h"
-
-#include <string>
-
-#include "ClassTreeMask.h"
-
-namespace orxonox
-{
-    class _CoreExport Level
-    {
-        public:
-            Level(const std::string& file) : file_(file) {}
-            Level(const std::string& file, const ClassTreeMask& mask) : file_(file), mask_(mask) {};
-
-            const std::string& getFile() const { return this->file_; }
-            const ClassTreeMask& getMask() const { return this->mask_; }
-
-        private:
-            std::string file_;
-            ClassTreeMask mask_;
-    };
-}
-
-#endif /* _Level_H__ */
Index: code/branches/objecthierarchy/src/core/Loader.cc
===================================================================
--- code/branches/objecthierarchy/src/core/Loader.cc	(revision 2005)
+++ code/branches/objecthierarchy/src/core/Loader.cc	(revision 2010)
@@ -28,5 +28,5 @@
 
 #include "Loader.h"
-#include "Level.h"
+#include "XMLFile.h"
 #include "BaseObject.h"
 #include "Identifier.h"
@@ -42,11 +42,11 @@
 namespace orxonox
 {
-    std::vector<std::pair<const Level*, ClassTreeMask> > Loader::levels_s;
+    std::vector<std::pair<const XMLFile*, ClassTreeMask> > Loader::files_s;
     ClassTreeMask Loader::currentMask_s;
 
-    bool Loader::open(const Level* level, const ClassTreeMask& mask)
+    bool Loader::open(const XMLFile* file, const ClassTreeMask& mask)
     {
-        Loader::add(level, mask);
-        return Loader::load(level, mask);
+        Loader::add(file, mask);
+        return Loader::load(file, mask);
     }
 
@@ -54,29 +54,29 @@
     {
         Loader::unload();
-        Loader::levels_s.clear();
+        Loader::files_s.clear();
     }
 
-    void Loader::close(const Level* level)
+    void Loader::close(const XMLFile* file)
     {
-        Loader::unload(level);
-        Loader::remove(level);
+        Loader::unload(file);
+        Loader::remove(file);
     }
 
-    void Loader::add(const Level* level, const ClassTreeMask& mask)
+    void Loader::add(const XMLFile* file, const ClassTreeMask& mask)
     {
-        if (!level)
+        if (!file)
             return;
-        Loader::levels_s.insert(Loader::levels_s.end(), std::pair<const Level*, ClassTreeMask>(level, mask));
+        Loader::files_s.insert(Loader::files_s.end(), std::pair<const XMLFile*, ClassTreeMask>(file, mask));
     }
 
-    void Loader::remove(const Level* level)
+    void Loader::remove(const XMLFile* file)
     {
-        if (!level)
+        if (!file)
             return;
-        for (std::vector<std::pair<const Level*, ClassTreeMask> >::iterator it = Loader::levels_s.begin(); it != Loader::levels_s.end(); ++it)
+        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
         {
-            if ((*it).first == level)
+            if ((*it).first == file)
             {
-                Loader::levels_s.erase(it);
+                Loader::files_s.erase(it);
                 break;
             }
@@ -87,5 +87,5 @@
     {
         bool success = true;
-        for (std::vector<std::pair<const Level*, ClassTreeMask> >::iterator it = Loader::levels_s.begin(); it != Loader::levels_s.end(); ++it)
+        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
             if (!Loader::load((*it).first, (*it).second * mask))
                 success = false;
@@ -111,23 +111,23 @@
     }
 
-    bool Loader::load(const Level* level, const ClassTreeMask& mask)
+    bool Loader::load(const XMLFile* file, const ClassTreeMask& mask)
     {
-        if (!level)
+        if (!file)
             return false;
 
-        Loader::currentMask_s = level->getMask() * mask;
+        Loader::currentMask_s = file->getMask() * mask;
 
         // let Lua work this out:
         LuaBind* lua = LuaBind::getInstance();
         lua->clearLuaOutput();
-        lua->loadFile(level->getFile(), true);
+        lua->loadFile(file->getFilename(), true);
         lua->run();
 
         try
         {
-            COUT(0) << "Start loading " << level->getFile() << "..." << std::endl;
+            COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
             COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
 
-            //ticpp::Document xmlfile(level->getFile());
+            //ticpp::Document xmlfile(file->getFilename());
             //xmlfile.LoadFile();
             //ticpp::Element myelement(*Script::getFileString());
@@ -146,10 +146,10 @@
             Namespace* rootNamespace = new Namespace();
             rootNamespace->setLoaderIndentation("    ");
-            rootNamespace->setLevel(level);
+            rootNamespace->setFile(file);
             rootNamespace->setNamespace(rootNamespace);
             rootNamespace->setRoot(true);
             rootNamespace->XMLPort(rootElement, XMLPort::LoadObject);
 
-            COUT(0) << "Finished loading " << level->getFile() << "." << std::endl;
+            COUT(0) << "Finished loading " << file->getFilename() << "." << std::endl;
 
             COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString("  ") << std::endl;
@@ -160,5 +160,5 @@
         {
             COUT(1) << std::endl;
-            COUT(1) << "An error occurred in Loader.cc while loading " << level->getFile() << ":" << std::endl;
+            COUT(1) << "An error occurred in Loader.cc while loading " << file->getFilename() << ":" << std::endl;
             COUT(1) << ex.what() << std::endl;
             COUT(1) << "Loading aborted." << std::endl;
@@ -167,11 +167,11 @@
     }
 
-    void Loader::unload(const Level* level, const ClassTreeMask& mask)
+    void Loader::unload(const XMLFile* file, const ClassTreeMask& mask)
     {
-        if (!level)
+        if (!file)
             return;
         for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; )
         {
-            if ((it->getLevel() == level) && mask.isIncluded(it->getIdentifier()))
+            if ((it->getFile() == file) && mask.isIncluded(it->getIdentifier()))
                 delete (*(it++));
             else
@@ -180,8 +180,8 @@
     }
 
-    bool Loader::reload(const Level* level, const ClassTreeMask& mask)
+    bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask)
     {
-        Loader::unload(level, mask);
-        return Loader::load(level, mask);
+        Loader::unload(file, mask);
+        return Loader::load(file, mask);
     }
 }
Index: code/branches/objecthierarchy/src/core/Loader.h
===================================================================
--- code/branches/objecthierarchy/src/core/Loader.h	(revision 2005)
+++ code/branches/objecthierarchy/src/core/Loader.h	(revision 2010)
@@ -35,5 +35,4 @@
 
 #include "ClassTreeMask.h"
-#include "Level.h"
 
 namespace orxonox
@@ -42,10 +41,10 @@
     {
         public:
-            static bool open(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static bool open(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
             static void close();
-            static void close(const Level* level);
+            static void close(const XMLFile* file);
 
-            static void add(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
-            static void remove(const Level* level);
+            static void add(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
+            static void remove(const XMLFile* file);
 
             static bool load(const ClassTreeMask& mask = ClassTreeMask());
@@ -53,12 +52,12 @@
             static bool reload(const ClassTreeMask& mask = ClassTreeMask());
 
-            static bool load(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
-            static void unload(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
-            static bool reload(const Level* level, const ClassTreeMask& mask = ClassTreeMask());
+            static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
+            static void unload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
+            static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
 
             static ClassTreeMask currentMask_s;
 
         private:
-            static std::vector<std::pair<const Level*, ClassTreeMask> > levels_s;
+            static std::vector<std::pair<const XMLFile*, ClassTreeMask> > files_s;
     };
 }
Index: code/branches/objecthierarchy/src/core/XMLFile.h
===================================================================
--- code/branches/objecthierarchy/src/core/XMLFile.h	(revision 2010)
+++ code/branches/objecthierarchy/src/core/XMLFile.h	(revision 2010)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _XMLFile_H__
+#define _XMLFile_H__
+
+#include "CorePrereqs.h"
+
+#include <string>
+
+#include "ClassTreeMask.h"
+
+namespace orxonox
+{
+    class _CoreExport XMLFile
+    {
+        public:
+            XMLFile(const std::string& filename) : filename_(filename) {}
+            XMLFile(const std::string& filename, const ClassTreeMask& mask) : filename_(filename), mask_(mask) {};
+
+            const std::string& getFilename() const { return this->filename_; }
+            const ClassTreeMask& getMask() const { return this->mask_; }
+
+        private:
+            std::string filename_;
+            ClassTreeMask mask_;
+    };
+}
+
+#endif /* _XMLFile_H__ */
Index: code/branches/objecthierarchy/src/core/XMLPort.h
===================================================================
--- code/branches/objecthierarchy/src/core/XMLPort.h	(revision 2005)
+++ code/branches/objecthierarchy/src/core/XMLPort.h	(revision 2010)
@@ -336,5 +336,5 @@
                     {
                         COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << this->owner_->getName() << ") in " << this->owner_->getLevelfile() << ":" << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading attribute '" << this->paramname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << this->owner_->getName() << ") in " << this->owner_->getFilename() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
@@ -481,5 +481,5 @@
                                                 BaseObject* newObject = identifier->fabricate();
                                                 newObject->setLoaderIndentation(((BaseObject*)object)->getLoaderIndentation() + "  ");
-                                                newObject->setLevel(((BaseObject*)object)->getLevel());
+                                                newObject->setFile(((BaseObject*)object)->getFile());
                                                 newObject->setNamespace(((BaseObject*)object)->getNamespace());
 
@@ -523,5 +523,5 @@
                     {
                         COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getLevelfile() << ":" << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << ((BaseObject*)object)->getName() << ") in " << object->getFilename() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
