Index: /code/branches/core/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/core/src/orxonox/Orxonox.cc	(revision 816)
+++ /code/branches/core/src/orxonox/Orxonox.cc	(revision 817)
@@ -78,4 +78,5 @@
 #include "core/ClassTreeMask.h"
 #include "objects/WorldEntity.h"
+#include "core/DebugLevel.h"
 #include "core/BaseObject.h"
 #include "objects/Test.h"
@@ -231,8 +232,6 @@
       break;
     }
-
         #define testandcout(code) \
           std::cout << #code << " " << code << "\n"
-
 /*
         std::cout << "Test 1\n";
@@ -259,6 +258,6 @@
         test4 = new A3();
         test4 = new A3();
-*/
-/*
+
+
         std::cout << "Test 5\n";
         A1* test5_01 = new A1();
@@ -280,6 +279,7 @@
         A3B2C1* test5_17 = new A3B2C1();
         A3B2C2* test5_18 = new A3B2C2();
-
-        OrxonoxClass* test5;
+*/
+/*
+        OrxonoxClass* test5 = 0;
         for (int i = 0; i <= 18; i++)
         {
@@ -305,13 +305,14 @@
 
           std::cout << "\n";
-          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): parents:         " << test5->getIdentifier()->getParents() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): children:        " << test5->getIdentifier()->getChildren() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): direct parents:  " << test5->getIdentifier()->getDirectParents() << "\n";
+          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): direct children: " << test5->getIdentifier()->getDirectChildren() << "\n";
         }
-
-        std::cout << "Class with ID 0: " << ID(0) << " " << ID(0)->getName() << "\n";
-        std::cout << "Class with ID 1: " << ID(1) << " " << ID(1)->getName() << "\n";
-        std::cout << "Class with ID 2: " << ID(2) << " " << ID(2)->getName() << "\n";
-        std::cout << "Class with ID 3: " << ID(3) << " " << ID(3)->getName() << "\n";
-        std::cout << "Class with ID 4: " << ID(4) << " " << ID(4)->getName() << "\n";
+*/
+/*
+        for (std::map<std::string, Identifier*>::const_iterator it = Factory::getFactoryBegin(); it != Factory::getFactoryEnd(); ++it)
+            std::cout << "Class with ID " << (*it).second->getNetworkID() << ": " << ID((*it).second->getNetworkID()) << " / " << ID((*it).second->getNetworkID())->getName() << std::endl;
+
         std::cout << "Class with ID 100: " << ID(100) << "\n";
         std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
@@ -360,25 +361,25 @@
         std::cout << "isDirectA(XYZ)-Test:\n";
         std::cout << "test5_01 = A1, Erwartet: 1 0 0 0 0\n";
-        testandcout(test5_01->isDirectlyA(Class(A1)));
-        testandcout(test5_01->isDirectlyA(Class(A2)));
-        testandcout(test5_01->isDirectlyA(Class(A1B1)));
-        testandcout(test5_01->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_01->isDirectlyA(Class(Interface1)));
+        testandcout(test5_01->isExactlyA(Class(A1)));
+        testandcout(test5_01->isExactlyA(Class(A2)));
+        testandcout(test5_01->isExactlyA(Class(A1B1)));
+        testandcout(test5_01->isExactlyA(Class(BaseObject)));
+        testandcout(test5_01->isExactlyA(Class(Interface1)));
 
         std::cout << "\n";
         std::cout << "test5_02 = A2, Erwartet: 0 1 0 0 0\n";
-        testandcout(test5_02->isDirectlyA(Class(A1)));
-        testandcout(test5_02->isDirectlyA(Class(A2)));
-        testandcout(test5_02->isDirectlyA(Class(A1B1)));
-        testandcout(test5_02->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_02->isDirectlyA(Class(Interface1)));
+        testandcout(test5_02->isExactlyA(Class(A1)));
+        testandcout(test5_02->isExactlyA(Class(A2)));
+        testandcout(test5_02->isExactlyA(Class(A1B1)));
+        testandcout(test5_02->isExactlyA(Class(BaseObject)));
+        testandcout(test5_02->isExactlyA(Class(Interface1)));
 
         std::cout << "\n";
         std::cout << "test5_03 = A3, Erwartet: 0 0 0 0 0\n";
-        testandcout(test5_03->isDirectlyA(Class(A1)));
-        testandcout(test5_03->isDirectlyA(Class(A2)));
-        testandcout(test5_03->isDirectlyA(Class(A1B1)));
-        testandcout(test5_03->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_03->isDirectlyA(Class(Interface1)));
+        testandcout(test5_03->isExactlyA(Class(A1)));
+        testandcout(test5_03->isExactlyA(Class(A2)));
+        testandcout(test5_03->isExactlyA(Class(A1B1)));
+        testandcout(test5_03->isExactlyA(Class(BaseObject)));
+        testandcout(test5_03->isExactlyA(Class(Interface1)));
 
         std::cout << "\n";
@@ -431,4 +432,53 @@
 
         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";
@@ -460,40 +510,83 @@
         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)));
 */
 /*
         std::cout << "Test 6\n";
-        std::cout << "1:\n";
+        std::cout << "1\n";
         Identifier* test6_01 = Class(A1B1);
-        std::cout << "2:\n";
+        std::cout << "2\n";
         Identifier* test6_02 = Class(A1B1);
-        std::cout << "3:\n";
+        std::cout << "3\n";
         Identifier* test6_03 = Class(A1);
-        std::cout << "4:\n";
+        std::cout << "4\n";
         Identifier* test6_04 = Class(A1B1C1);
-        std::cout << "5:\n";
+        std::cout << "5\n";
         Identifier* test6_05 = Class(A1B1);
-        std::cout << "6:\n";
+        std::cout << "6\n";
         Identifier* test6_06 = Class(A1B1C1);
 
-        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";
-        std::cout << "A3B1C1 child of A3:  " << Class(A3B1C1)->isChildOf(Class(A3)) << "\n";
-        std::cout << "\n";
-        std::cout << "A2 parent of A2B1C1: " << Class(A2)->isParentOf(Class(A2B1C1)) << "\n";
+        std::cout << "7\n";
+
+        std::cout << "\n";
+        std::cout << "BaseObject: parents:         " << Class(BaseObject)->getParents() << "\n";
+        std::cout << "BaseObject: children:        " << Class(BaseObject)->getChildren() << "\n";
+        std::cout << "BaseObject: direct parents:  " << Class(BaseObject)->getDirectParents() << "\n";
+        std::cout << "BaseObject: direct children: " << Class(BaseObject)->getDirectChildren() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1: parents:                 " << Class(A1)->getParents() << "\n";
+        std::cout << "A1: children:                " << Class(A1)->getChildren() << "\n";
+        std::cout << "A1: direct parents:          " << Class(A1)->getDirectParents() << "\n";
+        std::cout << "A1: direct children:         " << Class(A1)->getDirectChildren() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1B1: parents:               " << Class(A1B1)->getParents() << "\n";
+        std::cout << "A1B1: children:              " << Class(A1B1)->getChildren() << "\n";
+        std::cout << "A1B1: direct parents:        " << Class(A1B1)->getDirectParents() << "\n";
+        std::cout << "A1B1: direct children:       " << Class(A1B1)->getDirectChildren() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A1B1C1: parents:             " << Class(A1B1C1)->getParents() << "\n";
+        std::cout << "A1B1C1: children:            " << Class(A1B1C1)->getChildren() << "\n";
+        std::cout << "A1B1C1: direct parents:      " << Class(A1B1C1)->getDirectParents() << "\n";
+        std::cout << "A1B1C1: direct children:     " << Class(A1B1C1)->getDirectChildren() << "\n";
+
+        std::cout << "\n";
+        std::cout << "A3B1C1 child of A3:      " << Class(A3B1C1)->isChildOf(Class(A3)) << "\n";
+        std::cout << "\n";
+        std::cout << "A2 parent of A2B1C1:     " << Class(A2)->isParentOf(Class(A2B1C1)) << "\n";
+
+        std::cout << "8\n";
 */
 /*
@@ -510,4 +603,5 @@
 */
 /*
+// ## WARNING - CRASH! ##
         std::cout << "2\n";
 
@@ -520,4 +614,5 @@
         SubclassIdentifier<A1B1> test7_05;
         test7_05 = Class(A2);
+// ## END WARNING - CRASH! ##
 */
 /*
@@ -558,6 +653,6 @@
         delete test8_02;
         delete test8_03;
-
-
+*/
+/*
         std::cout << "Test 9\n";
         std::cout << "1\n";
@@ -603,7 +698,7 @@
         int count;
 
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it; ++it) { count++; }
         std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it; ++it) { count++; }
         std::cout << "Anzahl A1: " << count << "\n";
         count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
@@ -616,6 +711,6 @@
         std::cout << "2\n";
         BaseObject* test10_08;
-        BaseObject* test10_09;
-        BaseObject* test10_10;
+        BaseObject* test10_09 = 0;
+        BaseObject* test10_10 = 0;
         for (int i = 0; i < 10; i++)
         {
@@ -632,7 +727,7 @@
         }
 
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it; ++it) { count++; }
         std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it; ++it) { count++; }
         std::cout << "Anzahl A1: " << count << "\n";
         count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
@@ -653,7 +748,7 @@
         delete test10_08;
 
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it; ++it) { count++; }
         std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it; ++it) { count++; }
         std::cout << "Anzahl A1: " << count << "\n";
         count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
@@ -675,7 +770,7 @@
         delete test10_09;
 
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::end(); it != 0; --it) { count++; }
+        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::end(); it; --it) { count++; }
         std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::end(); it != 0; --it) { count++; }
+        count = 0; for (Iterator<A1> it = ObjectList<A1>::end(); it; --it) { count++; }
         std::cout << "Anzahl A1: " << count << "\n";
         count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::end(); it; --it) { count++; }
@@ -697,7 +792,7 @@
         delete test10_10;
 
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it; ++it) { count++; }
         std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
+        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it; ++it) { count++; }
         std::cout << "Anzahl A1: " << count << "\n";
         count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
@@ -721,6 +816,6 @@
         std::cout << "Test 11\n";
         std::cout << "1\n";
-        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
-        std::cout << "AnzahlTickable: " << count << "\n";
+        int count2 = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count2++; }
+        std::cout << "AnzahlTickable: " << count2 << "\n";
 
         Test1* test11_1;
@@ -728,6 +823,6 @@
             test11_1 = new Test1;
 
-        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
-        std::cout << "AnzahlTickable: " << count << "\n";
+        count2 = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count2++; }
+        std::cout << "AnzahlTickable: " << count2 << "\n";
 
         for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
@@ -736,6 +831,6 @@
         std::cout << "2\n";
         Test2* test11_2 = new Test2;
-*/
-/*
+
+
         std::cout << "3\n";
         Test3* test11_3 = new Test3;
@@ -834,40 +929,27 @@
         std::cout << "Mask 2:\n";
         TestClassTreeMask(test13_2);
-/*
+
+        std::cout << "2\n";
+
         ClassTreeMask test13_3;
-        test13_3.include(Class(A1));
-        test13_3.exclude(Class(A1B2));
-        test13_3.exclude(Class(A1B1C2));
-        test13_3.include(Class(A2));
-        test13_3.exclude(Class(A2B2));
-        test13_3.include(Class(A3B1));
-        test13_3.include(Class(A3B2));
-        test13_3.exclude(Class(A3B2C2));
+        test13_3.include(Class(A1), true, false);
+        test13_3.exclude(Class(A1B2), true, false);
+        test13_3.exclude(Class(A1B1C2), true, false);
+        test13_3.include(Class(A2), true, false);
+        test13_3.exclude(Class(A2B2), true, false);
+        test13_3.include(Class(A3B1), true, false);
+        test13_3.include(Class(A3B2), true, false);
+        test13_3.exclude(Class(A3B2C2), true, false);
         std::cout << std::endl;
         std::cout << "Mask 2 without excluded BaseObject:\n";
         TestClassTreeMask(test13_3);
-        test13_3.exclude(Class(BaseObject));
-        std::cout << std::endl;
-        std::cout << "Mask 2 with BaseObject excluded afterwards:\n";
+        test13_3.exclude(Class(BaseObject), false, false);
+        std::cout << std::endl;
+        std::cout << "Mask 2 with BaseObject excluded afterwards without overwrite:\n";
         TestClassTreeMask(test13_3);
-
-        ClassTreeMask test13_3_2;
-        test13_3_2.include(Class(A1));
-        test13_3_2.exclude(Class(A1B2));
-        test13_3_2.exclude(Class(A1B1C2));
-        test13_3_2.include(Class(A2));
-        test13_3_2.exclude(Class(A2B2));
-        test13_3_2.include(Class(A3B1));
-        test13_3_2.include(Class(A3B2));
-        test13_3_2.exclude(Class(A3B2C2));
-        test13_3_2.clean();
-        test13_3_2.exclude(Class(BaseObject));
-        std::cout << std::endl;
-        std::cout << "Mask 2 with BaseObject excluded afterwards, but cleaned before:\n";
-        TestClassTreeMask(test13_3_2);
-        test13_3_2.include(Class(BaseObject));
-        std::cout << std::endl;
-        std::cout << "Mask 2 from before, but BaseObject re-included without cleaning:\n";
-        TestClassTreeMask(test13_3_2);
+        test13_3.exclude(Class(BaseObject), true);
+        std::cout << std::endl;
+        std::cout << "Mask 2 with BaseObject excluded afterwards with overwrite:\n";
+        TestClassTreeMask(test13_3);
 
         ClassTreeMask test13_4;
@@ -882,13 +964,20 @@
         test13_4.include(Class(A1));
         std::cout << std::endl;
-        std::cout << "Mask 2 created in random order:\n";
+        std::cout << "Mask 2 created in random order with overwrite and clean:\n";
         TestClassTreeMask(test13_4);
 
-        std::cout << "2\n";
-
-        ClassTreeMask test13_5 = test13_1;
-        std::cout << std::endl;
-        std::cout << "Mask 1 assigned to a new ClassTestMask:\n";
-        TestClassTreeMask(test13_5);
+        ClassTreeMask test13_4_2;
+        test13_4_2.include(Class(A3B2), false, false);
+        test13_4_2.exclude(Class(A1B1C2), false, false);
+        test13_4_2.include(Class(A3B1), false, false);
+        test13_4_2.exclude(Class(A3B2C2), false, false);
+        test13_4_2.exclude(Class(BaseObject), false, false);
+        test13_4_2.include(Class(A2), false, false);
+        test13_4_2.exclude(Class(A1B2), false, false);
+        test13_4_2.exclude(Class(A2B2), false, false);
+        test13_4_2.include(Class(A1), false, false);
+        std::cout << std::endl;
+        std::cout << "Mask 2 created in random order without overwrite and without clean:\n";
+        TestClassTreeMask(test13_4_2);
 
         std::cout << "3\n";
@@ -929,36 +1018,24 @@
         std::cout << "8\n";
 
-        std::cout << std::endl;
-        ClassTreeMask test13_11(test13_1);
-        std::cout << std::endl;
-        std::cout << "Mask 1 assigned with copyconstructor + original mask 1:\n";
-        TestClassTreeMask(test13_11);
-        TestClassTreeMask(test13_1);
-
-        ClassTreeMask test13_12(!test13_11);
+        ClassTreeMask test13_12(!test13_1);
         std::cout << std::endl;
         std::cout << "Mask 1 inverted assigned with copyconstructor + the original from before:\n";
         TestClassTreeMask(test13_12);
-        TestClassTreeMask(test13_11);
-
-        ClassTreeMask test13_13;
-        test13_13 = test13_2;
-        std::cout << std::endl;
-        std::cout << "Mask 2 assigned with = operator + original mask 2:\n";
+        TestClassTreeMask(test13_1);
+
+
+        ClassTreeMask test13_13 = test13_1 + test13_2;
+        std::cout << std::endl;
+        std::cout << "Mask 1 + Mask 2 assigned with copyconstructor + originals from before:\n";
         TestClassTreeMask(test13_13);
+        TestClassTreeMask(test13_1);
         TestClassTreeMask(test13_2);
 
-        ClassTreeMask test13_14 = test13_11 + test13_13;
-        std::cout << std::endl;
-        std::cout << "Mask 1 + Mask 2 assigned with copyconstructor + originals from before:\n";
+        ClassTreeMask test13_14 = test13_1;
+        test13_14 += test13_2;
+        std::cout << std::endl;
+        std::cout << "Mask 1 + Mask 2 with += operator + original of mask 2 from before:\n";
         TestClassTreeMask(test13_14);
-        TestClassTreeMask(test13_11);
-        TestClassTreeMask(test13_13);
-
-        test13_11 += test13_13;
-        std::cout << std::endl;
-        std::cout << "Mask 1 + Mask 2 with += operator + original of mask 2 from before:\n";
-        TestClassTreeMask(test13_11);
-        TestClassTreeMask(test13_13);
+        TestClassTreeMask(test13_2);
 
         test13_1 = test13_1;
@@ -968,6 +1045,48 @@
 
         std::cout << "9\n";
-*/
-
+
+        ClassTreeMask test13_15;
+        test13_15.exclude(Class(Interface1));
+        std::cout << std::endl;
+        std::cout << "Mask with excluded Interface 1:\n";
+        TestClassTreeMask(test13_15);
+
+        ClassTreeMask test13_16 = test13_1;
+        test13_16.exclude(Class(Interface1));
+        std::cout << std::endl;
+        std::cout << "Mask 1 with excluded Interface 1 (overwrite):\n";
+        TestClassTreeMask(test13_16);
+
+        ClassTreeMask test13_17 = test13_1;
+        test13_17.exclude(Class(Interface1), false);
+        std::cout << std::endl;
+        std::cout << "Mask 1 with excluded Interface 1 (without overwrite):\n";
+        TestClassTreeMask(test13_17);
+
+        ClassTreeMask test13_18 = test13_2;
+        test13_18.exclude(Class(Interface1), false);
+        std::cout << std::endl;
+        std::cout << "Mask 2 with excluded Interface 1 (without overwrite):\n";
+        TestClassTreeMask(test13_18);
+
+        std::cout << "10\n";
+
+        ClassTreeMask test13_19;
+        test13_19.exclude(Class(Test1));
+        std::cout << std::endl;
+        std::cout << "Mask with excluded Test1:\n";
+        TestClassTreeMask(test13_19);
+
+        std::cout << "11\n";
+
+        ClassTreeMask test13_20;
+        test13_20.exclude(Class(DebugLevel));
+        std::cout << std::endl;
+        std::cout << "Mask with excluded DebugLevel:\n";
+        TestClassTreeMask(test13_20);
+
+        std::cout << "12\n";
+
+/*
         std::cout << "Test 14\n";
         std::cout << "1\n";
@@ -991,4 +1110,6 @@
         std::cout << test14_5.getIdentifier()->getName() << std::endl;
 
+        std::cout << "2\n";
+*/
 //    startRenderLoop();
   }
