Index: code/branches/objecthierarchie/src/BaseObject.h
===================================================================
--- code/branches/objecthierarchie/src/BaseObject.h	(revision 242)
+++ code/branches/objecthierarchie/src/BaseObject.h	(revision 243)
@@ -18,10 +18,6 @@
             inline bool isChildOf(const Identifier* identifier)
                 { this->getIdentifier()->isChildOf(identifier); }
-            inline bool isDirectChildOf(const Identifier* identifier)
-                { this->getIdentifier()->isDirectChildOf(identifier); }
             inline bool isParentOf(const Identifier* identifier)
                 { this->getIdentifier()->isParentOf(identifier); }
-            inline bool isDirectParentOf(const Identifier* identifier)
-                { this->getIdentifier()->isDirectParentOf(identifier); }
 
             inline bool isA(const SubclassIdentifier<class B>* identifier)
@@ -31,10 +27,6 @@
             inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
                 { this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
-            inline bool isDirectChildOf(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
             inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
                 { this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
-            inline bool isDirectParentOf(const SubclassIdentifier<class B>* identifier)
-                { this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
 
             inline bool isA(const SubclassIdentifier<class B> identifier)
@@ -44,10 +36,6 @@
             inline bool isChildOf(const SubclassIdentifier<class B> identifier)
                 { this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
-            inline bool isDirectChildOf(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
             inline bool isParentOf(const SubclassIdentifier<class B> identifier)
                 { this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
-            inline bool isDirectParentOf(const SubclassIdentifier<class B> identifier)
-                { this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
 
             inline bool isA(const OrxonoxClass* object)
@@ -57,10 +45,6 @@
             inline bool isChildOf(const OrxonoxClass* object)
                 { this->getIdentifier()->isChildOf(object->getIdentifier()); }
-            inline bool isDirectChildOf(const OrxonoxClass* object)
-                { this->getIdentifier()->isDirectChildOf(object->getIdentifier()); }
             inline bool isParentOf(const OrxonoxClass* object)
                 { this->getIdentifier()->isParentOf(object->getIdentifier()); }
-            inline bool isDirectParentOf(const OrxonoxClass* object)
-                { this->getIdentifier()->isDirectParentOf(object->getIdentifier()); }
 
             std::string name_; // test
Index: code/branches/objecthierarchie/src/Identifier.cc
===================================================================
--- code/branches/objecthierarchie/src/Identifier.cc	(revision 242)
+++ code/branches/objecthierarchie/src/Identifier.cc	(revision 243)
@@ -12,6 +12,5 @@
         this->bCreatedOneObject_ = false;
 
-        this->directChildren_ = new IdentifierList;
-        this->allChildren_ = new IdentifierList;
+        this->children_ = new IdentifierList;
     }
 
@@ -20,6 +19,5 @@
         delete &this->name_;
 
-        delete this->directChildren_;
-        delete this->allChildren_;
+        delete this->children_;
     }
 
@@ -33,39 +31,9 @@
             this->bCreatedOneObject_ = true;
 
-            IdentifierListElement* temp1;
-            IdentifierListElement* temp2;
-            IdentifierListElement* temp3;
-
-            temp1 = parents->first_;
+            IdentifierListElement* temp1 = parents->first_;
             while (temp1)
             {
-                temp2 = temp1->identifier_->directParents_.first_;
-                while (temp2)
-                {
-                    temp3 = parents->first_;
-                    while(temp3)
-                    {
-                        if (temp3->identifier_ == temp2->identifier_)
-                            temp3->bDirect_ = false;
-
-                        temp3 = temp3->next_;
-                    }
-
-                    temp2 = temp2->next_;
-                }
-                temp1 = temp1->next_;
-            }
-
-            temp1 = parents->first_;
-            while (temp1)
-            {
-                if (temp1->bDirect_)
-                {
-                    this->directParents_.add(temp1->identifier_);
-                    temp1->identifier_->getDirectChildren().add(this);
-                }
-
-                this->allParents_.add(temp1->identifier_);
-                temp1->identifier_->getAllChildren().add(this);
+                this->parents_.add(temp1->identifier_);
+                temp1->identifier_->getChildren().add(this);
 
                 temp1 = temp1->next_;
@@ -76,5 +44,5 @@
     bool Identifier::isA(const Identifier* identifier) const
     {
-        return (identifier == this || this->allParents_.isInList(identifier));
+        return (identifier == this || this->parents_.isInList(identifier));
     }
 
@@ -86,20 +54,10 @@
     bool Identifier::isChildOf(const Identifier* identifier) const
     {
-        return this->allParents_.isInList(identifier);
-    }
-
-    bool Identifier::isDirectChildOf(const Identifier* identifier) const
-    {
-        return this->directParents_.isInList(identifier);
+        return this->parents_.isInList(identifier);
     }
 
     bool Identifier::isParentOf(const Identifier* identifier) const
     {
-        return this->allChildren_->isInList(identifier);
-    }
-
-    bool Identifier::isDirectParentOf(const Identifier* identifier) const
-    {
-        return this->directChildren_->isInList(identifier);
+        return this->children_->isInList(identifier);
     }
 }
Index: code/branches/objecthierarchie/src/Identifier.h
===================================================================
--- code/branches/objecthierarchie/src/Identifier.h	(revision 242)
+++ code/branches/objecthierarchie/src/Identifier.h	(revision 243)
@@ -28,4 +28,5 @@
         public:
             virtual void removeObject(OrxonoxClass* object) const = 0;
+            virtual void removeObjectIntern(OrxonoxClass* object, bool bIterateForwards) const = 0;
 
             virtual BaseObject* fabricate() const = 0;
@@ -34,13 +35,9 @@
             bool isDirectlyA(const Identifier* identifier) const;
             bool isChildOf(const Identifier* identifier) const;
-            bool isDirectChildOf(const Identifier* identifier) const;
             bool isParentOf(const Identifier* identifier) const;
-            bool isDirectParentOf(const Identifier* identifier) const;
 
             const std::string& getName() const { return this->name_; }
-            const IdentifierList& getDirectParents() const { return this->directParents_; }
-            const IdentifierList& getAllParents() const { return this->allParents_; }
-            IdentifierList& getDirectChildren() const { return *this->directChildren_; }
-            IdentifierList& getAllChildren() const { return *this->allChildren_; }
+            const IdentifierList& getParents() const { return this->parents_; }
+            IdentifierList& getChildren() const { return *this->children_; }
 
             static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
@@ -68,8 +65,6 @@
             }
 
-            IdentifierList directParents_;
-            IdentifierList allParents_;
-            IdentifierList* directChildren_;
-            IdentifierList* allChildren_;
+            IdentifierList parents_;
+            IdentifierList* children_;
 
             std::string name_;
@@ -98,4 +93,5 @@
             static void addObject(T* object);
             void removeObject(OrxonoxClass* object) const;
+            void removeObjectIntern(OrxonoxClass* object, bool bIterateForwards) const;
 
         private:
@@ -212,4 +208,17 @@
         bool bIterateForwards = !Identifier::isCreatingHierarchy();
 
+        this->removeObjectIntern(object, bIterateForwards);
+
+        IdentifierListElement* temp = this->parents_.first_;
+        while (temp)
+        {
+            temp->identifier_->removeObjectIntern(object, bIterateForwards);
+            temp = temp->next_;
+        }
+    }
+
+    template <class T>
+    void ClassIdentifier<T>::removeObjectIntern(OrxonoxClass* object, bool bIterateForwards) const
+    {
 #if HIERARCHY_VERBOSE
         if (bIterateForwards)
@@ -220,11 +229,4 @@
 
         this->objects_->remove(object, bIterateForwards);
-
-        IdentifierListElement* temp = this->directParents_.first_;
-        while (temp)
-        {
-            temp->identifier_->removeObject(object);
-            temp = temp->next_;
-        }
     }
 
@@ -295,10 +297,6 @@
             inline bool isChildOf(const Identifier* identifier) const
                 { return this->identifier_->isChildOf(identifier); }
-            inline bool isDirectChildOf(const Identifier* identifier) const
-                { return this->identifier_->isDirectChildOf(identifier); }
             inline bool isParentOf(const Identifier* identifier) const
                 { return this->identifier_->isParentOf(identifier); }
-            inline bool isDirectParentOf(const Identifier* identifier) const
-                { return this->identifier_->isDirectParentOf(identifier); }
 
         private:
Index: code/branches/objecthierarchie/src/IdentifierList.cc
===================================================================
--- code/branches/objecthierarchie/src/IdentifierList.cc	(revision 242)
+++ code/branches/objecthierarchie/src/IdentifierList.cc	(revision 243)
@@ -98,5 +98,4 @@
         this->identifier_ = identifier;
         this->next_ = 0;
-        this->bDirect_ = true;
     }
 
Index: code/branches/objecthierarchie/src/IdentifierList.h
===================================================================
--- code/branches/objecthierarchie/src/IdentifierList.h	(revision 242)
+++ code/branches/objecthierarchie/src/IdentifierList.h	(revision 243)
@@ -16,5 +16,4 @@
             const Identifier* identifier_;
             IdentifierListElement* next_;
-            bool bDirect_;
     };
 
Index: code/branches/objecthierarchie/src/orxonox.cc
===================================================================
--- code/branches/objecthierarchie/src/orxonox.cc	(revision 242)
+++ code/branches/objecthierarchie/src/orxonox.cc	(revision 243)
@@ -147,10 +147,9 @@
         A3B2C1* test5_17 = new A3B2C1();
         A3B2C2* test5_18 = new A3B2C2();
-*/
-/*
+
         OrxonoxClass* test5;
         for (int i = 0; i <= 18; i++)
         {
-          if (i == 0) test5 = test1;
+          if (i == 0) test5 = new BaseObject;
           if (i == 1) test5 = test5_01;
           if (i == 2) test5 = test5_02;
@@ -173,8 +172,6 @@
 
           std::cout << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": directParents:  " << test5->getIdentifier()->getDirectParents()->toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": allParents:     " << test5->getIdentifier()->getAllParents()->toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": directChildren: " << test5->getIdentifier()->getDirectChildren()->toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << ": allChildren:    " << test5->getIdentifier()->getAllChildren()->toString() << "\n";
+          std::cout << test5->getIdentifier()->getName() << ": parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
+          std::cout << test5->getIdentifier()->getName() << ": children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
         }
 */
@@ -284,52 +281,4 @@
 
         std::cout << "\n";
-        std::cout << "isDirectChildOf(XYZ)-Test:\n";
-        std::cout << "test5_04 = A1B1, Erwartet: 1 0 0 0 0 0 0\n";
-        testandcout(test5_04->isDirectChildOf(Class(A1)));
-        testandcout(test5_04->isDirectChildOf(Class(A2)));
-        testandcout(test5_04->isDirectChildOf(Class(BaseObject)));
-        testandcout(test5_04->isDirectChildOf(Class(Interface1)));
-        testandcout(test5_04->isDirectChildOf(Class(Interface2)));
-        testandcout(test5_04->isDirectChildOf(Class(A1B1C2)));
-        testandcout(test5_04->isDirectChildOf(Class(A1B1)));
-
-        std::cout << "\n";
-        std::cout << "test5_06 = A2B1, Erwartet: 0 1 0 0 0 0 0\n";
-        testandcout(test5_06->isDirectChildOf(Class(A1)));
-        testandcout(test5_06->isDirectChildOf(Class(A2)));
-        testandcout(test5_06->isDirectChildOf(Class(BaseObject)));
-        testandcout(test5_06->isDirectChildOf(Class(Interface1)));
-        testandcout(test5_06->isDirectChildOf(Class(Interface2)));
-        testandcout(test5_06->isDirectChildOf(Class(A1B1C2)));
-        testandcout(test5_06->isDirectChildOf(Class(A1B1)));
-
-        std::cout << "\n";
-        std::cout << "test5_07 = A2B2, Erwartet: 0 1 0 1 0 0\n";
-        testandcout(test5_07->isDirectChildOf(Class(A1)));
-        testandcout(test5_07->isDirectChildOf(Class(A2)));
-        testandcout(test5_07->isDirectChildOf(Class(BaseObject)));
-        testandcout(test5_07->isDirectChildOf(Class(Interface1)));
-        testandcout(test5_07->isDirectChildOf(Class(Interface2)));
-        testandcout(test5_07->isDirectChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_08 = A3B1, Erwartet: 0 0 0 0 0 0\n";
-        testandcout(test5_08->isDirectChildOf(Class(A1)));
-        testandcout(test5_08->isDirectChildOf(Class(A2)));
-        testandcout(test5_08->isDirectChildOf(Class(BaseObject)));
-        testandcout(test5_08->isDirectChildOf(Class(Interface1)));
-        testandcout(test5_08->isDirectChildOf(Class(Interface2)));
-        testandcout(test5_08->isDirectChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_09 = A3B2, Erwartet: 0 0 0 0 1 0\n";
-        testandcout(test5_09->isDirectChildOf(Class(A1)));
-        testandcout(test5_09->isDirectChildOf(Class(A2)));
-        testandcout(test5_09->isDirectChildOf(Class(BaseObject)));
-        testandcout(test5_09->isDirectChildOf(Class(Interface1)));
-        testandcout(test5_09->isDirectChildOf(Class(Interface2)));
-        testandcout(test5_09->isDirectChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
         std::cout << "isParentOf(XYZ)-Test:\n";
         std::cout << "test1 = BaseObject, Erwartet: 0 0 1 1 1 1 1\n";
@@ -361,35 +310,4 @@
         testandcout(Class(Interface1)->isParentOf(Class(A2B2)));
         testandcout(Class(Interface1)->isParentOf(Class(A3B1C2)));
-
-        std::cout << "\n";
-        std::cout << "isDirectParentOf(XYZ)-Test:\n";
-        std::cout << "test1 = BaseObject, Erwartet: 0 0 1 1 0 0 0\n";
-        testandcout(test1->isDirectParentOf(Class(BaseObject)));
-        testandcout(test1->isDirectParentOf(Class(Interface1)));
-        testandcout(test1->isDirectParentOf(Class(A1)));
-        testandcout(test1->isDirectParentOf(Class(A2)));
-        testandcout(test1->isDirectParentOf(Class(A1B1)));
-        testandcout(test1->isDirectParentOf(Class(A2B2)));
-        testandcout(test1->isDirectParentOf(Class(A3B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_01 = A1, Erwartet: 0 0 0 0 1 0 0\n";
-        testandcout(test5_01->isDirectParentOf(Class(BaseObject)));
-        testandcout(test5_01->isDirectParentOf(Class(Interface1)));
-        testandcout(test5_01->isDirectParentOf(Class(A1)));
-        testandcout(test5_01->isDirectParentOf(Class(A2)));
-        testandcout(test5_01->isDirectParentOf(Class(A1B1)));
-        testandcout(test5_01->isDirectParentOf(Class(A2B2)));
-        testandcout(test5_01->isDirectParentOf(Class(A3B1C2)));
-
-        std::cout << "\n";
-        std::cout << "Interface1, Erwartet: 0 0 0 0 0 1 0\n";
-        testandcout(Class(Interface1)->isDirectParentOf(Class(BaseObject)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(Interface1)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(A1)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(A2)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(A1B1)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(A2B2)));
-        testandcout(Class(Interface1)->isDirectParentOf(Class(A3B1C2)));
 */
 /*
@@ -407,29 +325,20 @@
         std::cout << "6:\n";
         Identifier* test6_06 = Class(A1B1C1);
-*/
-/*
-        std::cout << "\n";
-        std::cout << "BaseObject: directParents:  " << Class(BaseObject)->getDirectParents()->toString() << "\n";
-        std::cout << "BaseObject: allParents:     " << Class(BaseObject)->getAllParents()->toString() << "\n";
-        std::cout << "BaseObject: directChildren: " << Class(BaseObject)->getDirectChildren()->toString() << "\n";
-        std::cout << "BaseObject: allChildren:    " << Class(BaseObject)->getAllChildren()->toString() << "\n";
-
-        std::cout << "\n";
-        std::cout << "A1: directParents:  " << Class(A1)->getDirectParents()->toString() << "\n";
-        std::cout << "A1: allParents:     " << Class(A1)->getAllParents()->toString() << "\n";
-        std::cout << "A1: directChildren: " << Class(A1)->getDirectChildren()->toString() << "\n";
-        std::cout << "A1: allChildren:    " << Class(A1)->getAllChildren()->toString() << "\n";
-
-        std::cout << "\n";
-        std::cout << "A1B1: directParents:  " << Class(A1B1)->getDirectParents()->toString() << "\n";
-        std::cout << "A1B1: allParents:     " << Class(A1B1)->getAllParents()->toString() << "\n";
-        std::cout << "A1B1: directChildren: " << Class(A1B1)->getDirectChildren()->toString() << "\n";
-        std::cout << "A1B1: allChildren:    " << Class(A1B1)->getAllChildren()->toString() << "\n";
-
-        std::cout << "\n";
-        std::cout << "A1B1C1: directParents:  " << Class(A1B1C1)->getDirectParents()->toString() << "\n";
-        std::cout << "A1B1C1: allParents:     " << Class(A1B1C1)->getAllParents()->toString() << "\n";
-        std::cout << "A1B1C1: directChildren: " << Class(A1B1C1)->getDirectChildren()->toString() << "\n";
-        std::cout << "A1B1C1: allChildren:    " << Class(A1B1C1)->getAllChildren()->toString() << "\n";
+
+        std::cout << "\n";
+        std::cout << "BaseObject: parents:     " << Class(BaseObject)->getParents().toString() << "\n";
+        std::cout << "BaseObject: children:    " << Class(BaseObject)->getChildren().toString() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1: parents:     " << Class(A1)->getParents().toString() << "\n";
+        std::cout << "A1: children:    " << Class(A1)->getChildren().toString() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1B1: parents:     " << Class(A1B1)->getParents().toString() << "\n";
+        std::cout << "A1B1: children:    " << Class(A1B1)->getChildren().toString() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1B1C1: parents:     " << Class(A1B1C1)->getParents().toString() << "\n";
+        std::cout << "A1B1C1: children:    " << Class(A1B1C1)->getChildren().toString() << "\n";
 
         std::cout << "\n";
@@ -437,6 +346,6 @@
         std::cout << "\n";
         std::cout << "A2 parent of A2B1C1: " << Class(A2)->isParentOf(Class(A2B1C1)) << "\n";
-*/
-/*
+
+
         std::cout << "Test 7\n";
         std::cout << "1\n";
@@ -527,4 +436,5 @@
         delete test9_06;
 */
+
         std::cout << "Test 10\n";
         Identifier* test10_01 = Class(A1B2);
@@ -624,4 +534,5 @@
         for (Iterator<A2B1C1> it; it; --it)
             std::cout << "Name: " << it->name_ << "\n";
+
 
       }
