Index: code/branches/objecthierarchy/src/core/BaseObject.h
===================================================================
--- code/branches/objecthierarchy/src/core/BaseObject.h	(revision 1912)
+++ code/branches/objecthierarchy/src/core/BaseObject.h	(revision 1940)
@@ -93,9 +93,11 @@
             inline const std::string& getLoaderIndentation() const { return this->loaderIndentation_; }
 
-        private:
+        protected:
             std::string name_;                          //!< The name of the object
-            bool bInitialized_;                         //!< True if the object was initialized (passed the object registration)
             bool bActive_;                              //!< True = the object is active
             bool bVisible_;                             //!< True = the object is visible
+
+        private:
+            bool bInitialized_;                         //!< True if the object was initialized (passed the object registration)
             const Level* level_;                        //!< The level that loaded this object
             std::string loaderIndentation_;             //!< Indentation of the debug output in the Loader
Index: code/branches/objecthierarchy/src/core/ClassFactory.h
===================================================================
--- code/branches/objecthierarchy/src/core/ClassFactory.h	(revision 1912)
+++ code/branches/objecthierarchy/src/core/ClassFactory.h	(revision 1940)
@@ -55,5 +55,5 @@
     {
         public:
-            static bool create(const std::string& name);
+            static bool create(const std::string& name, bool bLoadable = true);
             BaseObject* fabricate();
 
@@ -68,11 +68,14 @@
     /**
         @brief Adds the ClassFactory to the Identifier of the same type and the Identifier to the Factory.
+        @param name The name of the class
+        @param bLoadable True if the class can be loaded through XML
         @return Always true (this is needed because the compiler only allows assignments before main())
     */
     template <class T>
-    bool ClassFactory<T>::create(const std::string& name)
+    bool ClassFactory<T>::create(const std::string& name, bool bLoadable)
     {
         COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
         ClassIdentifier<T>::getIdentifier(name)->addFactory(new ClassFactory<T>);
+        ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
         Factory::add(name, ClassIdentifier<T>::getIdentifier());
 
Index: code/branches/objecthierarchy/src/core/CoreIncludes.h
===================================================================
--- code/branches/objecthierarchy/src/core/CoreIncludes.h	(revision 1912)
+++ code/branches/objecthierarchy/src/core/CoreIncludes.h	(revision 1940)
@@ -98,5 +98,12 @@
 */
 #define CreateFactory(ClassName) \
-    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, true)
+
+/**
+    @brief Creates the entry in the Factory for classes which should not be loaded through XML.
+    @param ClassName The name of the class
+*/
+#define CreateUnloadableFactory(ClassName) \
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName, false)
 
 /**
@@ -111,5 +118,5 @@
     @param String The name of the class
 */
-#define ClassByName(String) \
+#define ClassByString(String) \
     orxonox::Factory::getIdentifier(String)
 
Index: code/branches/objecthierarchy/src/core/Factory.cc
===================================================================
--- code/branches/objecthierarchy/src/core/Factory.cc	(revision 1912)
+++ code/branches/objecthierarchy/src/core/Factory.cc	(revision 1940)
@@ -46,5 +46,9 @@
     Identifier* Factory::getIdentifier(const std::string& name)
     {
-        return getFactoryPointer()->identifierStringMap_[name];
+        std::map<std::string, Identifier*>::const_iterator it = getFactoryPointer()->identifierStringMap_.find(name);
+        if (it != getFactoryPointer()->identifierStringMap_.end())
+            return it->second;
+        else
+            return 0;
     }
 
@@ -56,5 +60,9 @@
     Identifier* Factory::getIdentifier(const unsigned int id)
     {
-        return getFactoryPointer()->identifierNetworkIDMap_[id];
+        std::map<unsigned int, Identifier*>::const_iterator it = getFactoryPointer()->identifierNetworkIDMap_.find(id);
+        if (it != getFactoryPointer()->identifierNetworkIDMap_.end())
+            return it->second;
+        else
+            return 0;
     }
 
@@ -68,4 +76,5 @@
         getFactoryPointer()->identifierStringMap_[name] = identifier;
         getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
+std::cout << identifier->getName() << ": " << identifier->getNetworkID() << std::endl;
     }
 
@@ -80,4 +89,5 @@
         getFactoryPointer()->identifierNetworkIDMap_.erase(oldID);
         getFactoryPointer()->identifierNetworkIDMap_[newID] = identifier;
+std::cout << identifier->getName() << ": " << oldID << " -> " << newID << std::endl;
     }
 
