Index: code/branches/resource2/src/core/ClassFactory.h
===================================================================
--- code/branches/resource2/src/core/ClassFactory.h	(revision 5610)
+++ code/branches/resource2/src/core/ClassFactory.h	(revision 5611)
@@ -54,6 +54,4 @@
     class ClassFactory : public BaseFactory
     {
-        friend class Factory;
-
         public:
             static bool create(const std::string& name, bool bLoadable = true);
@@ -61,11 +59,9 @@
 
         private:
-            ClassFactory(bool bLoadable) : bLoadable_(bLoadable) {}
-            ClassFactory(const ClassFactory& factory);      // Don't copy
+            ClassFactory() {}                               // Don't create
+            ClassFactory(const ClassFactory& factory) {}    // Don't copy
             virtual ~ClassFactory() {}                      // Don't delete
 
-            Identifier* createIdentifier(const std::string& name);
-
-            bool bLoadable_;
+            static T* createNewObject(BaseObject* creator);
     };
 
@@ -80,5 +76,7 @@
     {
         COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
-        Factory::add(name, new ClassFactory<T>(bLoadable));
+        ClassIdentifier<T>::getIdentifier(name)->addFactory(new ClassFactory<T>);
+        ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
+        Factory::add(name, ClassIdentifier<T>::getIdentifier());
 
         return true;
@@ -92,16 +90,15 @@
     inline BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
     {
-        return new T(creator);
+        return ClassFactory<T>::createNewObject(creator);
     }
 
     /**
+        @brief Creates and returns a new object of class T; this is a wrapper for the new operator.
+        @return The new object
     */
     template <class T>
-    inline Identifier* ClassFactory<T>::createIdentifier(const std::string& name)
+    inline T* ClassFactory<T>::createNewObject(BaseObject* creator)
     {
-        Identifier* identifier = ClassIdentifier<T>::getIdentifier(name);
-        identifier->addFactory(this);
-        identifier->setLoadable(this->bLoadable_);
-        return identifier;
+        return new T(creator);
     }
 }
Index: code/branches/resource2/src/core/Factory.cc
===================================================================
--- code/branches/resource2/src/core/Factory.cc	(revision 5610)
+++ code/branches/resource2/src/core/Factory.cc	(revision 5611)
@@ -73,7 +73,8 @@
         @param identifier The identifier to add
     */
-    void Factory::add(const std::string& name, BaseFactory* factory)
+    void Factory::add(const std::string& name, Identifier* identifier)
     {
-        getFactoryPointer()->factoryMap_[name] = factory;
+        getFactoryPointer()->identifierStringMap_[name] = identifier;
+        getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
     }
 
@@ -104,18 +105,14 @@
     {
         COUT(3) << "*** Factory: Create class-hierarchy" << std::endl;
-        std::map<std::string, BaseFactory*>::iterator it;
-        it = getFactoryPointer()->factoryMap_.begin();
-        Identifier::startCreatingHierarchy();
-        for (it = getFactoryPointer()->factoryMap_.begin(); it != getFactoryPointer()->factoryMap_.end(); ++it)
+        std::map<std::string, Identifier*>::iterator it;
+        it = getFactoryPointer()->identifierStringMap_.begin();
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->startCreatingHierarchy();
+        for (it = getFactoryPointer()->identifierStringMap_.begin(); it != getFactoryPointer()->identifierStringMap_.end(); ++it)
         {
-            // Create the corresponding identifier first
-            Identifier* identifier = it->second->createIdentifier(it->first);
-            getFactoryPointer()->identifierStringMap_[it->first] = identifier;
-            getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
             // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
-            BaseObject* temp = identifier->fabricate(0);
+            BaseObject* temp = (*it).second->fabricate(0);
             delete temp;
         }
-        Identifier::stopCreatingHierarchy();
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
         COUT(3) << "*** Factory: Finished class-hierarchy creation" << std::endl;
     }
Index: code/branches/resource2/src/core/Factory.h
===================================================================
--- code/branches/resource2/src/core/Factory.h	(revision 5610)
+++ code/branches/resource2/src/core/Factory.h	(revision 5611)
@@ -61,5 +61,5 @@
             static Identifier* getIdentifier(const std::string& name);
             static Identifier* getIdentifier(const uint32_t id);
-            static void add(const std::string& name, BaseFactory* factory);
+            static void add(const std::string& name, Identifier* identifier);
             static void changeNetworkID(Identifier* identifier, const uint32_t oldID, const uint32_t newID);
             static void cleanNetworkIDs();
@@ -69,5 +69,5 @@
 
             /** @brief Returns the factory-map. */
-            static const std::map<std::string, Identifier*>& getFactoryMap()
+            static const std::map<std::string, Identifier*>& getFacbtoryMap()
                 { return Factory::getFactoryPointer()->identifierStringMap_; }
             /** @brief Returns the begin-iterator of the factory-map. */
@@ -85,5 +85,4 @@
             std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
             std::map<uint32_t, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
-            std::map<std::string, BaseFactory*> factoryMap_;
     };
 
@@ -96,5 +95,4 @@
         public:
             virtual BaseObject* fabricate(BaseObject* creator) = 0;
-            virtual Identifier* createIdentifier(const std::string& name) = 0;
             virtual ~BaseFactory() {};
     };
