Index: code/branches/core5/src/libraries/core/ClassFactory.h
===================================================================
--- code/branches/core5/src/libraries/core/ClassFactory.h	(revision 5781)
+++ code/branches/core5/src/libraries/core/ClassFactory.h	(revision 5783)
@@ -65,30 +65,25 @@
     {
         public:
-            ClassFactory(const std::string& name, bool bLoadable = true);
-            BaseObject* fabricate(BaseObject* creator);
+            /**
+                @brief Constructor: Adds the ClassFactory to the Identifier of the same type.
+                @param name The name of the class
+                @param bLoadable True if the class can be loaded through XML
+            */
+            ClassFactory(const std::string& name, bool bLoadable = true)
+            {
+                COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
+                ClassIdentifier<T>::getIdentifier(name)->addFactory(this);
+                ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
+            }
+
+            /**
+                @brief Creates and returns a new object of class T.
+                @return The new object
+            */
+            inline BaseObject* fabricate(BaseObject* creator)
+            {
+                return static_cast<BaseObject*>(new T(creator));
+            }
     };
-
-    /**
-        @brief Adds the ClassFactory to the Identifier of the same type.
-        @param name The name of the class
-        @param bLoadable True if the class can be loaded through XML
-    */
-    template <class T>
-    ClassFactory<T>::ClassFactory(const std::string& name, bool bLoadable)
-    {
-        COUT(4) << "*** ClassFactory: Create entry for " << name << " in Factory." << std::endl;
-        ClassIdentifier<T>::getIdentifier(name)->addFactory(this);
-        ClassIdentifier<T>::getIdentifier()->setLoadable(bLoadable);
-    }
-
-    /**
-        @brief Creates and returns a new object of class T.
-        @return The new object
-    */
-    template <class T>
-    inline BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
-    {
-        return static_cast<BaseObject*>(new T(creator));
-    }
 }
 
Index: code/branches/core5/src/libraries/core/Identifier.cc
===================================================================
--- code/branches/core5/src/libraries/core/Identifier.cc	(revision 5781)
+++ code/branches/core5/src/libraries/core/Identifier.cc	(revision 5783)
@@ -66,7 +66,4 @@
         this->bHasConsoleCommands_ = false;
 
-        this->children_ = new std::set<const Identifier*>();
-        this->directChildren_ = new std::set<const Identifier*>();
-
         // Default network ID is the class ID
         this->networkID_ = this->classID_;
