Index: /code/branches/core7/src/libraries/core/CoreIncludes.h
===================================================================
--- /code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10480)
+++ /code/branches/core7/src/libraries/core/CoreIncludes.h	(revision 10481)
@@ -167,7 +167,5 @@
     inline Identifier* registerClass(const std::string& name, Factory* factory, bool bLoadable = true)
     {
-        Identifier* identifier = new ClassIdentifier<T>(name, factory, bLoadable);
-        IdentifierManager::getInstance().addIdentifier(identifier);
-        return identifier;
+        return new ClassIdentifier<T>(name, factory, bLoadable);
     }
 
@@ -242,4 +240,5 @@
             virtual void load()
             {
+                IdentifierManager::getInstance().addIdentifier(this->identifier_);
                 for (size_t i = 0; i < this->parents_.size(); ++i)
                     this->identifier_->inheritsFrom(this->parents_[i]->getParent());
@@ -248,4 +247,5 @@
             virtual void unload()
             {
+                IdentifierManager::getInstance().removeIdentifier(this->identifier_);
             }
 
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10480)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.cc	(revision 10481)
@@ -68,4 +68,15 @@
         this->identifierByLowercaseString_[getLowercase(identifier->getName())] = identifier;
         this->identifierByNetworkId_[identifier->getNetworkID()] = identifier;
+    }
+
+    /**
+     * Unregisters the identifier from all maps of the IdentifierManager.
+     */
+    void IdentifierManager::removeIdentifier(Identifier* identifier)
+    {
+        this->identifiers_.erase(identifier);
+        this->identifierByString_.erase(identifier->getName());
+        this->identifierByLowercaseString_.erase(getLowercase(identifier->getName()));
+        this->identifierByNetworkId_.erase(identifier->getNetworkID());
     }
 
Index: /code/branches/core7/src/libraries/core/class/IdentifierManager.h
===================================================================
--- /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10480)
+++ /code/branches/core7/src/libraries/core/class/IdentifierManager.h	(revision 10481)
@@ -50,4 +50,5 @@
 
             void addIdentifier(Identifier* identifier);
+            void removeIdentifier(Identifier* identifier);
 
             unsigned int getUniqueClassId()
Index: /code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h
===================================================================
--- /code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h	(revision 10480)
+++ /code/branches/core7/src/libraries/core/singleton/ScopedSingletonIncludes.h	(revision 10481)
@@ -77,5 +77,4 @@
 namespace orxonox
 {
-
     class _CoreExport StaticallyInitializedScopedSingletonWrapper : public StaticallyInitializedInstance
     {
Index: /code/branches/core7/test/core/object/ClassFactoryTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ClassFactoryTest.cc	(revision 10480)
+++ /code/branches/core7/test/core/object/ClassFactoryTest.cc	(revision 10481)
@@ -3,4 +3,5 @@
 #include "core/BaseObject.h"
 #include "core/object/Context.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -15,8 +16,10 @@
                 {
                     Context::setRootContext(new Context(NULL));
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
                 }
 
                 virtual void TearDown()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                     Context::setRootContext(NULL);
                 }
Index: /code/branches/core7/test/core/object/ContextTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ContextTest.cc	(revision 10480)
+++ /code/branches/core7/test/core/object/ContextTest.cc	(revision 10481)
@@ -3,4 +3,5 @@
 #include "core/class/OrxonoxClass.h"
 #include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -23,8 +24,10 @@
                 {
                     Context::setRootContext(new Context(NULL));
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
                 }
 
                 virtual void TearDown()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                     Context::setRootContext(NULL);
                 }
Index: /code/branches/core7/test/core/object/IteratorTest.cc
===================================================================
--- /code/branches/core7/test/core/object/IteratorTest.cc	(revision 10480)
+++ /code/branches/core7/test/core/object/IteratorTest.cc	(revision 10481)
@@ -6,4 +6,5 @@
 #include "core/class/OrxonoxInterface.h"
 #include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -34,8 +35,10 @@
                 {
                     Context::setRootContext(new Context(NULL));
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
                 }
 
                 virtual void TearDown()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                     Context::setRootContext(NULL);
                 }
Index: /code/branches/core7/test/core/object/ListableTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ListableTest.cc	(revision 10480)
+++ /code/branches/core7/test/core/object/ListableTest.cc	(revision 10481)
@@ -2,4 +2,5 @@
 #include "core/object/Listable.h"
 #include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -39,8 +40,10 @@
                 {
                     Context::setRootContext(new Context(NULL));
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
                 }
 
                 virtual void TearDown()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                     Context::setRootContext(NULL);
                 }
Index: /code/branches/core7/test/core/object/ObjectListIteratorTest.cc
===================================================================
--- /code/branches/core7/test/core/object/ObjectListIteratorTest.cc	(revision 10480)
+++ /code/branches/core7/test/core/object/ObjectListIteratorTest.cc	(revision 10481)
@@ -5,4 +5,5 @@
 #include "core/object/Listable.h"
 #include "core/CoreIncludes.h"
+#include "core/module/ModuleInstance.h"
 
 namespace orxonox
@@ -26,8 +27,10 @@
                 {
                     Context::setRootContext(new Context(NULL));
+                    ModuleInstance::getCurrentModuleInstance()->loadAllStaticallyInitializedInstances();
                 }
 
                 virtual void TearDown()
                 {
+                    ModuleInstance::getCurrentModuleInstance()->unloadAllStaticallyInitializedInstances();
                     Context::setRootContext(NULL);
                 }
