Index: code/branches/objecthierarchie/src/BaseObject.h
===================================================================
--- code/branches/objecthierarchie/src/BaseObject.h	(revision 218)
+++ code/branches/objecthierarchie/src/BaseObject.h	(revision 219)
@@ -64,5 +64,4 @@
                 { this->getIdentifier()->isDirectParentOf(object->getIdentifier); }
 */
-
     };
 }
Index: code/branches/objecthierarchie/src/CMakeLists.txt
===================================================================
--- code/branches/objecthierarchie/src/CMakeLists.txt	(revision 218)
+++ code/branches/objecthierarchie/src/CMakeLists.txt	(revision 219)
@@ -2,6 +2,6 @@
 
 # create a few variables to simplify life
-SET(SRC_FILES orxonox.cc IdentifierList.cc ObjectList.cc Identifier.cc Factory.cc ClassHierarchy.cc OrxonoxClass.cc BaseObject.cc test1.cc test2.cc test3.cc)
-SET(INC_FILES IdentifierIncludes.h ClassHierarchy.h Identifier.h Factory.h IdentifierList.h ObjectList.h OrxonoxClass.h BaseObject.h Test.h test1.h test2.h test3.h)
+SET(SRC_FILES orxonox.cc IdentifierList.cc ObjectList.cc Identifier.cc Factory.cc OrxonoxClass.cc BaseObject.cc test1.cc test2.cc test3.cc)
+SET(INC_FILES IdentifierIncludes.h Identifier.h Factory.h IdentifierList.h ObjectList.h OrxonoxClass.h BaseObject.h Test.h test1.h test2.h test3.h)
 
 #Creates an executable
Index: code/branches/objecthierarchie/src/ClassHierarchy.cc
===================================================================
--- code/branches/objecthierarchie/src/ClassHierarchy.cc	(revision 218)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#include "ClassHierarchy.h"
-#include "OrxonoxClass.h"
-
-namespace orxonox
-{
-    // ###############################
-    // ###     ClassHierarchy      ###
-    // ###############################
-    ClassHierarchy* ClassHierarchy::pointer_ = NULL;
-
-    ClassHierarchy* ClassHierarchy::getSingleton()
-    {
-        if (!pointer_)
-            pointer_ = new ClassHierarchy();
-
-        return pointer_;
-    }
-
-    ClassHierarchy::ClassHierarchy()
-    {
-        this->hierarchyCreatingCounter_ = 0;
-    }
-
-    ClassHierarchy::~ClassHierarchy()
-    {
-      this->pointer_ = NULL;
-    }
-}
Index: code/branches/objecthierarchie/src/ClassHierarchy.h
===================================================================
--- code/branches/objecthierarchie/src/ClassHierarchy.h	(revision 218)
+++ 	(revision )
@@ -1,100 +1,0 @@
-#ifndef _ClassHierarchy_H__
-#define _ClassHierarchy_H__
-
-#include <string>
-#include <iostream>
-
-// DONE AND TESTED:
-// - build class hierarchy
-// - isA, isChildOf, ...
-// - insert into class-lists
-// - ClassIdentifier
-// - BaseIdentifier
-// - Factory
-
-// IN WORK:
-
-// TO DO:
-// - iterate through lists
-
-
-namespace orxonox
-{
-    // ##### ClassHierarchy #####
-    template <class T>
-    class ClassIdentifier;
-
-    class ClassHierarchy
-    {
-        template <class T>
-        friend class ClassIdentifier;
-
-        public:
-            static ClassHierarchy* getSingleton();
-            bool isCreatingHierarchy() { return (this->hierarchyCreatingCounter_ > 0); }
-
-        private:
-            ClassHierarchy();
-            ClassHierarchy(const ClassHierarchy& hierarchy);
-            ~ClassHierarchy();
-            void startCreatingHierarchy() { this->hierarchyCreatingCounter_++; std::cout << "*** Increased Hierarchy-Creating-Counter to " << this->hierarchyCreatingCounter_ << "\n"; }
-            void stopCreatingHierarchy() { this->hierarchyCreatingCounter_--; std::cout << "*** Decreased Hierarchy-Creating-Counter to " << this->hierarchyCreatingCounter_ << "\n"; }
-
-            static ClassHierarchy* pointer_;
-            int hierarchyCreatingCounter_;
-    };
-
-
-    // ##### Macros #####
-    #define registerRootObject(ClassName) \
-        std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && !this->getParents()) \
-            this->setParents(new IdentifierList()); \
-        if (this->getIdentifier()) \
-            this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, false)); \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
-            this->getParents()->add(this->getIdentifier()); \
-        this->getIdentifier()->addObject(this)
-
-    #define registerAbstractRootObject(ClassName) \
-        std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && !this->getParents()) \
-            this->setParents(new IdentifierList()); \
-        if (this->getIdentifier()) \
-            this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, true)); \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
-            this->getParents()->add(this->getIdentifier()); \
-        this->getIdentifier()->addObject(this)
-
-    #define registerObject(ClassName) \
-        std::cout << "*** Register Object: " << #ClassName << "\n"; \
-        this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, false)); \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
-            this->getParents()->add(this->getIdentifier()); \
-        this->getIdentifier()->addObject(this)
-
-    #define registerAbstractObject(ClassName) \
-        std::cout << "*** Register Object: " << #ClassName << "\n"; \
-        this->getIdentifier()->removeObject(this); \
-        this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, true)); \
-        if (ClassHierarchy::getSingleton()->isCreatingHierarchy() && this->getParents()) \
-            this->getParents()->add(this->getIdentifier()); \
-        this->getIdentifier()->addObject(this)
-
-    #define unregisterObject() \
-        this->getIdentifier()->removeObject(this)
-
-    #define Class(ClassName) \
-        ClassIdentifier<ClassName>::getIdentifier()
-
-    #define CreateFactory(ClassName) \
-        Identifier* global_##ClassName##_Identifier = ClassIdentifier<ClassName>::getIdentifier()
-
-    #define Factory(Name) \
-        ClassFactory::fabricate(Name)
-}
-
-#endif
Index: code/branches/objecthierarchie/src/Factory.cc
===================================================================
--- code/branches/objecthierarchie/src/Factory.cc	(revision 218)
+++ code/branches/objecthierarchie/src/Factory.cc	(revision 219)
@@ -1,23 +1,24 @@
 #include "Factory.h"
 #include "Identifier.h"
