Index: /code/branches/core4/src/core/CoreIncludes.h
===================================================================
--- /code/branches/core4/src/core/CoreIncludes.h	(revision 3223)
+++ /code/branches/core4/src/core/CoreIncludes.h	(revision 3224)
@@ -56,25 +56,8 @@
 */
 #define InternRegisterObject(ClassName, bRootClass) \
-    this->setIdentifier(orxonox::ClassIdentifier<ClassName>::getIdentifier(#ClassName)); \
-    if (orxonox::Identifier::isCreatingHierarchy()) \
-    { \
-        if (this->getParents()) \
-        { \
-            orxonox::ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initializeClassHierarchy(this->getParents(), bRootClass); \
-            this->getParents()->insert(this->getParents()->end(), this->getIdentifier()); \
-        } \
-        this->setConfigValues(); \
+    if (ClassIdentifier<ClassName>::getIdentifier(#ClassName)->initialiseObject(this, #ClassName, bRootClass)) \
         return; \
-    } \
-    orxonox::ClassIdentifier<ClassName>::getIdentifier()->addObject(this)
-
-/**
-    @brief Intern macro, containing the specific part of RegisterRootObject.
-    @param ClassName The name of the class
-*/
-#define InternRegisterRootObject(ClassName) \
-    if (orxonox::Identifier::isCreatingHierarchy() && !this->getParents()) \
-        this->createParents(); \
-    InternRegisterObject(ClassName, true)
+    else \
+        ((void)0)
 
 /**
@@ -83,5 +66,4 @@
 */
 #define RegisterObject(ClassName) \
-    COUT(5) << "*** Register Object: " << #ClassName << std::endl; \
     InternRegisterObject(ClassName, false)
 
@@ -91,6 +73,5 @@
 */
 #define RegisterRootObject(ClassName) \
-    COUT(5) << "*** Register Root-Object: " << #ClassName << std::endl; \
-    InternRegisterRootObject(ClassName)
+    InternRegisterObject(ClassName, true)
 
 /**
@@ -115,17 +96,25 @@
     orxonox::ClassIdentifier<ClassName>::getIdentifier()
 
-/**
-    @brief Returns the Identifier with a given name through the factory.
-    @param String The name of the class
-*/
-#define ClassByString(String) \
-    orxonox::Factory::getIdentifier(String)
 
-/**
-    @brief Returns the Identifier with a given network ID through the factory.
-    @param networkID The network ID of the class
-*/
-#define ClassByID(networkID) \
-    orxonox::Factory::getIdentifier(networkID)
+namespace orxonox
+{
+    /**
+        @brief Returns the Identifier with a given name through the factory.
+        @param String The name of the class
+    */
+    inline Identifier* ClassByString(const std::string& name)
+    {
+        return Factory::getIdentifier(name);
+    }
+
+    /**
+        @brief Returns the Identifier with a given network ID through the factory.
+        @param networkID The network ID of the class
+    */
+    inline Identifier* ClassByID(uint32_t id)
+    {
+        return Factory::getIdentifier(id);
+    }
+}
 
 #endif /* _CoreIncludes_H__ */
Index: /code/branches/core4/src/core/Identifier.h
===================================================================
--- /code/branches/core4/src/core/Identifier.h	(revision 3223)
+++ /code/branches/core4/src/core/Identifier.h	(revision 3224)
@@ -349,5 +349,6 @@
             static ClassIdentifier<T> *getIdentifier();
             static ClassIdentifier<T> *getIdentifier(const std::string& name);
-            void addObject(T* object);
+
+            bool initialiseObject(T* object, const std::string& className, bool bRootClass);
 
             void updateConfigValues(bool updateChildren = true) const;
@@ -428,10 +429,35 @@
     */
     template <class T>
-    inline void ClassIdentifier<T>::addObject(T* object)
-    {
-        COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
-        object->getMetaList().add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
-        // Add pointer of type T to the map in the OrxonoxClass instance that enables "dynamic_casts"
-        object->objectPointers_.push_back(std::make_pair(this->getClassID(), reinterpret_cast<void*>(object)));
+    bool ClassIdentifier<T>::initialiseObject(T* object, const std::string& className, bool bRootClass)
+    {
+        if (bRootClass)
+            COUT(5) << "*** Register Root-Object: " << className << std::endl;
+        else
+            COUT(5) << "*** Register Object: " << className << std::endl;
+
+        object->identifier_ = this;
+        if (Identifier::isCreatingHierarchy())
+        {
+            if (bRootClass && !object->parents_)
+                object->parents_ = new std::set<const Identifier*>();
+
+            if (object->parents_)
+            {
+                this->initializeClassHierarchy(object->parents_, bRootClass);
+                object->parents_->insert(object->parents_->end(), this);
+            }
+
+            object->setConfigValues();
+            return true;
+        }
+        else
+        {
+            COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
+            object->metaList_->add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
+
+            // Add pointer of type T to the map in the OrxonoxClass instance that enables "dynamic_casts"
+            object->objectPointers_.push_back(std::make_pair(this->getClassID(), reinterpret_cast<void*>(object)));
+            return false;
+        }
     }
 
Index: /code/branches/core4/src/core/OrxonoxClass.h
===================================================================
--- /code/branches/core4/src/core/OrxonoxClass.h	(revision 3223)
+++ /code/branches/core4/src/core/OrxonoxClass.h	(revision 3224)
@@ -63,17 +63,4 @@
             inline Identifier* getIdentifier() const { return this->identifier_; }
 
-            /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */
-            inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
-
-            /** @brief Returns the list of all parents of the object. @return The list */
-            inline std::set<const Identifier*>* getParents() const { return this->parents_; }
-
-            /** @brief Creates the parents-list. */
-            inline void createParents() { this->parents_ = new std::set<const Identifier*>(); }
-
-            /** @brief Returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. @return The list */
-            inline MetaObjectList& getMetaList() { return (*this->metaList_); }
-
-
             bool isA(const Identifier* identifier);
             bool isExactlyA(const Identifier* identifier);
Index: /code/branches/core4/src/network/NetworkFunction.h
===================================================================
--- /code/branches/core4/src/network/NetworkFunction.h	(revision 3223)
+++ /code/branches/core4/src/network/NetworkFunction.h	(revision 3224)
@@ -38,6 +38,6 @@
 #include <boost/preprocessor/cat.hpp>
 
-#include "core/OrxonoxClass.h"
 #include "core/Functor.h"
+#include "core/Identifier.h"
 #include "FunctionCallManager.h"
 #include "synchronisable/Synchronisable.h"