Index: /code/branches/core/src/orxonox/core/ClassTreeMask.cc
===================================================================
--- /code/branches/core/src/orxonox/core/ClassTreeMask.cc	(revision 816)
+++ /code/branches/core/src/orxonox/core/ClassTreeMask.cc	(revision 817)
@@ -57,67 +57,82 @@
     {
         // Go through the list of all subnodes and delete them
+        this->deleteAllSubnodes();
+    }
+
+    /**
+        @brief Sets the rule for the node to "included".
+    */
+    void ClassTreeMaskNode::include(bool overwrite)
+    {
+        this->setIncluded(true, overwrite);
+    }
+
+    /**
+        @brief Sets the rule for the node to "excluded".
+    */
+    void ClassTreeMaskNode::exclude(bool overwrite)
+    {
+        this->setIncluded(false, overwrite);
+    }
+
+    /**
+        @brief Sets the rule for the node to a given value and erases all following rules.
+        @param bIncluded The rule: included (true) or excluded (false)
+    */
+    void ClassTreeMaskNode::setIncluded(bool bIncluded, bool overwrite)
+    {
+        if (overwrite)
+            this->deleteAllSubnodes();
+
+        this->bIncluded_ = bIncluded;
+    }
+
+    /**
+        @brief Adds a new subnode to the list of subnodes.
+        @param subnode The new subnode
+    */
+    void ClassTreeMaskNode::addSubnode(ClassTreeMaskNode* subnode)
+    {
+        this->subnodes_.insert(this->subnodes_.end(), subnode);
+    }
+
+    /**
+        @brief Tells if the rule is "included" or not.
+        @return The rule: true = included, false = excluded
+    */
+    bool ClassTreeMaskNode::isIncluded() const
+    {
+        return this->bIncluded_;
+    }
+
+    /**
+        @brief Tells if the rule is "excluded" or not.
+        @return The inverted rule: true = excluded, false = included
+    */
+    bool ClassTreeMaskNode::isExcluded() const
+    {
+        return (!this->bIncluded_);
+    }
+
+    /**
+        @brief Returns the Identifier of the class the rule refers to.
+        @return The Identifier representing the class
+    */
+    const Identifier* ClassTreeMaskNode::getClass() const
+    {
+        return this->subclass_;
+    }
+
+    /**
+        @brief Deletes all subnodes of this node.
+    */
+    void ClassTreeMaskNode::deleteAllSubnodes()
+    {
+        // Go through the list of all subnodes and delete them
         for (std::list<ClassTreeMaskNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); )
             delete (*(it++));