+#include "BaseObject.h"
 
 namespace orxonox
 {
-    ClassFactory* ClassFactory::pointer_ = NULL;
+    ClassFactory* ClassFactory::pointer_s = NULL;
 
-    OrxonoxClass* ClassFactory::fabricate(const std::string& name)
+    BaseObject* ClassFactory::fabricate(const std::string& name)
     {
-        if (!pointer_)
-            pointer_ = new ClassFactory;
+        if (!pointer_s)
+            pointer_s = new ClassFactory;
 
-        return pointer_->identifierMap_[name]->fabricate();
+        return pointer_s->identifierMap_[name]->fabricate();
     }
 
     void ClassFactory::add(const std::string& name, Identifier* identifier)
     {
-        if (!pointer_)
-            pointer_ = new ClassFactory;
+        if (!pointer_s)
+            pointer_s = new ClassFactory;
 
-        pointer_->identifierMap_[name] = identifier;
+        pointer_s->identifierMap_[name] = identifier;
     }
 }
Index: code/branches/objecthierarchie/src/Factory.h
===================================================================
--- code/branches/objecthierarchie/src/Factory.h	(revision 218)
+++ code/branches/objecthierarchie/src/Factory.h	(revision 219)
@@ -8,10 +8,10 @@
 {
     class Identifier;
-    class OrxonoxClass;
+    class BaseObject;
 
     class ClassFactory
     {
         public:
-            static OrxonoxClass* fabricate(const std::string& name);
+            static BaseObject* fabricate(const std::string& name);
             static void add(const std::string& name, Identifier* identifier);
 
@@ -21,5 +21,5 @@
             ~ClassFactory() {}
 
-            static ClassFactory* pointer_;
+            static ClassFactory* pointer_s;
             std::map<std::string, Identifier*> identifierMap_;
     };
Index: code/branches/objecthierarchie/src/Identifier.cc
===================================================================
--- code/branches/objecthierarchie/src/Identifier.cc	(revision 218)
+++ code/branches/objecthierarchie/src/Identifier.cc	(revision 219)
@@ -6,21 +6,23 @@
     // ###       Identifier        ###
     // ###############################
+    int Identifier::hierarchyCreatingCounter_s = 0;
+
     Identifier::Identifier()
     {
         this->bCreatedOneObject_ = false;
-        this->directParents_ = new IdentifierList();
-        this->allParents_ = new IdentifierList();
-        this->directChildren_ = new IdentifierList();
-        this->allChildren_ = new IdentifierList();
-        this->objects_ = new ObjectList();
+//        this->directParents_ = new IdentifierList();
+//        this->allParents_ = new IdentifierList();
+//        this->directChildren_ = new IdentifierList();
+//        this->allChildren_ = new IdentifierList();
+//        this->objects_ = new ObjectList();
     }
 
     Identifier::~Identifier()
     {
-        delete this->directParents_;
-        delete this->allParents_;
-        delete this->directChildren_;
-        delete this->allChildren_;
-        delete this->objects_;
+//        delete this->directParents_;
+//        delete this->allParents_;
+//        delete this->directChildren_;
+//        delete this->allChildren_;
+//        delete this->objects_;
         delete &this->name_;
     }
@@ -40,5 +42,5 @@
             while (temp1)
             {
-                temp2 = temp1->identifier_->directParents_->first_;
+                temp2 = temp1->identifier_->directParents_.first_;
                 while (temp2)
                 {
@@ -62,10 +64,10 @@
                 if (temp1->bDirect_)
                 {
-                    this->directParents_->add(temp1->identifier_);
-                    temp1->identifier_->directChildren_->add(this);
+                    this->directParents_.add(temp1->identifier_);
+                    temp1->identifier_->directChildren_.add(this);
                 }
 
-                this->allParents_->add(temp1->identifier_);
-                temp1->identifier_->allChildren_->add(this);
+                this->allParents_.add(temp1->identifier_);
+                temp1->identifier_->allChildren_.add(this);
 
                 temp1 = temp1->next_;
@@ -77,5 +79,5 @@
     {
         std::cout << "*** Added " << this->name_ << " to list.\n";
-        this->objects_->add(object);
+        this->objects_.add(object);
     }
 
@@ -83,10 +85,10 @@
     {
         std::cout << "*** Removed " << this->name_ << " from list.\n";
-        this->objects_->remove(object);
+        this->objects_.remove(object);
     }
 
     bool Identifier::isA(Identifier* identifier)
     {
-        return (identifier == this || this->allParents_->isInList(identifier));
+        return (identifier == this || this->allParents_.isInList(identifier));
     }
 
@@ -98,20 +100,20 @@
     bool Identifier::isChildOf(Identifier* identifier)
     {
-        return this->allParents_->isInList(identifier);
+        return this->allParents_.isInList(identifier);
     }
 
     bool Identifier::isDirectChildOf(Identifier* identifier)
     {
-        return this->directParents_->isInList(identifier);
+        return this->directParents_.isInList(identifier);
     }
 
     bool Identifier::isParentOf(Identifier* identifier)
     {
-        return this->allChildren_->isInList(identifier);
+        return this->allChildren_.isInList(identifier);
     }
 
     bool Identifier::isDirectParentOf(Identifier* identifier)
     {
-        return this->directChildren_->isInList(identifier);
+        return this->directChildren_.isInList(identifier);
     }
 }
Index: code/branches/objecthierarchie/src/Identifier.h
===================================================================
--- code/branches/objecthierarchie/src/Identifier.h	(revision 218)
+++ code/branches/objecthierarchie/src/Identifier.h	(revision 219)
@@ -2,12 +2,28 @@
 #define _Identifier_H__
 
-#include "ClassHierarchy.h"
+#include <iostream>
+
 #include "IdentifierList.h"
 #include "ObjectList.h"
-#include "OrxonoxClass.h"
+//#include "OrxonoxClass.h"
 #include "Factory.h"
+
+// DONE AND TESTED:
+// - build class hierarchy
+// - isA, isChildOf, ...
+// - insert into class-lists
+// - ClassIdentifier
+// - BaseIdentifier
+// - Factory
+
+// IN WORK:
+
+// TO DO:
+// - iterate through lists
 
 namespace orxonox
 {
+    class BaseObject;
+
     // ##### Identifier #####
     class Identifier
@@ -23,5 +39,5 @@
             void removeObject(OrxonoxClass* object);
 
-            virtual OrxonoxClass* fabricate() {};
+            virtual BaseObject* fabricate() {};
 
             bool isA(Identifier* identifier);
@@ -33,8 +49,10 @@
 
             std::string getName() { return this->name_; }
-            IdentifierList* getDirectParents() { return this->directParents_; }
-            IdentifierList* getAllParents() { return this->allParents_; }
-            IdentifierList* getDirectChildren() { return this->directChildren_; }
-            IdentifierList* getAllChildren() { return this->allChildren_; }
+            IdentifierList* getDirectParents() { return &(this->directParents_); }
+            IdentifierList* getAllParents() { return &(this->allParents_); }
+            IdentifierList* getDirectChildren() { return &(this->directChildren_); }
+            IdentifierList* getAllChildren() { return &(this->allChildren_); }
+
+            static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
 
         private:
@@ -44,14 +62,19 @@
             void initialize(IdentifierList* parents);
 
-            IdentifierList* directParents_;
-            IdentifierList* allParents_;
-            IdentifierList* directChildren_;
-            IdentifierList* allChildren_;
-
-            ObjectList* objects_;
+            static void startCreatingHierarchy() { hierarchyCreatingCounter_s++; std::cout << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n"; }
+            static void stopCreatingHierarchy() { hierarchyCreatingCounter_s--; std::cout << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << "\n"; }
+
+            IdentifierList directParents_;
+            IdentifierList allParents_;
+            IdentifierList directChildren_;
+            IdentifierList allChildren_;
+
+            ObjectList objects_;
             std::string name_;
 
             bool bIsAbstractClass_;
             bool bCreatedOneObject_;
+
+            static int hierarchyCreatingCounter_s;
     };
 
@@ -64,5 +87,5 @@
             static ClassIdentifier<T>* registerClass(IdentifierList* parents, std::string name, bool bRootClass, bool bIsAbstractClass);
             static ClassIdentifier<T>* getIdentifier();
-            OrxonoxClass* fabricate();
+            BaseObject* fabricate();
             T* fabricateClass();
 
@@ -72,10 +95,10 @@
             ~ClassIdentifier();
 
-            static ClassIdentifier<T>* pointer_;
+            static ClassIdentifier<T>* pointer_s;
 
     };
 
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::pointer_ = NULL;
+    ClassIdentifier<T>* ClassIdentifier<T>::pointer_s = NULL;
 
     template <class T>
@@ -87,11 +110,11 @@
     ClassIdentifier<T>::~ClassIdentifier()
     {
-        this->pointer_ = NULL;
-    }
-
-    template <class T>
-    OrxonoxClass* ClassIdentifier<T>::fabricate()
-    {
-        return this->fabricateClass();
+        this->pointer_s = NULL;
+    }
+
+    template <class T>
+    BaseObject* ClassIdentifier<T>::fabricate()
+    {
+        return dynamic_cast<BaseObject*>(this->fabricateClass());
     }
 
@@ -99,5 +122,14 @@
     T* ClassIdentifier<T>::fabricateClass()
     {
-        return new T;
+        if (!this->bIsAbstractClass_)
+        {
+            return new T;
+        }
+        else
+        {
+            std::cout << "Error: Couldn't create a new Object - Class " << this->name_ << " is abstract!\n";
+            std::cout << "Aborting...\n";
+            abort();
+        }
     }
 
@@ -106,24 +138,24 @@
     {
         std::cout << "*** Register Class in " << name << "-Singleton.\n";
-        if (!pointer_)
+        if (!pointer_s)
         {
             std::cout << "*** Register Class in " << name << "-Singleton -> Create Singleton.\n";
             if (parents || bRootClass)
             {
-                pointer_ = new ClassIdentifier();
-                pointer_->name_ = name;
-                pointer_->bIsAbstractClass_ = bIsAbstractClass;
-
-                ClassFactory::add(name, pointer_);
-
-                pointer_->initialize(parents);
+                pointer_s = new ClassIdentifier();
+                pointer_s->name_ = name;
+                pointer_s->bIsAbstractClass_ = bIsAbstractClass;
+
+                ClassFactory::add(name, pointer_s);
+
+                pointer_s->initialize(parents);
             }
             else
             {
-                pointer_ = getIdentifier();
-            }
-        }
-
-        return pointer_;
+                pointer_s = getIdentifier();
+            }
+        }
+
+        return pointer_s;
     }
 
