Index: /code/branches/core7/src/libraries/core/class/Identifier.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10399)
+++ /code/branches/core7/src/libraries/core/class/Identifier.cc	(revision 10400)
@@ -44,4 +44,6 @@
 namespace orxonox
 {
+    bool Identifier::initConfigValues_s = true;
+
     // ###############################
     // ###       Identifier        ###
Index: /code/branches/core7/src/libraries/core/class/Identifier.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10399)
+++ /code/branches/core7/src/libraries/core/class/Identifier.h	(revision 10400)
@@ -207,4 +207,6 @@
             virtual bool canDynamicCastObjectToIdentifierClass(Identifiable* object) const = 0;
 
+            static bool initConfigValues_s; // TODO: this is a hack - remove it as soon as possible
+
         protected:
             virtual void createSuperFunctionCaller() const = 0;
@@ -330,5 +332,7 @@
             IdentifierManager::getInstance().createdObject(object);
 
-            this->setConfigValues(object, object);
+            if (Identifier::initConfigValues_s)
+                this->setConfigValues(object, object);
+
             return true;
         }
Index: /code/branches/core7/test/core/class/IdentifiableTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifiableTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifiableTest.cc	(revision 10400)
@@ -12,4 +12,6 @@
                 IdentifiableTest() { RegisterObject(IdentifiableTest); }
         };
+
+        RegisterClassNoArgs(IdentifiableTest);
     }
 
Index: /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifierClassHierarchyTest.cc	(revision 10400)
@@ -124,4 +124,15 @@
         };
 
+        RegisterAbstractClass(BaseInterface1).inheritsFrom<OrxonoxInterface>();
+        RegisterAbstractClass(BaseInterface2).inheritsFrom<OrxonoxInterface>();
+        RegisterAbstractClass(Interface1).inheritsFrom<BaseInterface1>();
+        RegisterAbstractClass(Interface2).inheritsFrom<BaseInterface2>();
+        RegisterClassNoArgs(BaseClass);
+        RegisterClassNoArgs(Class0);
+        RegisterClassNoArgs(Class1);
+        RegisterClassNoArgs(Class2a);
+        RegisterClassNoArgs(Class2b);
+        RegisterClassNoArgs(Class3);
+
         // Fixture
         class IdentifierClassHierarchyTest : public ::testing::Test
@@ -130,26 +141,8 @@
                 virtual void SetUp()
                 {
-                    registerClass("Context", new ClassFactoryWithContext<Context>());
-                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
-                    registerClass("Configurable", new ClassFactoryNoArgs<Configurable>());
-                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
-                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("BaseInterface1", static_cast<ClassFactory<BaseInterface1>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
-                    registerClass("BaseInterface2", static_cast<ClassFactory<BaseInterface2>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
-                    registerClass("Interface1", static_cast<ClassFactory<Interface1>*>(NULL), false)->inheritsFrom(Class(BaseInterface1));
-                    registerClass("Interface2", static_cast<ClassFactory<Interface2>*>(NULL), false)->inheritsFrom(Class(BaseInterface2));
-                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
-                    registerClass("Class0", new ClassFactoryNoArgs<Class0>());
-                    registerClass("Class1", new ClassFactoryNoArgs<Class1>());
-                    registerClass("Class2a", new ClassFactoryNoArgs<Class2a>());
-                    registerClass("Class2b", new ClassFactoryNoArgs<Class2b>());
-                    registerClass("Class3", new ClassFactoryNoArgs<Class3>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
@@ -166,57 +159,57 @@
     }
 
-    TEST(IdentifierClassHierarchyTest_NoFixture, NoInitialization)
-    {
-        {
-            Identifier* identifier = Class(BaseInterface1);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(BaseInterface2);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Interface1);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Interface2);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(BaseClass);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Class0);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Class1);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Class2a);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Class2b);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(Class3);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-    }
+//    TEST(IdentifierClassHierarchyTest_NoFixture, NoInitialization)
+//    {
+//        {
+//            Identifier* identifier = Class(BaseInterface1);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(BaseInterface2);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Interface1);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Interface2);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(BaseClass);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Class0);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Class1);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Class2a);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Class2b);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(Class3);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//    }
 
     TEST_F(IdentifierClassHierarchyTest, TestBaseInterface1)
Index: /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifierExternalClassHierarchyTest.cc	(revision 10400)
@@ -38,4 +38,8 @@
         };
 