-    }
-
-    /**
-        @brief Sets the rule for the node to "included".
-    */
-    void ClassTreeMaskNode::include()
-    {
-        this->bIncluded_ = true;
-    }
-
-    /**
-        @brief Sets the rule for the node to "excluded".
-    */
-    void ClassTreeMaskNode::exclude()
-    {
-        this->bIncluded_ = false;
-    }
-
-    /**
-        @brief Sets the rule for the node to a given value.
-        @param bIncluded The rule: included (true) or excluded (false)
-    */
-    void ClassTreeMaskNode::setIncluded(bool bIncluded)
-    {
-        this->bIncluded_ = bIncluded;
-    }
-
-    /**
-        @brief Adds a new subnode to the list of subnodes.
-        @param subnode The new subnode
-    */
-    void ClassTreeMaskNode::addSubnode(ClassTreeMaskNode* subnode)
-    {
-        this->subnodes_.insert(this->subnodes_.end(), subnode);
-    }
-
-    /**
-        @brief Tells if the rule is "included" or not.
-        @return The rule: true = included, false = excluded
-    */
-    bool ClassTreeMaskNode::isIncluded() const
-    {
-        return this->bIncluded_;
-    }
-
-    /**
-        @brief Tells if the rule is "excluded" or not.
-        @return The inverted rule: true = excluded, false = included
-    */
-    bool ClassTreeMaskNode::isExcluded() const
-    {
-        return (!this->bIncluded_);
-    }
-
-    /**
-        @brief Returns the Identifier of the class the rule refers to.
-        @return The Identifier representing the class
-    */
-    const Identifier* ClassTreeMaskNode::getClass() const
-    {
-        return this->subclass_;
+
+        // Clear the list
+        this->subnodes_.clear();
     }
 
@@ -258,5 +273,5 @@
         this->root_ = new ClassTreeMaskNode(ClassManager<BaseObject>::getIdentifier(), true);
         for (ClassTreeMaskIterator it = other.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded());
+            this->add(it->getClass(), it->isIncluded(), false);
     }
 
@@ -273,7 +288,7 @@
         @param subclass The subclass
     */
-    void ClassTreeMask::include(const Identifier* subclass)
-    {
-        this->add(subclass, true);
+    void ClassTreeMask::include(const Identifier* subclass, bool overwrite, bool clean)
+    {
+        this->add(subclass, true, overwrite, clean);
     }
 
@@ -282,7 +297,7 @@
         @param subclass The subclass
     */
-    void ClassTreeMask::exclude(const Identifier* subclass)
-    {
-        this->add(subclass, false);
+    void ClassTreeMask::exclude(const Identifier* subclass, bool overwrite, bool clean)
+    {
+        this->add(subclass, false, overwrite, clean);
     }
 
@@ -292,14 +307,24 @@
         @param bInclude The rule: include (true) or exclude (false)
     */
-    void ClassTreeMask::add(const Identifier* subclass, bool bInclude)
-    {
+    void ClassTreeMask::add(const Identifier* subclass, bool bInclude, bool overwrite, bool clean)
+    {
+        // Check if the given subclass is a child of our root-class
         if (subclass->isA(this->root_->getClass()))
-            this->add(this->root_, subclass, bInclude);
+        {
+            // Yes it is: Just add the rule to the three
+            this->add(this->root_, subclass, bInclude, overwrite);
+        }
         else
         {
-
-        }
-
-        this->clean();
+            // No it's not: Search for classes inheriting from the given class and add the rules for them
+            for (std::list<const Identifier*>::const_iterator it = subclass->getDirectChildrenBegin(); it != subclass->getDirectChildrenEnd(); ++it)
+                if ((*it)->isA(this->root_->getClass()))
+                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
+                        this->add(this->root_, *it, bInclude, overwrite);
+        }
+
+        // Clean the rule-tree
+        if (clean)
+            this->clean();
     }
 
@@ -310,5 +335,5 @@
         @param bInclude The rule: include (true) or exclude (false)
     */
-    void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude)
+    void ClassTreeMask::add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite)
     {
         // Check if the current node contains exactly the subclass we want to add
@@ -316,8 +341,8 @@
         {
             // We're at the right place, just change the mask and return
-            node->setIncluded(bInclude);
+            node->setIncluded(bInclude, overwrite);
             return;
         }
-        else
+        else if (subclass->isA(node->getClass()))
         {
             // Search for an already existing node, containing the subclass we want to add
@@ -327,5 +352,5 @@
                 {
                     // We've found an existing node -> delegate the work with a recursive function-call and return
-                    this->add(*it, subclass, bInclude);
+                    this->add(*it, subclass, bInclude, overwrite);
                     return;
                 }
@@ -335,11 +360,15 @@
             ClassTreeMaskNode* newnode = new ClassTreeMaskNode(subclass, bInclude);
 
-            // Search for nodes that should actually be subnodes of our new node
+            // Search for nodes that should actually be subnodes of our new node and erase them
             for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); )
             {
                 if ((*it)->getClass()->isChildOf(subclass))
                 {
-                    // We've found a subnode: add it to the new node an erase it from the current node
-                    newnode->addSubnode(*it);
+                    // We've found a subnode: add it to the new node and erase it from the current node
+                    if (!overwrite)
+                        newnode->addSubnode(*it);
+                    else
+                        delete (*it);
+
                     node->subnodes_.erase(it++);
                 }
@@ -453,4 +482,18 @@
 
     /**
+        @brief Checks if a node for the given subclass exists.
+        @param subclass The Identifier of the subclass
+        @return True = the node exists
+    */
+    bool ClassTreeMask::nodeExists(const Identifier* subclass)
+    {
+        for (ClassTreeMaskIterator it = this->root_; it; ++it)
+            if ((*it)->getClass() == subclass)
+                return true;
+
+        return false;
+    }
+
+    /**
         @brief Assignment operator: Adds all rules of the other mask.
         @param other The other mask
@@ -467,5 +510,5 @@
         // Copy all rules from the other mask
         for (ClassTreeMaskIterator it = temp.root_; it; ++it)
-            this->add(it->getClass(), it->isIncluded());
+            this->add(it->getClass(), it->isIncluded(), false, false);
 
         // Return a reference to the mask itself
@@ -505,5 +548,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
         }
 
@@ -512,5 +555,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) or other.isIncluded(subclass), false, false);
         }
 
@@ -536,5 +579,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
         }
 
@@ -543,5 +586,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) and other.isIncluded(subclass), false, false);
         }
 
@@ -576,5 +619,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, !this->isIncluded(subclass));
+            newmask.add(subclass, !this->isIncluded(subclass), false, false);
         }
 
@@ -650,5 +693,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
         }
 
@@ -657,5 +700,5 @@
         {
             const Identifier* subclass = it->getClass();
-            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass));
+            newmask.add(subclass, this->isIncluded(subclass) xor other.isIncluded(subclass), false, false);
         }
 
Index: /code/branches/core/src/orxonox/core/ClassTreeMask.h
===================================================================
--- /code/branches/core/src/orxonox/core/ClassTreeMask.h	(revision 816)
+++ /code/branches/core/src/orxonox/core/ClassTreeMask.h	(revision 817)
@@ -34,6 +34,8 @@
     Identifier of the class.
 
-    You can work with a ClassTreeMask in the sense of the set theory, meaning that you can create
+    You can work with a ClassTreeMask in the sense of the set-theory, meaning that you can create
     unions, intersections, complements and differences by using overloaded operators.
+
+
 
     The ClassTreeMask is internally represented by a tree. The nodes in the tree are
@@ -42,10 +44,12 @@
     nodes changing the mask. By adding new rules, the tree gets reordered dynamically.
 
-    You can manually add useless rules and they stay in the tree. That way you can add rules in
-    any order without changing information of the resulting mask. Example: A new mask includes all
-    classes. Now you explicitly include a subclass. This seems to be useless. But if you exclude a
-    baseclass of the formerly included subclass, the subclass stays included. You could create the
-    same mask by first excluding the baseclass and then including the subclass. You can drop
-    useless rules from the tree by calling clean().
+    Adding a new rule overwrites all rules assigned to inherited classes. Use overwrite = false
+    if you don't like this feature. Useless rules that don't change the information of the mask
+    aren't saved in the internal tree. Use clean = false if you wan't to save them.
+
+    With overwrite = false and clean = false it doesn't matter in which way you create the mask.
+    You can manually drop useless rules from the tree by calling clean().
+
+
 
     Because of the complicated shape of the internal tree, there is an iterator to iterate
@@ -91,7 +95,7 @@
             ~ClassTreeMaskNode();
 
-            void include();
-            void exclude();
-            void setIncluded(bool bIncluded);
+            void include(bool overwrite = true);
+            void exclude(bool overwrite = true);
+            void setIncluded(bool bIncluded, bool overwrite = true);
 
             void addSubnode(ClassTreeMaskNode* subnode);
@@ -103,4 +107,6 @@
 
         private:
+            void deleteAllSubnodes();
+
             const Identifier* subclass_;                //!< The Identifier of the subclass the rule refers to
             bool bIncluded_;                            //!< The rule: included or excluded
@@ -146,8 +152,7 @@
         With a ClassTreeMask, you can include or exclude subtrees of the class-tree, starting
         with a given subclass, described by the corresponding Identifier. To minimize the size
-        of the mask, the mask saves only relevant rules. But you are allowed to manually add
-        rules that don't change the information of the mask. This way you can create the same
-        mask by adding the same rules in a different way without changing the information. If
-        you want to drop useless rules, call the clean() function.
+        of the mask, the mask saves only relevant rules. But you can manually add rules that
+        don't change the information of the mask by using clean = false. If you want to drop
+        useless rules, call the clean() function.
     */
     class _CoreExport ClassTreeMask
@@ -158,7 +163,7 @@
             ~ClassTreeMask();
 
-            void include(const Identifier* subclass);
-            void exclude(const Identifier* subclass);
-            void add(const Identifier* subclass, bool bInclude);
+            void include(const Identifier* subclass, bool overwrite = true, bool clean = true);
+            void exclude(const Identifier* subclass, bool overwrite = true, bool clean = true);
+            void add(const Identifier* subclass, bool bInclude, bool overwrite = true, bool clean = true);
             void reset();
             void clean();
@@ -193,7 +198,8 @@
 
         private:
-            void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude);
+            void add(ClassTreeMaskNode* node, const Identifier* subclass, bool bInclude, bool overwrite = true);
             bool isIncluded(ClassTreeMaskNode* node, const Identifier* subclass) const;
             void clean(ClassTreeMaskNode* node);