Index: code/branches/objecthierarchy/src/core/Identifier.cc
===================================================================
--- code/branches/objecthierarchy/src/core/Identifier.cc	(revision 1912)
+++ code/branches/objecthierarchy/src/core/Identifier.cc	(revision 1940)
@@ -59,4 +59,5 @@
         this->bSetName_ = false;
         this->factory_ = 0;
+        this->bLoadable_ = true;
 
         this->bHasConfigValues_ = false;
Index: code/branches/objecthierarchy/src/core/Identifier.h
===================================================================
--- code/branches/objecthierarchy/src/core/Identifier.h	(revision 1912)
+++ code/branches/objecthierarchy/src/core/Identifier.h	(revision 1940)
@@ -107,4 +107,9 @@
             bool isDirectParentOf(const Identifier* identifier) const;
 
+            /** @brief Returns true if the class can be loaded through XML. */
+            inline bool isLoadable() const { return this->bLoadable_; }
+            /** @brief Set the class to be loadable through XML or not. */
+            inline void setLoadable(bool bLoadable) { this->bLoadable_ = bLoadable; }
+
             /** @brief Returns the list of all existing objects of this class. @return The list */
             inline ObjectListBase* getObjects() const
@@ -285,4 +290,5 @@
             bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
             bool bSetName_;                                                //!< True if the name is set
+            bool bLoadable_;                                               //!< False = it's not permitted to load the object through XML
             std::string name_;                                             //!< The name of the class the Identifier belongs to
             BaseFactory* factory_;                                         //!< The Factory, able to create new objects of the given class (if available)
Index: code/branches/objecthierarchy/src/core/XMLPort.h
===================================================================
--- code/branches/objecthierarchy/src/core/XMLPort.h	(revision 1912)
+++ code/branches/objecthierarchy/src/core/XMLPort.h	(revision 1940)
@@ -468,35 +468,42 @@
                             for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
                             {
-                                Identifier* identifier = ClassByName(child->Value());
+                                Identifier* identifier = ClassByString(child->Value());
                                 if (identifier)
                                 {
                                     if (identifier->isA(Class(O)))
                                     {
-                                        if (this->identifierIsIncludedInLoaderMask(identifier))
+                                        if (identifier->isLoadable())
                                         {
-                                            COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
-
-                                            BaseObject* newObject = identifier->fabricate();
-                                            newObject->setLoaderIndentation(((BaseObject*)object)->getLoaderIndentation() + "  ");
-                                            newObject->setLevel(((BaseObject*)object)->getLevel());
-                                            newObject->setNamespace(((BaseObject*)object)->getNamespace());
-
-                                            if (this->bLoadBefore_)
+                                            if (this->identifierIsIncludedInLoaderMask(identifier))
                                             {
-                                                newObject->XMLPort(*child, XMLPort::LoadObject);
-                                                COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
+                                                COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "fabricating " << child->Value() << "..." << std::endl;
+
+                                                BaseObject* newObject = identifier->fabricate();
+                                                newObject->setLoaderIndentation(((BaseObject*)object)->getLoaderIndentation() + "  ");
+                                                newObject->setLevel(((BaseObject*)object)->getLevel());
+                                                newObject->setNamespace(((BaseObject*)object)->getNamespace());
+
+                                                if (this->bLoadBefore_)
+                                                {
+                                                    newObject->XMLPort(*child, XMLPort::LoadObject);
+                                                    COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (objectname " << newObject->getName() << ") to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
+                                                }
+                                                else
+                                                {
+                                                    COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
+                                                }
+
+                                                COUT(5) << ((BaseObject*)object)->getLoaderIndentation();
+                                                (*this->loadexecutor_)(object, newObject);
+
+                                                if (!this->bLoadBefore_)
+                                                    newObject->XMLPort(*child, XMLPort::LoadObject);
+
+                                                COUT(5) << ((BaseObject*)object)->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
                                             }
-                                            else
-                                            {
-                                                COUT(4) << ((BaseObject*)object)->getLoaderIndentation() << "assigning " << child->Value() << " (object not yet loaded) to " << this->identifier_->getName() << " (objectname " << ((BaseObject*)object)->getName() << ")" << std::endl;
-                                            }
-
-                                            COUT(5) << ((BaseObject*)object)->getLoaderIndentation();
-                                            (*this->loadexecutor_)(object, newObject);
-
-                                            if (!this->bLoadBefore_)
-                                                newObject->XMLPort(*child, XMLPort::LoadObject);
-
-                                            COUT(5) << ((BaseObject*)object)->getLoaderIndentation() << "...fabricated " << child->Value() << " (objectname " << newObject->getName() << ")." << std::endl;
+                                        }
+                                        else
+                                        {
+                                            COUT(2) << ((BaseObject*)object)->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not loadable." << std::endl;
                                         }
                                     }