+        RegisterAbstractClass(Interface).inheritsFrom<Identifiable>();
+        RegisterClassNoArgs(BaseClass);
+        RegisterClassNoArgs(RealClass);
+
         // Fixture
         class IdentifierExternalClassHierarchyTest : public ::testing::Test
@@ -44,16 +48,8 @@
                 virtual void SetUp()
                 {
-                    registerClass("Context", new ClassFactoryWithContext<Context>());
-                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
-                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false)->inheritsFrom(Class(Identifiable));
-                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
-                    registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
@@ -70,22 +66,22 @@
     }
 
-    TEST(IdentifierExternalClassHierarchyTest_NoFixture, NoInitialization)
-    {
-        {
-            Identifier* identifier = Class(Interface);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(BaseClass);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(RealClass);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-    }
+//    TEST(IdentifierExternalClassHierarchyTest_NoFixture, NoInitialization)
+//    {
+//        {
+//            Identifier* identifier = Class(Interface);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(BaseClass);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(RealClass);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//    }
 
     TEST_F(IdentifierExternalClassHierarchyTest, TestInterface)
Index: /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifierNestedClassHierarchyTest.cc	(revision 10400)
@@ -90,4 +90,16 @@
         };
 
+        RegisterClassNoArgs(Nested1);
+        RegisterClassNoArgs(Nested2);
+        RegisterClassNoArgs(BaseClass);
+        RegisterClassNoArgs(Class1_notNested);
+        RegisterClassNoArgs(Class2_oneNested);
+        RegisterClassNoArgs(Class3_twoNested);
+        RegisterClassNoArgs(Class4_class1Nested);
+        RegisterClassNoArgs(Class5_class2Nested);
+        RegisterClassNoArgs(Class6_class3Nested);
+        RegisterClassNoArgs(Class3_Child);
+        RegisterClassNoArgs(Class6_Child);
+
         // Fixture
         class IdentifierNestedClassHierarchyTest : public ::testing::Test