+            bool nodeExists(const Identifier* subclass);
 
             ClassTreeMaskNode* root_;   //!< The root-node of the internal rule-tree, usually BaseObject
Index: /code/branches/core/src/orxonox/core/Factory.cc
===================================================================
--- /code/branches/core/src/orxonox/core/Factory.cc	(revision 816)
+++ /code/branches/core/src/orxonox/core/Factory.cc	(revision 817)
@@ -109,3 +109,21 @@
       return &theOneAndOnlyFactoryInstance;
     }
+
+    /**
+        @brief Returns the begin-iterator of the factory-map.
+        @return The begin-iterator
+    */
+    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryBegin()
+    {
+        return Factory::getFactoryPointer()->identifierStringMap_.begin();
+    }
+
+    /**
+        @brief Returns the end-iterator of the factory-map.
+        @return The end-iterator
+    */
+    std::map<std::string, Identifier*>::const_iterator Factory::getFactoryEnd()
+    {
+        return Factory::getFactoryPointer()->identifierStringMap_.end();
+    }
 }
Index: /code/branches/core/src/orxonox/core/Factory.h
===================================================================
--- /code/branches/core/src/orxonox/core/Factory.h	(revision 816)
+++ /code/branches/core/src/orxonox/core/Factory.h	(revision 817)
@@ -67,4 +67,6 @@
 
             static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
+            static std::map<std::string, Identifier*>::const_iterator getFactoryBegin();
+            static std::map<std::string, Identifier*>::const_iterator getFactoryEnd();
 
         private:
Index: /code/branches/core/src/orxonox/core/Identifier.cc
===================================================================
--- /code/branches/core/src/orxonox/core/Identifier.cc	(revision 816)
+++ /code/branches/core/src/orxonox/core/Identifier.cc	(revision 817)
@@ -30,4 +30,6 @@
     @brief Implementation of the Identifier class.
 */
+
+#include <ostream>
 
 #include "Identifier.h"
@@ -50,4 +52,5 @@
 
         this->children_ = new std::list<const Identifier*>();
+        this->directChildren_ = new std::list<const Identifier*>();
 
         // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables
@@ -62,4 +65,5 @@
     {
         delete this->children_;
+        delete this->directChildren_;
     }
 