@@ -78,6 +75,4 @@
     Identifier::~Identifier()
     {
-        delete this->children_;
-        delete this->directChildren_;
         delete this->objects_;
 
@@ -165,5 +160,5 @@
             {
                 // Tell the parent we're one of it's children
-                (*it)->getChildrenIntern().insert((*it)->getChildrenIntern().end(), this);
+                (*it)->children_.insert((*it)->children_.end(), this);
 
                 // Erase all parents of our parent from our direct-parent-list
@@ -187,5 +182,5 @@
             {
                 // Tell the parent we're one of it's direct children
-                (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
+                (*it)->directChildren_.insert((*it)->directChildren_.end(), this);
 
                 // Create the super-function dependencies
@@ -201,8 +196,6 @@
     {
         COUT(3) << "*** Identifier: Create class-hierarchy" << std::endl;
-        std::map<std::string, Identifier*>::const_iterator it;
-        it = Identifier::getStringIdentifierMap().begin();
-        Identifier::getStringIdentifierMap().begin()->second->startCreatingHierarchy();
-        for (it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
+        Identifier::startCreatingHierarchy();
+        for (std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMap().begin(); it != Identifier::getStringIdentifierMap().end(); ++it)
         {
             // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
@@ -213,5 +206,5 @@
             }
         }
-        Identifier::getStringIdentifierMap().begin()->second->stopCreatingHierarchy();
+        Identifier::stopCreatingHierarchy();
         COUT(3) << "*** Identifier: Finished class-hierarchy creation" << std::endl;
     }
@@ -315,5 +308,5 @@
     bool Identifier::isParentOf(const Identifier* identifier) const
     {
-        return (this->children_->find(identifier) != this->children_->end());
+        return (this->children_.find(identifier) != this->children_.end());
     }
 
@@ -324,5 +317,5 @@
     bool Identifier::isDirectParentOf(const Identifier* identifier) const
     {
-        return (this->directChildren_->find(identifier) != this->directChildren_->end());
+        return (this->directChildren_.find(identifier) != this->directChildren_.end());
     }
 
Index: code/branches/core5/src/libraries/core/Identifier.h
===================================================================
--- code/branches/core5/src/libraries/core/Identifier.h	(revision 5781)
+++ code/branches/core5/src/libraries/core/Identifier.h	(revision 5783)
@@ -138,9 +138,9 @@
 
             /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
-            inline const std::set<const Identifier*>& getChildren() const { return (*this->children_); }
+            inline const std::set<const Identifier*>& getChildren() const { return this->children_; }
             /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */
-            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_->begin(); }
+            inline std::set<const Identifier*>::const_iterator getChildrenBegin() const { return this->children_.begin(); }
             /** @brief Returns the end-iterator of the children-list. @return The end-iterator */
-            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_->end(); }
+            inline std::set<const Identifier*>::const_iterator getChildrenEnd() const { return this->children_.end(); }
 
             /** @brief Returns the direct parents of the class the Identifier belongs to. @return The list of all direct parents */
@@ -152,9 +152,9 @@
 
             /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */
-            inline const std::set<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }
+            inline const std::set<const Identifier*>& getDirectChildren() const { return this->directChildren_; }
             /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_->begin(); }
+            inline std::set<const Identifier*>::const_iterator getDirectChildrenBegin() const { return this->directChildren_.begin(); }
             /** @brief Returns the end-iterator of the direct-children-list. @return The end-iterator */
-            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }
+            inline std::set<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_.end(); }
 
 
@@ -296,28 +296,15 @@
 
             /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
-            inline std::set<const Identifier*>& getChildrenIntern() const { return (*this->children_); }
+            inline std::set<const Identifier*>& getChildrenIntern() const { return this->children_; }
             /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
-            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
+            inline std::set<const Identifier*>& getDirectChildrenIntern() const { return this->directChildren_; }
 
             ObjectListBase* objects_;                                      //!< The list of all objects of this class
 
         private:
-            /**
-                @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
-            */
-            inline static void startCreatingHierarchy()
-            {
-                hierarchyCreatingCounter_s++;
-                COUT(4) << "*** Identifier: Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
-            }
-
-            /**
-                @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
-            */
-            inline static void stopCreatingHierarchy()
-            {
-                hierarchyCreatingCounter_s--;
-                COUT(4) << "*** Identifier: Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
-            }
+            /** @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents. */
+            inline static void startCreatingHierarchy() { hierarchyCreatingCounter_s++; }
+            /** @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents. */
+            inline static void stopCreatingHierarchy()  { hierarchyCreatingCounter_s--; }
 
             static std::map<std::string, Identifier*>& getTypeIDIdentifierMap();
@@ -326,8 +313,8 @@
 
             std::set<const Identifier*> parents_;                          //!< The parents of the class the Identifier belongs to
-            std::set<const Identifier*>* children_;                        //!< The children of the class the Identifier belongs to
+            mutable std::set<const Identifier*> children_;                 //!< The children of the class the Identifier belongs to
 
             std::set<const Identifier*> directParents_;                    //!< The direct parents of the class the Identifier belongs to
-            std::set<const Identifier*>* directChildren_;                  //!< The direct children of the class the Identifier belongs to
+            mutable std::set<const Identifier*> directChildren_;           //!< The direct children of the class the Identifier belongs to
 
             bool bCreatedOneObject_;                                       //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