@@ -132,14 +164,14 @@
     {
 //        std::cout << "*** Get Identifier.\n";
-        if (!pointer_)
+        if (!pointer_s)
         {
             std::cout << "*** Get Identifier -> Create Class\n";
-            ClassHierarchy::getSingleton()->startCreatingHierarchy();
+            Identifier::startCreatingHierarchy();
             T* temp = new T();
-            ClassHierarchy::getSingleton()->stopCreatingHierarchy();
+            Identifier::stopCreatingHierarchy();
             delete temp;
         }
 
-        return pointer_;
+        return pointer_s;
     }
 
@@ -176,5 +208,5 @@
             B* fabricate()
             {
-                OrxonoxClass* newObject = this->identifier_->fabricate();
+                BaseObject* newObject = this->identifier_->fabricate();
                 if (newObject)
                 {
Index: code/branches/objecthierarchie/src/IdentifierIncludes.h
===================================================================
--- code/branches/objecthierarchie/src/IdentifierIncludes.h	(revision 218)
+++ code/branches/objecthierarchie/src/IdentifierIncludes.h	(revision 219)
@@ -1,3 +1,2 @@
-#include "ClassHierarchy.h"
 #include "Identifier.h"
 #include "Factory.h"
@@ -5,2 +4,53 @@
 #include "ObjectList.h"
 #include "OrxonoxClass.h"
+
+
+#define registerRootObject(ClassName) \
+    std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
+    if (Identifier::isCreatingHierarchy() && !this->getParents()) \
+        this->setParents(new IdentifierList()); \
+    if (this->getIdentifier()) \
+        this->getIdentifier()->removeObject(this); \
+    this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, false)); \
+    if (Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    this->getIdentifier()->addObject(this)
+
+#define registerAbstractRootObject(ClassName) \
+    std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
+    if (Identifier::isCreatingHierarchy() && !this->getParents()) \
+        this->setParents(new IdentifierList()); \
+    if (this->getIdentifier()) \
+        this->getIdentifier()->removeObject(this); \
+    this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, true, true)); \
+    if (Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    this->getIdentifier()->addObject(this)
+
+#define registerObject(ClassName) \
+    std::cout << "*** Register Object: " << #ClassName << "\n"; \
+    this->getIdentifier()->removeObject(this); \
+    this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, false)); \
+    if (Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    this->getIdentifier()->addObject(this)
+
+#define registerAbstractObject(ClassName) \
+    std::cout << "*** Register Object: " << #ClassName << "\n"; \
+    this->getIdentifier()->removeObject(this); \
+    this->setIdentifier(ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, false, true)); \
+    if (Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    this->getIdentifier()->addObject(this)
+
+#define unregisterObject() \
+    this->getIdentifier()->removeObject(this)
+
+#define Class(ClassName) \
+    ClassIdentifier<ClassName>::getIdentifier()
+
+#define CreateFactory(ClassName) \
+    Identifier* global_##ClassName##_Identifier = ClassIdentifier<ClassName>::getIdentifier()
+
+#define Factory(Name) \
+    ClassFactory::fabricate(Name)
Index: code/branches/objecthierarchie/src/OrxonoxClass.cc
===================================================================
--- code/branches/objecthierarchie/src/OrxonoxClass.cc	(revision 218)
+++ code/branches/objecthierarchie/src/OrxonoxClass.cc	(revision 219)
@@ -1,3 +1,2 @@
-#include "ClassHierarchy.h"
 #include "OrxonoxClass.h"
 
Index: code/branches/objecthierarchie/src/OrxonoxClass.h
===================================================================
--- code/branches/objecthierarchie/src/OrxonoxClass.h	(revision 218)
+++ code/branches/objecthierarchie/src/OrxonoxClass.h	(revision 219)
@@ -2,6 +2,6 @@
 #define _OrxonoxClass_H__
 
+#include "Identifier.h"
 #include "IdentifierList.h"
-#include "Identifier.h"
 
 namespace orxonox
Index: code/branches/objecthierarchie/src/Test.h
===================================================================
--- code/branches/objecthierarchie/src/Test.h	(revision 218)
+++ code/branches/objecthierarchie/src/Test.h	(revision 219)
@@ -10,5 +10,5 @@
     {
         public:
-            Interface1() { registerRootObject(Interface1); }
+            Interface1() { registerAbstractRootObject(Interface1); }
     };
 
@@ -16,5 +16,5 @@
     {
         public:
-            Interface2() { registerRootObject(Interface2); }
+            Interface2() { registerAbstractRootObject(Interface2); }
     };
 
Index: code/branches/objecthierarchie/src/orxonox.cc
===================================================================
--- code/branches/objecthierarchie/src/orxonox.cc	(revision 218)
+++ code/branches/objecthierarchie/src/orxonox.cc	(revision 219)
@@ -504,9 +504,9 @@
         std::cout << "1\n";
         Identifier* test9_01 = Class(A3);
-        OrxonoxClass* test9_02 = test9_01->fabricate();
+        BaseObject* test9_02 = test9_01->fabricate();
         std::cout << test9_02->getIdentifier()->getName() << "\n";
 
         std::cout << "\n2\n";
-        OrxonoxClass* test9_03 = Class(A1B2)->fabricate();
+        BaseObject* test9_03 = Class(A1B2)->fabricate();
         std::cout << test9_03->getIdentifier()->getName() << "\n";
 
@@ -518,5 +518,5 @@
 
         std::cout << "\n4\n";
-        OrxonoxClass* test9_06 = Factory("A2B2");
+        BaseObject* test9_06 = Factory("A2B2");
         std::cout << test9_06->getIdentifier()->getName() << "\n";
 