@@ -75,11 +79,34 @@
         if (parents)
         {
-            std::list<const Identifier*>::iterator temp1 = parents->begin();
-            while (temp1 != parents->end())
+            this->parents_ = (*parents);
+            this->directParents_ = (*parents);
+
+            // Iterate through all parents
+            for (std::list<const Identifier*>::iterator it = parents->begin(); it != parents->end(); ++it)
             {
-                this->parents_.insert(this->parents_.end(), *temp1);
-                (*temp1)->getChildren().insert((*temp1)->getChildren().end(), this); // We're a child of our parents
-
-                ++temp1;
+                // Tell the parent we're one of it's children
+                (*it)->getChildrenIntern().insert((*it)->getChildrenIntern().end(), this);
+
+                // Erase all parents of our parent from our direct-parent-list
+                for (std::list<const Identifier*>::const_iterator it1 = (*it)->getParents().begin(); it1 != (*it)->getParents().end(); ++it1)
+                {
+                    // Search for the parent's parent in our direct-parent-list
+                    for (std::list<const Identifier*>::iterator it2 = this->directParents_.begin(); it2 != this->directParents_.end(); ++it2)
+                    {
+                        if ((*it1) == (*it2))
+                        {
+                            // We've found a non-direct parent in our list: Erase it
+                            this->directParents_.erase(it2);
+                            break;
+                        }
+                    }
+                }
+            }
+
+            // Now iterate through all direct parents
+            for (std::list<const Identifier*>::iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
+            {
+                // Tell the parent we're one of it's direct children
+                (*it)->getDirectChildrenIntern().insert((*it)->getDirectChildrenIntern().end(), this);
             }
         }
@@ -98,7 +125,6 @@
         else
         {
-            // Abstract classes don't have a factory and therefore can't create new objects
             COUT(1) << "An error occurred in Identifier:" << std::endl;
-            COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract." << std::endl;
+            COUT(1) << "Error: Cannot fabricate an object of type '" << this->name_ << "'. Class has no factory." << std::endl;
             COUT(1) << "Aborting..." << std::endl;
             abort();
@@ -130,5 +156,5 @@
         @param identifier The identifier to compare with
     */
-    bool Identifier::isDirectlyA(const Identifier* identifier) const
+    bool Identifier::isExactlyA(const Identifier* identifier) const
     {
         return (identifier == this);
@@ -145,4 +171,13 @@
 
     /**
+        @brief Returns true, if the assigned identifier is a direct child of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isDirectChildOf(const Identifier* identifier) const
+    {
+        return this->identifierIsInList(identifier, this->directParents_);
+    }
+
+    /**
         @brief Returns true, if the assigned identifier is a parent of the given identifier.
         @param identifier The identifier to compare with
@@ -151,4 +186,13 @@
     {
         return this->identifierIsInList(identifier, *this->children_);
+    }
+
+    /**
+        @brief Returns true, if the assigned identifier is a direct parent of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isDirectParentOf(const Identifier* identifier) const
+    {
+        return this->identifierIsInList(identifier, *this->directChildren_);
     }
 
@@ -167,3 +211,11 @@
         return false;
     }
+
+    std::ostream& operator<<(std::ostream& out, const std::list<const Identifier*>& list)
+    {
+        for (std::list<const Identifier*>::const_iterator it = list.begin(); it != list.end(); ++it)
+            out << (*it)->getName() << " ";
+
+        return out;
+    }
 }
Index: /code/branches/core/src/orxonox/core/Identifier.h
===================================================================
--- /code/branches/core/src/orxonox/core/Identifier.h	(revision 816)
+++ /code/branches/core/src/orxonox/core/Identifier.h	(revision 817)
@@ -39,5 +39,5 @@
 
     Every object has a pointer to the Identifier of its class. This allows the use isA(...),
-    isDirectlyA(...), isChildOf(...) and isParentOf(...).
+    isExactlyA(...), isChildOf(...) and isParentOf(...).
 
     To create the class-hierarchy, the Identifier has some intern functions and variables.
@@ -82,5 +82,5 @@
 
         Every object has a pointer to the Identifier of its class. This allows the use isA(...),
-        isDirectlyA(...), isChildOf(...) and isParentOf(...).
+        isExactlyA(...), isChildOf(...) and isParentOf(...).
 
         You can't directly create an Identifier, it's just the base-class for ClassIdentifier.
@@ -102,7 +102,9 @@
             BaseObject* fabricate();
             bool isA(const Identifier* identifier) const;
-            bool isDirectlyA(const Identifier* identifier) const;
+            bool isExactlyA(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;
 
             /** @brief Removes all objects of the corresponding class. */
@@ -114,16 +116,29 @@
             /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */
             inline const std::list<const Identifier*>& getParents() const { return this->parents_; }
-
             /** @brief Returns the begin-iterator of the parents-list. @return The begin-iterator */
             inline std::list<const Identifier*>::const_iterator getParentsBegin() const { return this->parents_.begin(); }
-
             /** @brief Returns the end-iterator of the parents-list. @return The end-iterator */
             inline std::list<const Identifier*>::const_iterator getParentsEnd() const { return this->parents_.end(); }
 
+            /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
+            inline const std::list<const Identifier*>& getChildren() const { return (*this->children_); }
             /** @brief Returns the begin-iterator of the children-list. @return The begin-iterator */
             inline std::list<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::list<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 */
+            inline const std::list<const Identifier*>& getDirectParents() const { return this->directParents_; }
+            /** @brief Returns the begin-iterator of the direct-parents-list. @return The begin-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectParentsBegin() const { return this->directParents_.begin(); }
+            /** @brief Returns the end-iterator of the direct-parents-list. @return The end-iterator */
+            inline std::list<const Identifier*>::const_iterator getDirectParentsEnd() const { return this->directParents_.end(); }
+
+            /** @brief Returns the direct children the class the Identifier belongs to. @return The list of all direct children */
+            inline const std::list<const Identifier*>& getDirectChildren() const { return (*this->directChildren_); }
+            /** @brief Returns the begin-iterator of the direct-children-list. @return The begin-iterator */
+            inline std::list<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::list<const Identifier*>::const_iterator getDirectChildrenEnd() const { return this->directChildren_->end(); }
 
             /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
@@ -143,4 +158,6 @@
             inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
                 { this->configValues_[varname] = container; }
+
+            static bool identifierIsInList(const Identifier* identifier, const std::list<const Identifier*>& list);
 
         private:
@@ -150,9 +167,8 @@
             void initialize(std::list<const Identifier*>* parents);
 
-            /** @brief Returns the parents of the class the Identifier belongs to. @return The list of all parents */
-            inline std::list<const Identifier*>& getParents() { return this->parents_; }
-
             /** @brief Returns the children of the class the Identifier belongs to. @return The list of all children */
-            inline std::list<const Identifier*>& getChildren() const { return (*this->children_); }
+            inline std::list<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::list<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
 
             /**
@@ -174,8 +190,9 @@
             }
 
-            static bool identifierIsInList(const Identifier* identifier, const std::list<const Identifier*>& list);
-
-            std::list<const Identifier*> parents_;                      //!< The Parents of the class the Identifier belongs to
-            std::list<const Identifier*>* children_;                    //!< The Children of the class the Identifier belongs to
+            std::list<const Identifier*> parents_;                      //!< The parents of the class the Identifier belongs to
+            std::list<const Identifier*>* children_;                    //!< The children of the class the Identifier belongs to
+
+            std::list<const Identifier*> directParents_;                //!< The direct parents of the class the Identifier belongs to
+            std::list<const Identifier*>* directChildren_;              //!< The direct children of the class the Identifier belongs to
 
             std::string name_;                                          //!< The name of the class the Identifier belongs to
@@ -188,4 +205,6 @@
     };
 
+    std::ostream& operator<<(std::ostream& out, const std::list<const Identifier*>& list);
+
 
     // ###############################
@@ -215,4 +234,5 @@
             void removeObjects() const;
             void setName(const std::string& name);
+            inline const ObjectList<T>* getObjects() const { return this->objects_; }
 
         private:
@@ -231,5 +251,6 @@
     ClassIdentifier<T>::ClassIdentifier()
     {
-        this->objects_ = ObjectList<T>::getList();
+//        this->objects_ = ObjectList<T>::getList();
+        this->objects_ = new ObjectList<T>();
         this->bSetName_ = false;
     }
@@ -294,7 +315,8 @@
     void ClassIdentifier<T>::removeObjects() const
     {
-        for (Iterator<T> it = ObjectList<T>::start(); it;)
+        for (Iterator<T> it = this->objects_->start(); it;)
             delete *(it++);
     }
+
 
     // ###############################
@@ -409,6 +431,6 @@
 
             /** @brief Returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
-            inline bool isDirectlyA(const Identifier* identifier) const
-                { return this->identifier_->isDirectlyA(identifier); }
+            inline bool isExactlyA(const Identifier* identifier) const
+                { return this->identifier_->isExactlyA(identifier); }
 
             /** @brief Returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
@@ -416,7 +438,15 @@
                 { return this->identifier_->isChildOf(identifier); }
 
+            /** @brief Returns true, if the assigned identifier is a direct child of the given identifier. @param identifier The identifier to compare with */
+            inline bool isDirectChildOf(const Identifier* identifier) const
+                { return this->identifier_->isDirectChildOf(identifier); }
+
             /** @brief Returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
             inline bool isParentOf(const Identifier* identifier) const
                 { return this->identifier_->isParentOf(identifier); }
+
+            /** @brief Returns true, if the assigned identifier is a direct parent of the given identifier. @param identifier The identifier to compare with */
+            inline bool isDirectParentOf(const Identifier* identifier) const
+                { return this->identifier_->isDirectParentOf(identifier); }
 
         private:
Index: /code/branches/core/src/orxonox/core/ObjectList.h
===================================================================
--- /code/branches/core/src/orxonox/core/ObjectList.h	(revision 816)
+++ /code/branches/core/src/orxonox/core/ObjectList.h	(revision 817)
@@ -40,4 +40,5 @@
 #include "CorePrereqs.h"
 #include "Iterator.h"
+#include "ClassManager.h"
 
 namespace orxonox
@@ -83,5 +84,6 @@
     {
         public:
-            static ObjectList<T>* getList();
+            ObjectList();
+            ~ObjectList();
 
             ObjectListElement<T>* add(T* object);
@@ -90,20 +92,16 @@
             /** @brief Returns the first element in the list. @return The first element */
             inline static Iterator<T> start()
-                { return Iterator<T>(getList()->first_); }
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->first_); }
 
             /** @brief Returns the first element in the list. @return The first element */
             inline static Iterator<T> begin()
-                { return Iterator<T>(getList()->first_); }
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->first_); }
 
             /** @brief Returns the last element in the list. @return The last element */
             inline static Iterator<T> end()
-                { return Iterator<T>(getList()->last_); }
+                { return Iterator<T>(ClassManager<T>::getIdentifier()->getObjects()->last_); }
 
             ObjectListElement<T>* first_;       //!< The first element in the list
             ObjectListElement<T>* last_;        //!< The last element in the list
-
-        private:
-            ObjectList();
-            ~ObjectList();
     };
 
@@ -131,14 +129,4 @@
             this->first_ = temp;
         }
-    }
-
-    /**
-        @brief Returns a pointer to the only existing instance for the given class T. @return The instance
-    */
-    template <class T>
-    ObjectList<T>* ObjectList<T>::getList()
-    {
-        static ObjectList<T> theOnlyObjectListObjectForClassT = ObjectList<T>();
-        return &theOnlyObjectListObjectForClassT;
     }
 
Index: /code/branches/core/src/orxonox/core/OrxonoxClass.h
===================================================================
--- /code/branches/core/src/orxonox/core/OrxonoxClass.h	(revision 816)
+++ /code/branches/core/src/orxonox/core/OrxonoxClass.h	(revision 817)
@@ -72,7 +72,4 @@
             inline void createParents() { this->parents_ = new std::list<const Identifier*>(); }
 
-//            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
-//            inline void setParents(std::list<const Identifier*>* parents) { this->parents_ = parents; }
-
             /** @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_; }
@@ -83,12 +80,18 @@
                 { return this->getIdentifier()->isA(identifier); }
             /** @brief Returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const Identifier* identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier); }
+            inline bool isExactlyA(const Identifier* identifier)
+                { return this->getIdentifier()->isExactlyA(identifier); }
             /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const Identifier* identifier)
                 { return this->getIdentifier()->isChildOf(identifier); }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier); }
             /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const Identifier* identifier)
                 { return this->getIdentifier()->isParentOf(identifier); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier); }
 
 
@@ -97,12 +100,18 @@
                 { return this->getIdentifier()->isA(identifier->getIdentifier()); }
             /** @brief Returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
+            inline bool isExactlyA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isExactlyA(identifier->getIdentifier()); }
             /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
                 { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier->getIdentifier()); }
             /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
                 { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier->getIdentifier()); }
 
 
@@ -111,12 +120,18 @@
                 { return this->getIdentifier()->isA(identifier.getIdentifier()); }
             /** @brief Returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
-                { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
+            inline bool isExactlyA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isExactlyA(identifier.getIdentifier()); }
             /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const SubclassIdentifier<class B> identifier)
                 { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectChildOf(identifier.getIdentifier()); }
             /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const SubclassIdentifier<class B> identifier)
                 { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct parent of the given type. */
+            inline bool isDirectParentOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectParentOf(identifier.getIdentifier()); }
 
 
@@ -125,12 +140,18 @@
                 { return this->getIdentifier()->isA(object->getIdentifier()); }
             /** @brief Returns true if the objects class is exactly of the given type. */
-            inline bool isDirectlyA(const OrxonoxClass* object)
-                { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
+            inline bool isExactlyA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isExactlyA(object->getIdentifier()); }
             /** @brief Returns true if the objects class is a child of the given type. */
             inline bool isChildOf(const OrxonoxClass* object)
                 { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectChildOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectChildOf(object->getIdentifier()); }
             /** @brief Returns true if the objects class is a parent of the given type. */
             inline bool isParentOf(const OrxonoxClass* object)
                 { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
+            /** @brief Returns true if the objects class is a direct child of the given type. */
+            inline bool isDirectParentOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectParentOf(object->getIdentifier()); }
 
 
Index: /code/branches/core/src/orxonox/objects/Test.h
===================================================================
--- /code/branches/core/src/orxonox/objects/Test.h	(revision 816)
+++ /code/branches/core/src/orxonox/objects/Test.h	(revision 817)
@@ -74,5 +74,5 @@
         public:
             A1B2() { RegisterObject(A1B2); }