@@ -96,26 +108,8 @@
                 virtual void SetUp()
                 {
-                    registerClass("Context", new ClassFactoryWithContext<Context>());
-                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
-                    registerClass("Configurable", new ClassFactoryNoArgs<Configurable>());
-                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("Nested1", new ClassFactoryNoArgs<Nested1>());
-                    registerClass("Nested2", new ClassFactoryNoArgs<Nested2>());
-                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
-                    registerClass("Class1_notNested", new ClassFactoryNoArgs<Class1_notNested>());
-                    registerClass("Class2_oneNested", new ClassFactoryNoArgs<Class2_oneNested>());
-                    registerClass("Class3_twoNested", new ClassFactoryNoArgs<Class3_twoNested>());
-                    registerClass("Class4_class1Nested", new ClassFactoryNoArgs<Class4_class1Nested>());
-                    registerClass("Class5_class2Nested", new ClassFactoryNoArgs<Class5_class2Nested>());
-                    registerClass("Class6_class3Nested", new ClassFactoryNoArgs<Class6_class3Nested>());
-                    registerClass("Class3_Child", new ClassFactoryNoArgs<Class3_Child>());
-                    registerClass("Class6_Child", new ClassFactoryNoArgs<Class6_Child>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
Index: /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifierSimpleClassHierarchyTest.cc	(revision 10400)
@@ -9,5 +9,5 @@
     namespace
     {
-        class Interface : public OrxonoxInterface
+        class Interface : virtual public OrxonoxInterface
         {
             public:
@@ -40,4 +40,8 @@
         };
 
+        RegisterAbstractClass(Interface).inheritsFrom<OrxonoxInterface>();
+        RegisterClassNoArgs(BaseClass);
+        RegisterClassNoArgs(RealClass);
+
         // Fixture
         class IdentifierSimpleClassHierarchyTest : public ::testing::Test
@@ -46,19 +50,8 @@
                 virtual void SetUp()
                 {
-                    registerClass("Context", new ClassFactoryWithContext<Context>());
-                    registerClass("Listable", new ClassFactoryWithContext<Listable>());
-                    registerClass("Configurable", new ClassFactoryNoArgs<Configurable>());
-                    registerClass("OrxonoxInterface", new ClassFactoryNoArgs<OrxonoxInterface>());
-                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("Interface", static_cast<ClassFactory<Interface>*>(NULL), false)->inheritsFrom(Class(OrxonoxInterface));
-                    registerClass("BaseClass", new ClassFactoryNoArgs<BaseClass>());
-                    registerClass("RealClass", new ClassFactoryNoArgs<RealClass>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
                 }
 
                 virtual void TearDown()
                 {
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
@@ -75,22 +68,22 @@
     }
 
-    TEST(IdentifierSimpleClassHierarchyTest_NoFixture, NoInitialization)
-    {
-        {
-            Identifier* identifier = Class(Interface);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(BaseClass);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-        {
-            Identifier* identifier = Class(RealClass);
-            EXPECT_EQ(0u, identifier->getChildren().size());
-            EXPECT_EQ(0u, identifier->getParents().size());
-        }
-    }
+//    TEST(IdentifierSimpleClassHierarchyTest_NoFixture, NoInitialization)
+//    {
+//        {
+//            Identifier* identifier = Class(Interface);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(BaseClass);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//        {
+//            Identifier* identifier = Class(RealClass);
+//            EXPECT_EQ(0u, identifier->getChildren().size());
+//            EXPECT_EQ(0u, identifier->getParents().size());
+//        }
+//    }
 
     TEST_F(IdentifierSimpleClassHierarchyTest, TestInterface)
Index: /code/branches/core7/test/core/class/IdentifierTest.cc
===================================================================
--- /code/branches/core7/test/core/class/IdentifierTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/IdentifierTest.cc	(revision 10400)
@@ -18,4 +18,7 @@
                 TestSubclass() { RegisterObject(TestSubclass); }
         };
+
+        RegisterClassNoArgs(TestClass);
+        RegisterClassNoArgs(TestSubclass);
     }
 
Index: /code/branches/core7/test/core/class/SubclassIdentifierTest.cc
===================================================================
--- /code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/SubclassIdentifierTest.cc	(revision 10400)
@@ -21,4 +21,7 @@
         };
 
+        RegisterClass(TestClass);
+        RegisterClass(TestSubclass);
+
         // Fixture
         class SubclassIdentifierTest : public ::testing::Test
@@ -27,10 +30,4 @@
                 virtual void SetUp()
                 {
-                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("TestClass", new ClassFactoryWithContext<TestClass>());
-                    registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
-
                     Context::setRootContext(new Context(NULL));
                 }
@@ -39,6 +36,4 @@
                 {
                     Context::setRootContext(NULL);
-
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
Index: /code/branches/core7/test/core/class/SuperTest.cc
===================================================================
--- /code/branches/core7/test/core/class/SuperTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/class/SuperTest.cc	(revision 10400)
@@ -62,4 +62,7 @@
         };
 
+        RegisterClass(TestClass);
+        RegisterClass(TestSubclass);
+
        // Fixture
         class SuperTest : public ::testing::Test
@@ -68,13 +71,4 @@
                 virtual void SetUp()
                 {
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
-
-                    registerClass("OrxonoxClass", new ClassFactoryNoArgs<OrxonoxClass>());
-                    registerClass("BaseObject", new ClassFactoryWithContext<BaseObject>());
-                    registerClass("TestClass", new ClassFactoryWithContext<TestClass>());
-                    registerClass("TestSubclass", new ClassFactoryWithContext<TestSubclass>());
-
-                    IdentifierManager::getInstance().createClassHierarchy();
-
                     Context::setRootContext(new Context(NULL));
                 }
@@ -83,6 +77,4 @@
                 {
                     Context::setRootContext(NULL);
-
-                    IdentifierManager::getInstance().destroyAllIdentifiers();
                 }
         };
Index: /code/branches/core7/test/core/command/CommandTest.cc
===================================================================
--- /code/branches/core7/test/core/command/CommandTest.cc	(revision 10399)
+++ /code/branches/core7/test/core/command/CommandTest.cc	(revision 10400)
@@ -1,3 +1,5 @@
 #include <gtest/gtest.h>
+#include "core/class/Identifier.h"
+#include "core/class/IdentifierManager.h"
 #include "core/command/ConsoleCommandIncludes.h"
 #include "core/command/CommandExecutor.h"
@@ -143,4 +145,6 @@
     {
         ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
+        Identifier::initConfigValues_s = false; // TODO: hack!
+        IdentifierManager::getInstance().createClassHierarchy();
 
         test(0, 0, 0);