-            virtual void test() = 0;
+//            virtual void test() = 0;
     };
 
@@ -117,5 +117,5 @@
         public:
             A1B2C1() { RegisterObject(A1B2C1); }
-            void test() { std::cout << "test!\n"; }
+//            void test() { std::cout << "test!\n"; }
     };
 
@@ -160,5 +160,5 @@
     CreateFactory(A3);
     CreateFactory(A1B1);
-//    CreateFactory(A1B2);
+    CreateFactory(A1B2);
     CreateFactory(A2B1);
     CreateFactory(A2B2);
Index: de/branches/core/src/orxonox/orxonox_from_oh.cc
===================================================================
--- /code/branches/core/src/orxonox/orxonox_from_oh.cc	(revision 816)
+++ 	(revision )
@@ -1,831 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *
- *
- *   License notice:
- *
- *   This program is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- *
- *   Author:
- *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
- *   Co-authors:
- *      ...
- *
- */
-
-/**
- @file  orxonox.cc
- @brief Orxonox Main File
- */
-
-#include <OgreSceneNode.h>
-#include <OgreSceneManager.h>
-#include <OgreRoot.h>
-#include <OgreFrameListener.h>
-#include <OgreConfigFile.h>
-#include <OgreTextureManager.h>
-#include <OgreEntity.h>
-#include <OgreRenderWindow.h>
-
-#include <OIS/OIS.h>
-#include <CEGUI/CEGUI.h>
-#include <OgreCEGUIRenderer.h>
-
-#include <string>
-#include <iostream>
-
-//#include "../xml/xmlParser.h"
-//#include "../loader/LevelLoader.h"
-
-#include "core/CoreIncludes.h"
-#include "core/SignalHandler.h"
-#include "objects/Tickable.h"
-#include "objects/Timer.h"
-#include "objects/WorldEntity.h"
-
-#include "objects/BaseObject.h"
-#include "objects/Test.h"
-#include "objects/test1.h"
-#include "objects/test2.h"
-#include "objects/test3.h"
-
-// some tests to see if enet works without includsion
-//#include <enet/enet.h>
-//#include <enet/protocol.h>
-
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-#include <CoreFoundation/CoreFoundation.h>
-
-// This function will locate the path to our application on OS X,
-// unlike windows you can not rely on the curent working directory
-// for locating your configuration files and resources.
-std::string macBundlePath()
-{
-  char path[1024];
-  CFBundleRef mainBundle = CFBundleGetMainBundle();
-  assert(mainBundle);
-
-  CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
-  assert(mainBundleURL);
-
-  CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle);
-  assert(cfStringRef);
-
-  CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
-
-  CFRelease(mainBundleURL);
-  CFRelease(cfStringRef);
-
-  return std::string(path);
-}
-#endif
-
-namespace orxonox
-{
-  class OrxExitListener : public Ogre::FrameListener
-  {
-    public:
-      OrxExitListener(OIS::Keyboard *keyboard)
-    : mKeyboard(keyboard)
-      {
-      }
-
-      bool frameStarted(const Ogre::FrameEvent& evt)
-      {
-        mKeyboard->capture();
-        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
-      }
-
-    private:
-      OIS::Keyboard *mKeyboard;
-  };
-
-  class OrxApplication
-  {
-    public:
-      void go()
-      {
-        createRoot();
-        defineResources();
-        setupRenderSystem();
-        createRenderWindow();
-        initializeResourceGroups();
-        createScene();
-        setupScene();
-        setupInputSystem();
-        setupCEGUI();
-        createFrameListener();
-        Factory::createClassHierarchy();
-
-        #define testandcout(code) \
-          std::cout << #code << " " << code << "\n"
-
-/*
-        std::cout << "Test 1\n";
-        BaseObject* test1;
-        test1 = new BaseObject();
-        test1 = new BaseObject();
-        test1 = new BaseObject();
-
-        std::cout << "Test 2\n";
-        A1* test2;
-        test2 = new A1();
-        test2 = new A1();
-        test2 = new A1();
-
-        std::cout << "Test 3\n";
-        BaseObject* test3;
-        test3 = new BaseObject();
-        test3 = new BaseObject();
-        test3 = new BaseObject();
-
-        std::cout << "Test 4\n";
-        A3* test4;
-        test4 = new A3();
-        test4 = new A3();
-        test4 = new A3();
-*/
-/*
-        std::cout << "Test 5\n";
-        A1* test5_01 = new A1();
-        A2* test5_02 = new A2();
-        A3* test5_03 = new A3();
-        A1B1* test5_04 = new A1B1();
-        A1B2* test5_05 = new A1B2();
-        A2B1* test5_06 = new A2B1();
-        A2B2* test5_07 = new A2B2();
-        A3B1* test5_08 = new A3B1();
-        A3B2* test5_09 = new A3B2();
-        A1B1C1* test5_10 = new A1B1C1();
-        A1B1C2* test5_11 = new A1B1C2();
-        A1B2C1* test5_12 = new A1B2C1();
-        A2B1C1* test5_13 = new A2B1C1();
-        A2B2C1* test5_14 = new A2B2C1();
-        A3B1C1* test5_15 = new A3B1C1();
-        A3B1C2* test5_16 = new A3B1C2();
-        A3B2C1* test5_17 = new A3B2C1();
-        A3B2C2* test5_18 = new A3B2C2();
-
-        OrxonoxClass* test5;
-        for (int i = 0; i <= 18; i++)
-        {
-          if (i == 0) test5 = new BaseObject;
-          if (i == 1) test5 = test5_01;
-          if (i == 2) test5 = test5_02;
-          if (i == 3) test5 = test5_03;
-          if (i == 4) test5 = test5_04;
-          if (i == 5) test5 = test5_05;
-          if (i == 6) test5 = test5_06;
-          if (i == 7) test5 = test5_07;
-          if (i == 8) test5 = test5_08;
-          if (i == 9) test5 = test5_09;
-          if (i == 10) test5 = test5_10;
-          if (i == 11) test5 = test5_11;
-          if (i == 12) test5 = test5_12;
-          if (i == 13) test5 = test5_13;
-          if (i == 14) test5 = test5_14;
-          if (i == 15) test5 = test5_15;
-          if (i == 16) test5 = test5_16;
-          if (i == 17) test5 = test5_17;
-          if (i == 18) test5 = test5_18;
-
-          std::cout << "\n";
-          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): parents:     " << test5->getIdentifier()->getParents().toString() << "\n";
-          std::cout << test5->getIdentifier()->getName() << " (" << test5->getIdentifier()->getNetworkID() << "): children:    " << test5->getIdentifier()->getChildren().toString() << "\n";
-        }
-
-        std::cout << "Class with ID 0: " << ID(0) << " " << ID(0)->getName() << "\n";
-        std::cout << "Class with ID 1: " << ID(1) << " " << ID(1)->getName() << "\n";
-        std::cout << "Class with ID 2: " << ID(2) << " " << ID(2)->getName() << "\n";
-        std::cout << "Class with ID 3: " << ID(3) << " " << ID(3)->getName() << "\n";
-        std::cout << "Class with ID 4: " << ID(4) << " " << ID(4)->getName() << "\n";
-        std::cout << "Class with ID 100: " << ID(100) << "\n";
-        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
-
-        std::cout << "\nChange ID of BaseObject to 100\n";
-        Class(BaseObject)->setNetworkID(100);
-        std::cout << "Class with ID 100: " << ID(100) << "\n";
-        std::cout << "Class with ID 1: " << ID(1) << "\n";
-        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
-
-        std::cout << "\nChange ID of BaseObject to 3\n";
-        Class(BaseObject)->setNetworkID(3);
-        std::cout << "Class with ID 100: " << ID(100) << "\n";
-        std::cout << "Class with ID 1: " << ID(1) << "\n";
-        std::cout << "Class with ID 3: " << ID(3) << "\n";
-        std::cout << "ID of BaseObject: " << Class(BaseObject)->getNetworkID() << "\n";
-        std::cout << "ID of Test1: " << Class(Test1)->getNetworkID() << "\n";
-*/
-/*
-        std::cout << "\n";
-        std::cout << "isA(XYZ)-Test:\n";
-        std::cout << "test5_01 = A1, Erwartet: 1 0 0 1 0\n";
-        testandcout(test5_01->isA(Class(A1)));
-        testandcout(test5_01->isA(Class(A2)));
-        testandcout(test5_01->isA(Class(A1B1)));
-        testandcout(test5_01->isA(Class(BaseObject)));
-        testandcout(test5_01->isA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "test5_02 = A2, Erwartet: 0 1 0 1 0\n";
-        testandcout(test5_02->isA(Class(A1)));
-        testandcout(test5_02->isA(Class(A2)));
-        testandcout(test5_02->isA(Class(A1B1)));
-        testandcout(test5_02->isA(Class(BaseObject)));
-        testandcout(test5_02->isA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "test5_01 = A3, Erwartet: 0 0 0 1 1\n";
-        testandcout(test5_03->isA(Class(A1)));
-        testandcout(test5_03->isA(Class(A2)));
-        testandcout(test5_03->isA(Class(A1B1)));
-        testandcout(test5_03->isA(Class(BaseObject)));
-        testandcout(test5_03->isA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "isDirectA(XYZ)-Test:\n";
-        std::cout << "test5_01 = A1, Erwartet: 1 0 0 0 0\n";
-        testandcout(test5_01->isDirectlyA(Class(A1)));
-        testandcout(test5_01->isDirectlyA(Class(A2)));
-        testandcout(test5_01->isDirectlyA(Class(A1B1)));
-        testandcout(test5_01->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_01->isDirectlyA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "test5_02 = A2, Erwartet: 0 1 0 0 0\n";
-        testandcout(test5_02->isDirectlyA(Class(A1)));
-        testandcout(test5_02->isDirectlyA(Class(A2)));
-        testandcout(test5_02->isDirectlyA(Class(A1B1)));
-        testandcout(test5_02->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_02->isDirectlyA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "test5_03 = A3, Erwartet: 0 0 0 0 0\n";
-        testandcout(test5_03->isDirectlyA(Class(A1)));
-        testandcout(test5_03->isDirectlyA(Class(A2)));
-        testandcout(test5_03->isDirectlyA(Class(A1B1)));
-        testandcout(test5_03->isDirectlyA(Class(BaseObject)));
-        testandcout(test5_03->isDirectlyA(Class(Interface1)));
-
-        std::cout << "\n";
-        std::cout << "isChildOf(XYZ)-Test:\n";
-        std::cout << "test5_04 = A1B1, Erwartet: 1 0 1 0 0 0 0\n";
-        testandcout(test5_04->isChildOf(Class(A1)));
-        testandcout(test5_04->isChildOf(Class(A2)));
-        testandcout(test5_04->isChildOf(Class(BaseObject)));
-        testandcout(test5_04->isChildOf(Class(Interface1)));
-        testandcout(test5_04->isChildOf(Class(Interface2)));
-        testandcout(test5_04->isChildOf(Class(A1B1C2)));
-        testandcout(test5_04->isChildOf(Class(A1B1)));
-
-        std::cout << "\n";
-        std::cout << "test5_06 = A2B1, Erwartet: 0 1 1 0 0 0 0\n";
-        testandcout(test5_06->isChildOf(Class(A1)));
-        testandcout(test5_06->isChildOf(Class(A2)));
-        testandcout(test5_06->isChildOf(Class(BaseObject)));
-        testandcout(test5_06->isChildOf(Class(Interface1)));
-        testandcout(test5_06->isChildOf(Class(Interface2)));
-        testandcout(test5_06->isChildOf(Class(A1B1C2)));
-        testandcout(test5_06->isChildOf(Class(A1B1)));
-
-        std::cout << "\n";
-        std::cout << "test5_07 = A2B2, Erwartet: 0 1 1 1 0 0\n";
-        testandcout(test5_07->isChildOf(Class(A1)));
-        testandcout(test5_07->isChildOf(Class(A2)));
-        testandcout(test5_07->isChildOf(Class(BaseObject)));
-        testandcout(test5_07->isChildOf(Class(Interface1)));
-        testandcout(test5_07->isChildOf(Class(Interface2)));
-        testandcout(test5_07->isChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_08 = A3B1, Erwartet: 0 0 1 1 0 0\n";
-        testandcout(test5_08->isChildOf(Class(A1)));
-        testandcout(test5_08->isChildOf(Class(A2)));
-        testandcout(test5_08->isChildOf(Class(BaseObject)));
-        testandcout(test5_08->isChildOf(Class(Interface1)));
-        testandcout(test5_08->isChildOf(Class(Interface2)));
-        testandcout(test5_08->isChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_09 = A3B2, Erwartet: 0 0 1 1 1 0\n";
-        testandcout(test5_09->isChildOf(Class(A1)));
-        testandcout(test5_09->isChildOf(Class(A2)));
-        testandcout(test5_09->isChildOf(Class(BaseObject)));
-        testandcout(test5_09->isChildOf(Class(Interface1)));
-        testandcout(test5_09->isChildOf(Class(Interface2)));
-        testandcout(test5_09->isChildOf(Class(A1B1C2)));
-
-        std::cout << "\n";
-        std::cout << "isParentOf(XYZ)-Test:\n";
-        std::cout << "test1 = BaseObject, Erwartet: 0 0 1 1 1 1 1\n";
-        testandcout(test1->isParentOf(Class(BaseObject)));
-        testandcout(test1->isParentOf(Class(Interface1)));
-        testandcout(test1->isParentOf(Class(A1)));
-        testandcout(test1->isParentOf(Class(A2)));
-        testandcout(test1->isParentOf(Class(A1B1)));
-        testandcout(test1->isParentOf(Class(A2B2)));
-        testandcout(test1->isParentOf(Class(A3B1C2)));
-
-        std::cout << "\n";
-        std::cout << "test5_01 = A1, Erwartet: 0 0 0 0 1 0 0\n";
-        testandcout(test5_01->isParentOf(Class(BaseObject)));
-        testandcout(test5_01->isParentOf(Class(Interface1)));
-        testandcout(test5_01->isParentOf(Class(A1)));
-        testandcout(test5_01->isParentOf(Class(A2)));
-        testandcout(test5_01->isParentOf(Class(A1B1)));
-        testandcout(test5_01->isParentOf(Class(A2B2)));
-        testandcout(test5_01->isParentOf(Class(A3B1C2)));
-
-        std::cout << "\n";
-        std::cout << "Interface1, Erwartet: 0 0 0 0 0 1 1\n";
-        testandcout(Class(Interface1)->isParentOf(Class(BaseObject)));
-        testandcout(Class(Interface1)->isParentOf(Class(Interface1)));
-        testandcout(Class(Interface1)->isParentOf(Class(A1)));
-        testandcout(Class(Interface1)->isParentOf(Class(A2)));
-        testandcout(Class(Interface1)->isParentOf(Class(A1B1)));
-        testandcout(Class(Interface1)->isParentOf(Class(A2B2)));
-        testandcout(Class(Interface1)->isParentOf(Class(A3B1C2)));
-*/
-/*
-        std::cout << "Test 6\n";
-        std::cout << "1:\n";
-        Identifier* test6_01 = Class(A1B1);
-        std::cout << "2:\n";
-        Identifier* test6_02 = Class(A1B1);
-        std::cout << "3:\n";
-        Identifier* test6_03 = Class(A1);
-        std::cout << "4:\n";
-        Identifier* test6_04 = Class(A1B1C1);
-        std::cout << "5:\n";
-        Identifier* test6_05 = Class(A1B1);
-        std::cout << "6:\n";
-        Identifier* test6_06 = Class(A1B1C1);
-
-        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";
-        std::cout << "A3B1C1 child of A3:  " << Class(A3B1C1)->isChildOf(Class(A3)) << "\n";
-        std::cout << "\n";
-        std::cout << "A2 parent of A2B1C1: " << Class(A2)->isParentOf(Class(A2B1C1)) << "\n";
-*/
-/*
-        std::cout << "Test 7\n";
-        std::cout << "1\n";
-        SubclassIdentifier<A1B1> test7_01;
-        test7_01 = Class(A1B1C1);
-
-        SubclassIdentifier<A1B1> test7_02;
-        test7_02 = Class(A1B1);
-
-        std::cout << test7_01->getName() << "\n";
-        std::cout << test7_02->getName() << "\n";
-*/
-/*
-        std::cout << "2\n";
-
-        SubclassIdentifier<A1B1> test7_03;
-        test7_03 = Class(A1);
-
-        SubclassIdentifier<A1B1> test7_04;
-        test7_04 = Class(A1B2);
-
-        SubclassIdentifier<A1B1> test7_05;
-        test7_05 = Class(A2);
-*/
-/*
-        std::cout << "Test 8\n";
-
-        std::cout << "1\n";
-        Test1* test8_01 = new Test1;
-        Test3* test8_03 = new Test3;
-        test8_03->usefullClassesIsATest(test8_01);
-
-        std::cout << "2\n";
-        Test2* test8_02 = new Test2;
-        test8_03->usefullClassesIsATest(test8_02);
-
-        std::cout << "3\n";
-        test8_01->setUsefullClass1(Class(Test1));
-        test8_01->setUsefullClass1(test8_02->getIdentifier());
-        test8_01->setUsefullClass2(Class(Test2));
-        test8_01->setUsefullClassOfTypeTest3(Class(Test3));
-        test8_01->setUsefullClassOfTypeTest3(test8_03->getIdentifier());
-
-
-        testandcout(test8_01->isA(Class(Test1)));
-        testandcout(test8_01->isA(Class(Test2)));
-        testandcout(test8_01->isA(Class(Test3)));
-
-        Test2* test8_04 = new Test2;
-        testandcout(test8_02->isA(Class(Test1)));
-        testandcout(test8_02->isA(Class(Test2)));
-        testandcout(test8_02->isA(Class(Test3)));
-
-        Test3* test8_05 = new Test3;
-        testandcout(test8_03->isA(Class(Test1)));
-        testandcout(test8_03->isA(Class(Test2)));
-        testandcout(test8_03->isA(Class(Test3)));
-
-        delete test8_01;
-        delete test8_02;
-        delete test8_03;
-
-
-        std::cout << "Test 9\n";
-        std::cout << "1\n";
-        Identifier* test9_01 = Class(A3);
-        BaseObject* test9_02 = test9_01->fabricate();
-        std::cout << test9_02->getIdentifier()->getName() << "\n";
-
-        std::cout << "\n2\n";
-        BaseObject* test9_03 = Class(A1B2)->fabricate();
-        std::cout << test9_03->getIdentifier()->getName() << "\n";
-
-        std::cout << "\n3\n";
-        SubclassIdentifier<A1> test9_04;
-        test9_04 = Class(A1B1C1);
-        A1* test9_05 = test9_04.fabricate();
-        std::cout << test9_05->getIdentifier()->getName() << "\n";
-
-        std::cout << "\n4\n";
-        BaseObject* test9_06 = ID("A2B2")->fabricate();
-        std::cout << test9_06->getIdentifier()->getName() << "\n";
-
-        std::cout << "\n5\n";
-        delete test9_02;
-        delete test9_03;
-        delete test9_05;
-        delete test9_06;
-*/
-/*
-        std::cout << "Test 10\n";
-        Identifier* test10_01 = Class(A1B2);
-        Identifier* test10_02 = Class(A2);
-        Identifier* test10_03 = Class(A3B1C1);
-
-        BaseObject* test10_04 = test10_01->fabricate();
-        BaseObject* test10_05 = test10_02->fabricate();
-        BaseObject* test10_06 = test10_03->fabricate();
-
-        BaseObject* test10_07;
-        for (int i = 0; i < 10; i++)
-            test10_07 = ID("A1B1C1")->fabricate();
-
-        std::cout << "1\n";
-        int count;
-
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl A1: " << count << "\n";
-        count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1: " << count << "\n";
-        count = 0; for (Iterator<A1B1C1> it = ObjectList<A1B1C1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1C1: " << count << "\n";
-        count = 0; for (Iterator<A2> it = ObjectList<A2>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A2: " << count << "\n";
-
-        std::cout << "2\n";
-        BaseObject* test10_08;
-        BaseObject* test10_09;
-        BaseObject* test10_10;
-        for (int i = 0; i < 10; i++)
-        {
-            test10_08 = ID("A2B1C1")->fabricate();
-            std::string objName = "A2B1C1#";
-            objName += '0' + i;
-            test10_08->setName(objName);
-
-            if (i == 0)
-                test10_09 = test10_08;
-
-            if (i == 5)
-                test10_10 = test10_08;
-        }
-
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl A1: " << count << "\n";
-        count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1: " << count << "\n";
-        count = 0; for (Iterator<A1B1C1> it = ObjectList<A1B1C1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1C1: " << count << "\n";
-        count = 0; for (Iterator<A2> it = ObjectList<A2>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A2: " << count << "\n";
-
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "3\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "4\n";
-        delete test10_08;
-
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl A1: " << count << "\n";
-        count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1: " << count << "\n";
-        count = 0; for (Iterator<A1B1C1> it = ObjectList<A1B1C1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1C1: " << count << "\n";
-        count = 0; for (Iterator<A2> it = ObjectList<A2>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A2: " << count << "\n";
-
-        std::cout << "5\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "6\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "7\n";
-        delete test10_09;
-
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::end(); it != 0; --it) { count++; }
-        std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::end(); it != 0; --it) { count++; }
-        std::cout << "Anzahl A1: " << count << "\n";
-        count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::end(); it; --it) { count++; }
-        std::cout << "Anzahl A1B1: " << count << "\n";
-        count = 0; for (Iterator<A1B1C1> it = ObjectList<A1B1C1>::end(); it; --it) { count++; }
-        std::cout << "Anzahl A1B1C1: " << count << "\n";
-        count = 0; for (Iterator<A2> it = ObjectList<A2>::end(); it; --it) { count++; }
-        std::cout << "Anzahl A2: " << count << "\n";
-
-        std::cout << "8\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "9\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "10\n";
-        delete test10_10;
-
-        count = 0; for (Iterator<BaseObject> it = ObjectList<BaseObject>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl BaseObjects: " << count << "\n";
-        count = 0; for (Iterator<A1> it = ObjectList<A1>::start(); it != 0; ++it) { count++; }
-        std::cout << "Anzahl A1: " << count << "\n";
-        count = 0; for (Iterator<A1B1> it = ObjectList<A1B1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1: " << count << "\n";
-        count = 0; for (Iterator<A1B1C1> it = ObjectList<A1B1C1>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A1B1C1: " << count << "\n";
-        count = 0; for (Iterator<A2> it = ObjectList<A2>::start(); it; ++it) { count++; }
-        std::cout << "Anzahl A2: " << count << "\n";
-
-        std::cout << "11\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::start(); it; ++it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "12\n";
-        for (Iterator<A2B1C1> it = ObjectList<A2B1C1>::end(); it; --it)
-            std::cout << "Name: " << it->getName() << "\n";
-
-        std::cout << "13\n";
-*/
-        std::cout << "Test 11\n";
-/*
-        std::cout << "1\n";
-        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
-        std::cout << "AnzahlTickable: " << count << "\n";
-
-        Test1* test11_1;
-        for (int i = 0; i < 3; i++)
-            test11_1 = new Test1;
-
-        count = 0; for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) { count++; }
-        std::cout << "AnzahlTickable: " << count << "\n";
-
-        for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
-            it->tick(0);
-
-        std::cout << "2\n";
-        Test2* test11_2 = new Test2;
-*/
-
-        std::cout << "3\n";
-        Test3* test11_3 = new Test3;
-        test11_3->configOutput();
-
-        std::cout << "4\n";
-
-        std::cout << "Test 12\n";
-        std::cout << "1\n";
-
-        WorldEntity* test12_1 = new WorldEntity;
-
-        std::cout << sizeof(WorldEntity) << std::endl;
-
-        std::cout << "2\n";
-
-
-
-        startRenderLoop();
-      }
-
-      ~OrxApplication()
-      {
-        mInputManager->destroyInputObject(mKeyboard);
-        OIS::InputManager::destroyInputSystem(mInputManager);
-
-//        delete mRenderer;
-//        delete mSystem;
-
-        delete mListener;
-        delete mRoot;
-      }
-
-    private:
-      Ogre::Root *mRoot;
-      OIS::Keyboard *mKeyboard;
-      OIS::Mouse *mMouse;
-      OIS::InputManager *mInputManager;
-      CEGUI::OgreCEGUIRenderer *mRenderer;
-      CEGUI::System *mSystem;
-      OrxExitListener *mListener;
-
-      void createRoot()
-      {
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-        mRoot = new Ogre::Root(macBundlePath() + "/Contents/Resources/plugins.cfg");
-#else
-        mRoot = new Ogre::Root();
-#endif
-      }
-
-      void defineResources()
-      {
-        Ogre::String secName, typeName, archName;
-        Ogre::ConfigFile cf;
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-        cf.load(macBundlePath() + "/Contents/Resources/resources.cfg");
-#else
-        cf.load("resources.cfg");
-#endif
-
-        Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
-        while (seci.hasMoreElements())
-        {
-          secName = seci.peekNextKey();
-          Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
-          Ogre::ConfigFile::SettingsMultiMap::iterator i;
-          for (i = settings->begin(); i != settings->end(); ++i)
-          {
-            typeName = i->first;
-            archName = i->second;
-#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation( String(macBundlePath() + "/" + archName), typeName, secName);
-#else
-            Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
-#endif
-          }
-        }
-      }
-
-      void setupRenderSystem()
-      {
-        if (!mRoot->restoreConfig() && !mRoot->showConfigDialog())
-          throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
-      }
-
-      void createRenderWindow()
-      {
-        mRoot->initialise(true, "Ogre Render Window");
-      }
-
-      void initializeResourceGroups()
-      {
-        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
-        Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
-      }
-
-      void createScene(void)
-      {
-
-//        string levelFile = "sp_level_moonstation.oxw";
-//        loader::LevelLoader* loader = new loader::LevelLoader(levelFile);
-      }
-
-      void setupScene()
-      {
-        WorldEntity::sceneManager_s = mRoot->createSceneManager(Ogre::ST_GENERIC, "Default SceneManager");
-        Ogre::Camera *cam = WorldEntity::sceneManager_s->createCamera("Camera");
-        Ogre::Viewport *vp = mRoot->getAutoCreatedWindow()->addViewport(cam);
-      }
-
-      void setupInputSystem()
-      {
-        size_t windowHnd = 0;
-        std::ostringstream windowHndStr;
-        OIS::ParamList pl;
-        Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow();
-
-        win->getCustomAttribute("WINDOW", &windowHnd);
-        windowHndStr << windowHnd;
-        pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
-        mInputManager = OIS::InputManager::createInputSystem(pl);
-
-        try
-        {
-          mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, false));
-          mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, false));
-        }
-        catch (const OIS::Exception &e)
-        {
-          throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem");
-        }
-      }
-
-      void setupCEGUI()
-      {
-        Ogre::SceneManager *mgr = mRoot->getSceneManager("Default SceneManager");
-        Ogre::RenderWindow *win = mRoot->getAutoCreatedWindow();
-
-        // CEGUI setup
-//        mRenderer = new CEGUI::OgreCEGUIRenderer(win, Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mgr);
-//        mSystem = new CEGUI::System(mRenderer);
-
-        // Other CEGUI setup here.
-      }
-
-      void createFrameListener()
-      {
-        TickFrameListener* TickFL = new TickFrameListener();
-        mRoot->addFrameListener(TickFL);
-
-        TimerFrameListener* TimerFL = new TimerFrameListener();
-        mRoot->addFrameListener(TimerFL);
-
-        mListener = new OrxExitListener(mKeyboard);
-        mRoot->addFrameListener(mListener);
-      }
-
-      void startRenderLoop()
-      {
-        mRoot->startRendering();
-      }
-  };
-}
-
-using namespace Ogre;
-
-//#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
-//#define WIN32_LEAN_AND_MEAN
-//#include "windows.h"
-
-//             INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
-//#else
-             int main(int argc, char **argv)
-//#endif
-{
-  try
-  {
-    SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
-    orxonox::OrxApplication orxonox;
-    orxonox.go();
-  }
-  catch(Exception& e)
-  {
-//#if OGRE_PLATFORM == PLATFORM_WIN32 || OGRE_PLATFORM == OGRE_PLATFORM_WIN32
-//    MessageBoxA(NULL, e.getFullDescription().c_str(), "An exception has occurred!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
-//#else
-    fprintf(stderr, "An exception has occurred: %s\n",
-            e.getFullDescription().c_str());
-//#endif
-  }
-
-  return 0;
-}
-
