Index: code/trunk/src/orxonox/CameraManager.cc
===================================================================
--- code/trunk/src/orxonox/CameraManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/CameraManager.cc	(revision 9667)
@@ -38,5 +38,5 @@
 #include "core/GameMode.h"
 #include "core/GraphicsManager.h"
-#include "core/ObjectList.h"
+#include "core/object/ObjectList.h"
 #include "tools/Shader.h"
 #include "graphics/Camera.h"
@@ -48,6 +48,4 @@
     CameraManager::CameraManager()
     {
-        RegisterRootObject(CameraManager);
-
         assert(GameMode::showsGraphics());
     }
Index: code/trunk/src/orxonox/CameraManager.h
===================================================================
--- code/trunk/src/orxonox/CameraManager.h	(revision 9666)
+++ code/trunk/src/orxonox/CameraManager.h	(revision 9667)
@@ -41,9 +41,8 @@
 #include "util/OgreForwardRefs.h"
 #include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport CameraManager : public Singleton<CameraManager>, public OrxonoxClass
+    class _OrxonoxExport CameraManager : public Singleton<CameraManager>
     {
             friend class Singleton<CameraManager>;
Index: code/trunk/src/orxonox/Level.cc
===================================================================
--- code/trunk/src/orxonox/Level.cc	(revision 9666)
+++ code/trunk/src/orxonox/Level.cc	(revision 9667)
@@ -43,7 +43,7 @@
 namespace orxonox
 {
-    CreateFactory(Level);
+    RegisterClass(Level);
 
-    Level::Level(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    Level::Level(Context* context) : BaseObject(context), Synchronisable(context), Context(context)
     {
         RegisterObject(Level);
Index: code/trunk/src/orxonox/Level.h
===================================================================
--- code/trunk/src/orxonox/Level.h	(revision 9666)
+++ code/trunk/src/orxonox/Level.h	(revision 9667)
@@ -41,8 +41,8 @@
 namespace orxonox
 {
-    class _OrxonoxExport Level : public BaseObject, public Synchronisable
+    class _OrxonoxExport Level : public BaseObject, public Synchronisable, public Context
     {
         public:
-            Level(BaseObject* creator);
+            Level(Context* context);
             virtual ~Level();
 
Index: code/trunk/src/orxonox/LevelInfo.cc
===================================================================
--- code/trunk/src/orxonox/LevelInfo.cc	(revision 9666)
+++ code/trunk/src/orxonox/LevelInfo.cc	(revision 9667)
@@ -242,5 +242,5 @@
     // LevelInfo
 
-    CreateFactory(LevelInfo);
+    RegisterClass(LevelInfo);
 
     /**
@@ -250,5 +250,5 @@
         The creator of this object.
     */
-    LevelInfo::LevelInfo(BaseObject* creator) : BaseObject(creator)
+    LevelInfo::LevelInfo(Context* context) : BaseObject(context)
     {
         RegisterObject(LevelInfo);
Index: code/trunk/src/orxonox/LevelInfo.h
===================================================================
--- code/trunk/src/orxonox/LevelInfo.h	(revision 9666)
+++ code/trunk/src/orxonox/LevelInfo.h	(revision 9667)
@@ -45,5 +45,5 @@
 #include <iostream>
 #include <fstream>
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox // tolua_export
@@ -61,5 +61,5 @@
     */
     class _OrxonoxExport LevelInfoItem // tolua_export
-        : virtual public OrxonoxClass
+        : virtual public OrxonoxInterface
     { // tolua_export
         public:
@@ -204,5 +204,5 @@
     {
         public:
-            LevelInfo(BaseObject* creator);
+            LevelInfo(Context* context);
             virtual ~LevelInfo();
 
Index: code/trunk/src/orxonox/LevelManager.cc
===================================================================
--- code/trunk/src/orxonox/LevelManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/LevelManager.cc	(revision 9667)
@@ -37,8 +37,8 @@
 
 #include "util/ScopedSingletonManager.h"
+#include "core/config/CommandLineParser.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/CoreIncludes.h"
 #include "core/ClassTreeMask.h"
-#include "core/CommandLineParser.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/CoreIncludes.h"
 #include "core/Loader.h"
 #include "core/Resource.h"
@@ -59,5 +59,5 @@
     LevelManager::LevelManager()
     {
-        RegisterRootObject(LevelManager);
+        RegisterObject(LevelManager);
         this->setConfigValues();
 
Index: code/trunk/src/orxonox/LevelManager.h
===================================================================
--- code/trunk/src/orxonox/LevelManager.h	(revision 9666)
+++ code/trunk/src/orxonox/LevelManager.h	(revision 9667)
@@ -46,5 +46,5 @@
 
 #include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
+#include "core/config/Configurable.h"
 
 // tolua_begin
@@ -67,5 +67,5 @@
     class _OrxonoxExport LevelManager
     // tolua_end
-        : public Singleton<LevelManager>, public OrxonoxClass
+        : public Singleton<LevelManager>, public Configurable
     { // tolua_export
             friend class Singleton<LevelManager>;
Index: code/trunk/src/orxonox/Main.cc
===================================================================
--- code/trunk/src/orxonox/Main.cc	(revision 9666)
+++ code/trunk/src/orxonox/Main.cc	(revision 9667)
@@ -36,5 +36,5 @@
 #include "Main.h"
 
-#include "core/CommandLineParser.h"
+#include "core/config/CommandLineParser.h"
 #include "core/Game.h"
 #include "core/LuaState.h"
Index: code/trunk/src/orxonox/MoodManager.cc
===================================================================
--- code/trunk/src/orxonox/MoodManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/MoodManager.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "util/ScopedSingletonManager.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/Resource.h"
@@ -43,5 +43,5 @@
     MoodManager::MoodManager()
     {
-        RegisterRootObject(MoodManager);
+        RegisterObject(MoodManager);
         this->setConfigValues();
 
@@ -95,5 +95,5 @@
     MoodListener::MoodListener()
     {
-        RegisterRootObject(MoodListener);
+        RegisterObject(MoodListener);
     }
 
Index: code/trunk/src/orxonox/MoodManager.h
===================================================================
--- code/trunk/src/orxonox/MoodManager.h	(revision 9666)
+++ code/trunk/src/orxonox/MoodManager.h	(revision 9667)
@@ -34,5 +34,5 @@
 #include <string>
 #include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
@@ -42,5 +42,5 @@
         The MoodListener class is aware of a change in themes and directs that info to dependent classes.
     */
-    class _OrxonoxExport MoodListener : virtual public OrxonoxClass
+    class _OrxonoxExport MoodListener : virtual public OrxonoxInterface
     {
         friend class MoodManager;
@@ -60,5 +60,5 @@
         The MoodManager class serves to allow for different musical themes in the game.
     */
-    class _OrxonoxExport MoodManager : public Singleton<MoodManager>, public OrxonoxClass
+    class _OrxonoxExport MoodManager : public Singleton<MoodManager>, public Configurable
     {
             friend class Singleton<MoodManager>;
@@ -74,5 +74,4 @@
 
         private:
-            ~MoodManager() {}
             void checkMoodValidity();
 
Index: code/trunk/src/orxonox/PawnManager.cc
===================================================================
--- code/trunk/src/orxonox/PawnManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/PawnManager.cc	(revision 9667)
@@ -39,5 +39,5 @@
     PawnManager::PawnManager()
     {
-        RegisterRootObject(PawnManager);
+        RegisterObject(PawnManager);
     }
 
Index: code/trunk/src/orxonox/PlayerManager.cc
===================================================================
--- code/trunk/src/orxonox/PlayerManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/PlayerManager.cc	(revision 9667)
@@ -43,5 +43,5 @@
     PlayerManager::PlayerManager()
     {
-        RegisterRootObject(PlayerManager);
+        RegisterObject(PlayerManager);
 
 //         this->getConnectedClients();
Index: code/trunk/src/orxonox/Radar.cc
===================================================================
--- code/trunk/src/orxonox/Radar.cc	(revision 9666)
+++ code/trunk/src/orxonox/Radar.cc	(revision 9667)
@@ -37,5 +37,5 @@
 
 //#include "util/Math.h"
-#include "core/ObjectList.h"
+#include "core/object/ObjectList.h"
 #include "core/command/ConsoleCommand.h"
 #include "interfaces/RadarListener.h"
Index: code/trunk/src/orxonox/Radar.h
===================================================================
--- code/trunk/src/orxonox/Radar.h	(revision 9666)
+++ code/trunk/src/orxonox/Radar.h	(revision 9667)
@@ -41,5 +41,5 @@
 #include <string>
 
-#include "core/ObjectListIterator.h"
+#include "core/object/ObjectListIterator.h"
 #include "interfaces/RadarViewable.h"
 #include "tools/interfaces/Tickable.h"
@@ -74,5 +74,5 @@
         void radarObjectChanged(RadarViewable* rv);
 
-        ObjectListIterator<RadarViewable> itFocus_;
+        ObjectList<RadarViewable>::iterator itFocus_;
         RadarViewable* focus_;
         std::map<std::string, RadarViewable::Shape> objectTypes_;
Index: code/trunk/src/orxonox/Scene.cc
===================================================================
--- code/trunk/src/orxonox/Scene.cc	(revision 9666)
+++ code/trunk/src/orxonox/Scene.cc	(revision 9667)
@@ -51,7 +51,7 @@
 namespace orxonox
 {
-    CreateFactory(Scene);
-
-    Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    RegisterClass(Scene);
+
+    Scene::Scene(Context* context) : BaseObject(context), Synchronisable(context), Context(context)
     {
         RegisterObject(Scene);
Index: code/trunk/src/orxonox/Scene.h
===================================================================
--- code/trunk/src/orxonox/Scene.h	(revision 9666)
+++ code/trunk/src/orxonox/Scene.h	(revision 9667)
@@ -45,8 +45,8 @@
 namespace orxonox
 {
-    class _OrxonoxExport Scene : public BaseObject, public Synchronisable, public Tickable
+    class _OrxonoxExport Scene : public BaseObject, public Synchronisable, public Tickable, public Context
     {
         public:
-            Scene(BaseObject* creator);
+            Scene(Context* context);
             virtual ~Scene();
 
Index: code/trunk/src/orxonox/Test.cc
===================================================================
--- code/trunk/src/orxonox/Test.cc	(revision 9666)
+++ code/trunk/src/orxonox/Test.cc	(revision 9667)
@@ -28,5 +28,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/command/ConsoleCommand.h"
 #include "network/NetworkFunction.h"
@@ -36,5 +36,5 @@
 namespace orxonox
 {
-    CreateFactory ( Test );
+    RegisterClass ( Test );
 
     SetConsoleCommand("Test", "printV1", &Test::printV1).addShortcut();
@@ -56,5 +56,5 @@
     Test* Test::instance_ = 0;
 
-    Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    Test::Test(Context* context) : BaseObject(context), Synchronisable(context)
     {
         assert(instance_==0);
Index: code/trunk/src/orxonox/Test.h
===================================================================
--- code/trunk/src/orxonox/Test.h	(revision 9666)
+++ code/trunk/src/orxonox/Test.h	(revision 9667)
@@ -46,5 +46,5 @@
   {
     public:
-      Test(BaseObject* creator);
+      Test(Context* context);
       virtual ~Test();
 
Index: code/trunk/src/orxonox/chat/ChatHistory.cc
===================================================================
--- code/trunk/src/orxonox/chat/ChatHistory.cc	(revision 9666)
+++ code/trunk/src/orxonox/chat/ChatHistory.cc	(revision 9667)
@@ -39,5 +39,4 @@
   /* constructor */
 #ifndef CHATTEST
-  //ChatHistory::ChatHistory( BaseObject* creator ) : BaseObject(creator)
   ChatHistory::ChatHistory()
 #else
Index: code/trunk/src/orxonox/chat/ChatListener.h
===================================================================
--- code/trunk/src/orxonox/chat/ChatListener.h	(revision 9666)
+++ code/trunk/src/orxonox/chat/ChatListener.h	(revision 9667)
@@ -32,5 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
-#include "core/OrxonoxClass.h"
+#include "core/object/Listable.h"
 
 namespace orxonox
@@ -40,5 +40,5 @@
         message was sent through ChatManager.
     */
-    class _OrxonoxExport ChatListener : virtual public OrxonoxClass
+    class _OrxonoxExport ChatListener : virtual public Listable
     {
         friend class ChatManager;
Index: code/trunk/src/orxonox/chat/ChatManager.cc
===================================================================
--- code/trunk/src/orxonox/chat/ChatManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/chat/ChatManager.cc	(revision 9667)
@@ -113,8 +113,9 @@
     // ChatListener                                                         //
     //////////////////////////////////////////////////////////////////////////
+    RegisterAbstractClass(ChatListener).inheritsFrom(Class(Listable));
 
     ChatListener::ChatListener()
     {
-        RegisterRootObject(ChatListener);
+        RegisterObject(ChatListener);
     }
 }
Index: code/trunk/src/orxonox/collisionshapes/CollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/CollisionShape.cc	(revision 9667)
@@ -44,4 +44,5 @@
 namespace orxonox
 {
+    RegisterAbstractClass(CollisionShape).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
 
     /**
@@ -49,7 +50,7 @@
         Constructor. Registers and initializes the object.
     */
-    CollisionShape::CollisionShape(BaseObject* creator)
-        : BaseObject(creator)
-        , Synchronisable(creator)
+    CollisionShape::CollisionShape(Context* context)
+        : BaseObject(context)
+        , Synchronisable(context)
     {
         RegisterObject(CollisionShape);
Index: code/trunk/src/orxonox/collisionshapes/CollisionShape.h
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CollisionShape.h	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/CollisionShape.h	(revision 9667)
@@ -58,5 +58,5 @@
     {
         public:
-            CollisionShape(BaseObject* creator);
+            CollisionShape(Context* context);
             virtual ~CollisionShape();
 
Index: code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 9667)
@@ -42,5 +42,5 @@
 namespace orxonox
 {
-    CreateFactory(CompoundCollisionShape);
+    RegisterClass(CompoundCollisionShape);
 
     /**
@@ -48,5 +48,5 @@
         Constructor. Registers and initializes the object.
     */
-    CompoundCollisionShape::CompoundCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    CompoundCollisionShape::CompoundCollisionShape(Context* context) : CollisionShape(context)
     {
         RegisterObject(CompoundCollisionShape);
Index: code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/CompoundCollisionShape.h	(revision 9667)
@@ -58,5 +58,5 @@
     {
         public:
-            CompoundCollisionShape(BaseObject* creator);
+            CompoundCollisionShape(Context* context);
             virtual ~CompoundCollisionShape();
 
Index: code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.cc	(revision 9667)
@@ -37,9 +37,9 @@
 namespace orxonox
 {
-    WorldEntityCollisionShape::WorldEntityCollisionShape(WorldEntity* creator) : CompoundCollisionShape(creator)
+    WorldEntityCollisionShape::WorldEntityCollisionShape(Context* context) : CompoundCollisionShape(context)
     {
         RegisterObject(WorldEntityCollisionShape);
 
-        this->worldEntityOwner_ = creator;
+        this->worldEntityOwner_ = NULL;
         // suppress synchronisation
         this->setSyncMode(ObjectDirection::None);
Index: code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.h	(revision 9666)
+++ code/trunk/src/orxonox/collisionshapes/WorldEntityCollisionShape.h	(revision 9667)
@@ -38,8 +38,10 @@
     {
         public:
-            WorldEntityCollisionShape(WorldEntity* creator);
+            WorldEntityCollisionShape(Context* context);
             virtual ~WorldEntityCollisionShape();
 
-            inline WorldEntity* getWorldEntityOwner()
+            inline void setWorldEntityOwner(WorldEntity* worldEntityOwner)
+                { this->worldEntityOwner_ = worldEntityOwner; }
+            inline WorldEntity* getWorldEntityOwner() const
                 { return this->worldEntityOwner_; }
 
Index: code/trunk/src/orxonox/controllers/AIController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/AIController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/AIController.cc	(revision 9667)
@@ -39,7 +39,7 @@
     const float AIController::ACTION_INTERVAL = 1.0f;
 
-    CreateFactory(AIController);
-
-    AIController::AIController(BaseObject* creator) : ArtificialController(creator)
+    RegisterClass(AIController);
+
+    AIController::AIController(Context* context) : ArtificialController(context)
     {
         RegisterObject(AIController);
Index: code/trunk/src/orxonox/controllers/AIController.h
===================================================================
--- code/trunk/src/orxonox/controllers/AIController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/AIController.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            AIController(BaseObject* creator);
+            AIController(Context* context);
             virtual ~AIController();
 
Index: code/trunk/src/orxonox/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/ArtificialController.cc	(revision 9667)
@@ -45,5 +45,7 @@
     SetConsoleCommand("ArtificialController", "setbotlevel",      &ArtificialController::setAllBotLevel);
 
-    ArtificialController::ArtificialController(BaseObject* creator) : FormationController(creator)
+    RegisterClass(ArtificialController);
+
+    ArtificialController::ArtificialController(Context* context) : FormationController(context)
     {
         RegisterObject(ArtificialController);
Index: code/trunk/src/orxonox/controllers/ArtificialController.h
===================================================================
--- code/trunk/src/orxonox/controllers/ArtificialController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/ArtificialController.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            ArtificialController(BaseObject* creator);
+            ArtificialController(Context* context);
             virtual ~ArtificialController();
 
Index: code/trunk/src/orxonox/controllers/Controller.cc
===================================================================
--- code/trunk/src/orxonox/controllers/Controller.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/Controller.cc	(revision 9667)
@@ -33,7 +33,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Controller);
+    RegisterUnloadableClass(Controller);
 
-    Controller::Controller(BaseObject* creator) : BaseObject(creator)
+    Controller::Controller(Context* context) : BaseObject(context)
     {
         RegisterObject(Controller);
Index: code/trunk/src/orxonox/controllers/Controller.h
===================================================================
--- code/trunk/src/orxonox/controllers/Controller.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/Controller.h	(revision 9667)
@@ -42,5 +42,5 @@
 
         public:
-            Controller(BaseObject* creator);
+            Controller(Context* context);
             virtual ~Controller();
 
Index: code/trunk/src/orxonox/controllers/DroneController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/DroneController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/DroneController.cc	(revision 9667)
@@ -41,9 +41,9 @@
         Constructor.
     */
-    CreateFactory(DroneController);
+    RegisterClass(DroneController);
 
     const float DroneController::ACTION_INTERVAL = 1.0f;
 
-    DroneController::DroneController(BaseObject* creator) : ArtificialController(creator)
+    DroneController::DroneController(Context* context) : ArtificialController(context)
     {
         RegisterObject(DroneController);
Index: code/trunk/src/orxonox/controllers/DroneController.h
===================================================================
--- code/trunk/src/orxonox/controllers/DroneController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/DroneController.h	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "AIController.h"
-#include "core/WeakPtr.h"
+#include "core/object/WeakPtr.h"
 #include "tools/interfaces/Tickable.h"
 
@@ -50,5 +50,5 @@
     {
         public:
-            DroneController(BaseObject* creator);
+            DroneController(Context* context);
             virtual ~DroneController();
 
Index: code/trunk/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/FormationController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/FormationController.cc	(revision 9667)
@@ -56,6 +56,5 @@
     SetConsoleCommand("FormationController", "formationsize",    &FormationController::formationsize);
 
-
-
+    RegisterClass(FormationController);
 
     static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;
@@ -69,5 +68,5 @@
     static const float ROTATEFACTOR_FREE = 0.8f;
 
-    FormationController::FormationController(BaseObject* creator) : Controller(creator)
+    FormationController::FormationController(Context* context) : Controller(context)
     {
         RegisterObject(FormationController);
Index: code/trunk/src/orxonox/controllers/FormationController.h
===================================================================
--- code/trunk/src/orxonox/controllers/FormationController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/FormationController.h	(revision 9667)
@@ -33,8 +33,7 @@
 
 #include <vector>
-#include "core/Super.h"
+#include "core/class/Super.h"
 
 #include "util/Math.h"
-#include "core/OrxonoxClass.h"
 #include "controllers/Controller.h"
 #include "worldentities/ControllableEntity.h"
@@ -47,5 +46,5 @@
 
       public:
-      FormationController(BaseObject* creator);
+      FormationController(Context* context);
 
       virtual ~FormationController();
Index: code/trunk/src/orxonox/controllers/HumanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/HumanController.cc	(revision 9667)
@@ -66,10 +66,10 @@
     SetConsoleCommand("HumanController", "myposition",             &HumanController::myposition    ).addShortcut();
 
-    CreateUnloadableFactory(HumanController);
+    RegisterUnloadableClass(HumanController);
 
     HumanController* HumanController::localController_s = 0;
     /*static*/ const float HumanController::BOOSTING_TIME = 0.1f;
 
-    HumanController::HumanController(BaseObject* creator) : FormationController(creator)
+    HumanController::HumanController(Context* context) : FormationController(context)
     {
         RegisterObject(HumanController);
Index: code/trunk/src/orxonox/controllers/HumanController.h
===================================================================
--- code/trunk/src/orxonox/controllers/HumanController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/HumanController.h	(revision 9667)
@@ -44,5 +44,5 @@
     { // tolua_export
         public:
-            HumanController(BaseObject* creator);
+            HumanController(Context* context);
             virtual ~HumanController();
 
Index: code/trunk/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/NewHumanController.cc	(revision 9667)
@@ -56,10 +56,10 @@
     SetConsoleCommand("NewHumanController", "unfire",     &NewHumanController::unfire    ).keybindMode(KeybindMode::OnRelease).addShortcut();
 
-    CreateUnloadableFactory(NewHumanController);
+    RegisterUnloadableClass(NewHumanController);
 
     NewHumanController* NewHumanController::localController_s = 0;
 
-    NewHumanController::NewHumanController(BaseObject* creator)
-        : HumanController(creator)
+    NewHumanController::NewHumanController(Context* context)
+        : HumanController(context)
         , crossHairOverlay_(NULL)
         , centerOverlay_(NULL)
@@ -98,5 +98,5 @@
         if (GameMode::showsGraphics())
         {
-            crossHairOverlay_ = new OrxonoxOverlay(this);
+            crossHairOverlay_ = new OrxonoxOverlay(this->getContext());
             crossHairOverlay_->setBackgroundMaterial("Orxonox/Crosshair3");
             crossHairOverlay_->setSize(Vector2(overlaySize_, overlaySize_));
@@ -104,5 +104,5 @@
             //crossHairOverlay_->setAspectCorrection(true); not working
 
-            centerOverlay_ = new OrxonoxOverlay(this);
+            centerOverlay_ = new OrxonoxOverlay(this->getContext());
             centerOverlay_->setBackgroundMaterial("Orxonox/CenterOverlay");
             centerOverlay_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
@@ -112,5 +112,5 @@
             if (showDamageOverlay_)
             {
-                damageOverlayTop_ = new OrxonoxOverlay(this);
+                damageOverlayTop_ = new OrxonoxOverlay(this->getContext());
                 damageOverlayTop_->setBackgroundMaterial("Orxonox/DamageOverlayTop");
                 damageOverlayTop_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
@@ -118,5 +118,5 @@
                 damageOverlayTop_->hide();
 
-                damageOverlayRight_ = new OrxonoxOverlay(this);
+                damageOverlayRight_ = new OrxonoxOverlay(this->getContext());
                 damageOverlayRight_->setBackgroundMaterial("Orxonox/DamageOverlayRight");
                 damageOverlayRight_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
@@ -124,5 +124,5 @@
                 damageOverlayRight_->hide();
 
-                damageOverlayBottom_ = new OrxonoxOverlay(this);
+                damageOverlayBottom_ = new OrxonoxOverlay(this->getContext());
                 damageOverlayBottom_->setBackgroundMaterial("Orxonox/DamageOverlayBottom");
                 damageOverlayBottom_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
@@ -130,5 +130,5 @@
                 damageOverlayBottom_->hide();
 
-                damageOverlayLeft_ = new OrxonoxOverlay(this);
+                damageOverlayLeft_ = new OrxonoxOverlay(this->getContext());
                 damageOverlayLeft_->setBackgroundMaterial("Orxonox/DamageOverlayLeft");
                 damageOverlayLeft_->setSize(Vector2(overlaySize_ * 2.5f, overlaySize_ * 2.5f));
@@ -139,5 +139,5 @@
             if (showArrows_)
             {
-                arrowsOverlay1_ = new OrxonoxOverlay(this);
+                arrowsOverlay1_ = new OrxonoxOverlay(this->getContext());
                 arrowsOverlay1_->setBackgroundMaterial("Orxonox/DirectionArrows1");
                 arrowsOverlay1_->setSize(Vector2(0.02727f, 0.36f * arrowsSize_));
@@ -146,5 +146,5 @@
                 arrowsOverlay1_->hide();
 
-                arrowsOverlay2_ = new OrxonoxOverlay(this);
+                arrowsOverlay2_ = new OrxonoxOverlay(this->getContext());
                 arrowsOverlay2_->setBackgroundMaterial("Orxonox/DirectionArrows2");
                 arrowsOverlay2_->setSize(Vector2(0.02727f, 0.59f * arrowsSize_));
@@ -153,5 +153,5 @@
                 arrowsOverlay2_->hide();
 
-                arrowsOverlay3_ = new OrxonoxOverlay(this);
+                arrowsOverlay3_ = new OrxonoxOverlay(this->getContext());
                 arrowsOverlay3_->setBackgroundMaterial("Orxonox/DirectionArrows3");
                 arrowsOverlay3_->setSize(Vector2(0.02727f, 0.77f * arrowsSize_));
@@ -160,5 +160,5 @@
                 arrowsOverlay3_->hide();
 
-                arrowsOverlay4_ = new OrxonoxOverlay(this);
+                arrowsOverlay4_ = new OrxonoxOverlay(this->getContext());
                 arrowsOverlay4_->setBackgroundMaterial("Orxonox/DirectionArrows4");
                 arrowsOverlay4_->setSize(Vector2(0.02727f, arrowsSize_));
Index: code/trunk/src/orxonox/controllers/NewHumanController.h
===================================================================
--- code/trunk/src/orxonox/controllers/NewHumanController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/NewHumanController.h	(revision 9667)
@@ -42,5 +42,5 @@
     {
         public:
-            NewHumanController(BaseObject* creator);
+            NewHumanController(Context* context);
             virtual ~NewHumanController();
 
Index: code/trunk/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 9667)
@@ -32,7 +32,7 @@
 namespace orxonox
 {
-    CreateFactory(ScriptController);
+    RegisterClass(ScriptController);
 
-    ScriptController::ScriptController(BaseObject* creator) : ArtificialController(creator)
+    ScriptController::ScriptController(Context* context) : ArtificialController(context)
     {
         RegisterObject(ScriptController);
Index: code/trunk/src/orxonox/controllers/ScriptController.h
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/ScriptController.h	(revision 9667)
@@ -38,5 +38,5 @@
     {
         public:
-            ScriptController(BaseObject* creator);
+            ScriptController(Context* context);
             virtual ~ScriptController() { }
 
Index: code/trunk/src/orxonox/controllers/WaypointController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/WaypointController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/WaypointController.cc	(revision 9667)
@@ -34,7 +34,7 @@
 namespace orxonox
 {
-    CreateFactory(WaypointController);
+    RegisterClass(WaypointController);
 
-    WaypointController::WaypointController(BaseObject* creator) : ArtificialController(creator)
+    WaypointController::WaypointController(Context* context) : ArtificialController(context)
     {
         RegisterObject(WaypointController);
Index: code/trunk/src/orxonox/controllers/WaypointController.h
===================================================================
--- code/trunk/src/orxonox/controllers/WaypointController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/WaypointController.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            WaypointController(BaseObject* creator);
+            WaypointController(Context* context);
             virtual ~WaypointController();
 
Index: code/trunk/src/orxonox/controllers/WaypointPatrolController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	(revision 9666)
+++ code/trunk/src/orxonox/controllers/WaypointPatrolController.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateFactory(WaypointPatrolController);
+    RegisterClass(WaypointPatrolController);
 
-    WaypointPatrolController::WaypointPatrolController(BaseObject* creator) : WaypointController(creator)
+    WaypointPatrolController::WaypointPatrolController(Context* context) : WaypointController(context)
     {
         RegisterObject(WaypointPatrolController);
Index: code/trunk/src/orxonox/controllers/WaypointPatrolController.h
===================================================================
--- code/trunk/src/orxonox/controllers/WaypointPatrolController.h	(revision 9666)
+++ code/trunk/src/orxonox/controllers/WaypointPatrolController.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            WaypointPatrolController(BaseObject* creator);
+            WaypointPatrolController(Context* context);
             virtual ~WaypointPatrolController() {}
 
Index: code/trunk/src/orxonox/gamestates/GSClient.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 9666)
+++ code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "util/Exception.h"
-#include "core/CommandLineParser.h"
+#include "core/config/CommandLineParser.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 9666)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 9667)
@@ -34,5 +34,4 @@
 #include <string>
 #include <set>
-#include "core/OrxonoxClass.h"
 #include "core/GameState.h"
 
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 9666)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 9667)
@@ -31,5 +31,5 @@
 #include <OgreSceneManager.h>
 
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/Game.h"
@@ -66,5 +66,5 @@
         : GameState(info)
     {
-        RegisterRootObject(GSMainMenu);
+        RegisterObject(GSMainMenu);
 
         InputManager::getInstance().createInputState("MainMenuHackery", true, true)->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 9666)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 9667)
@@ -34,9 +34,9 @@
 #include "util/OgreForwardRefs.h"
 #include "core/GameState.h"
-#include "core/OrxonoxClass.h"
+#include "core/config/Configurable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GSMainMenu : public GameState, public OrxonoxClass
+    class _OrxonoxExport GSMainMenu : public GameState, public Configurable
     {
     public:
Index: code/trunk/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 9666)
+++ code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "util/Output.h"
-#include "core/CommandLineParser.h"
+#include "core/config/CommandLineParser.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
Index: code/trunk/src/orxonox/gametypes/Asteroids.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Asteroids.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Asteroids.cc	(revision 9667)
@@ -35,7 +35,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Asteroids);
+    RegisterUnloadableClass(Asteroids);
 
-    Asteroids::Asteroids(BaseObject* creator) : Gametype(creator)
+    Asteroids::Asteroids(Context* context) : Gametype(context)
     {
         RegisterObject(Asteroids);
Index: code/trunk/src/orxonox/gametypes/Asteroids.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Asteroids.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Asteroids.h	(revision 9667)
@@ -38,5 +38,5 @@
     {
         public:
-            Asteroids(BaseObject* creator);
+            Asteroids(Context* context);
             virtual ~Asteroids() {}
 
Index: code/trunk/src/orxonox/gametypes/Deathmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Deathmatch.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Deathmatch.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Deathmatch);
+    RegisterUnloadableClass(Deathmatch);
 
-    Deathmatch::Deathmatch(BaseObject* creator) : Gametype(creator)
+    Deathmatch::Deathmatch(Context* context) : Gametype(context)
     {
         RegisterObject(Deathmatch);
Index: code/trunk/src/orxonox/gametypes/Deathmatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Deathmatch.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Deathmatch.h	(revision 9667)
@@ -38,5 +38,5 @@
     {
         public:
-            Deathmatch(BaseObject* creator);
+            Deathmatch(Context* context);
             virtual ~Deathmatch() {}
 
Index: code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	(revision 9667)
@@ -54,5 +54,5 @@
 #include "worldentities/pawns/Pawn.h"
 #include "worldentities/pawns/SpaceShip.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "interfaces/TeamColourable.h"
 #include "items/Engine.h"
@@ -62,7 +62,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Dynamicmatch);
-
-    Dynamicmatch::Dynamicmatch(BaseObject* creator) : Gametype(creator)
+    RegisterUnloadableClass(Dynamicmatch);
+
+    Dynamicmatch::Dynamicmatch(Context* context) : Gametype(context)
     {
         RegisterObject(Dynamicmatch);
Index: code/trunk/src/orxonox/gametypes/Dynamicmatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Dynamicmatch.h	(revision 9667)
@@ -44,5 +44,5 @@
     {
         public:
-            Dynamicmatch(BaseObject* creator);
+            Dynamicmatch(Context* context);
             virtual ~Dynamicmatch() {}
 
Index: code/trunk/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Gametype.cc	(revision 9667)
@@ -32,5 +32,5 @@
 #include "core/Core.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/command/ConsoleCommand.h"
@@ -47,11 +47,11 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Gametype);
-
-    Gametype::Gametype(BaseObject* creator) : BaseObject(creator)
+    RegisterUnloadableClass(Gametype);
+
+    Gametype::Gametype(Context* context) : BaseObject(context)
     {
         RegisterObject(Gametype);
 
-        this->gtinfo_ = new GametypeInfo(creator);
+        this->gtinfo_ = new GametypeInfo(context);
 
         this->setGametype(SmartPtr<Gametype>(this, false));
@@ -74,5 +74,5 @@
         if (GameMode::showsGraphics() && !this->scoreboardTemplate_.empty())
         {
-            this->scoreboard_ = new OverlayGroup(this);
+            this->scoreboard_ = new OverlayGroup(context);
             this->scoreboard_->addTemplate(this->scoreboardTemplate_);
             this->scoreboard_->setGametype(this);
@@ -160,5 +160,5 @@
                 ControllableEntity* oldentity = it->first->getControllableEntity();
 
-                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity);
+                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity->getContext());
                 if (oldentity->getCamera())
                 {
@@ -283,5 +283,5 @@
                     this->gtinfo_->pawnKilled(victim->getPlayer());
 
-                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getCreator());
+                ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getContext());
                 if (victim->getCamera())
                 {
@@ -458,5 +458,5 @@
         {
             // force spawn at spawnpoint with default pawn
-            ControllableEntity* entity = this->defaultControllableEntity_.fabricate(spawn);
+            ControllableEntity* entity = this->defaultControllableEntity_.fabricate(spawn->getContext());
             spawn->spawn(entity);
             player->startControl(entity);
@@ -472,5 +472,5 @@
     {
         for (unsigned int i = 0; i < amount; ++i)
-            this->botclass_.fabricate(this);
+            this->botclass_.fabricate(this->getContext());
     }
 
Index: code/trunk/src/orxonox/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Gametype.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Gametype.h	(revision 9667)
@@ -37,5 +37,5 @@
 
 #include "core/BaseObject.h"
-#include "core/SubclassIdentifier.h"
+#include "core/class/SubclassIdentifier.h"
 #include "tools/interfaces/Tickable.h"
 #include "infos/GametypeInfo.h"
@@ -67,5 +67,5 @@
 
         public:
-            Gametype(BaseObject* creator);
+            Gametype(Context* context);
             virtual ~Gametype();
 
Index: code/trunk/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastManStanding.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/LastManStanding.cc	(revision 9667)
@@ -33,12 +33,12 @@
 #include "infos/PlayerInfo.h"
 #include "worldentities/pawns/Pawn.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "util/Convert.h"
 
 namespace orxonox
 {
-    CreateUnloadableFactory(LastManStanding);
-
-    LastManStanding::LastManStanding(BaseObject* creator) : Deathmatch(creator)
+    RegisterUnloadableClass(LastManStanding);
+
+    LastManStanding::LastManStanding(Context* context) : Deathmatch(context)
     {
         RegisterObject(LastManStanding);
Index: code/trunk/src/orxonox/gametypes/LastManStanding.h
===================================================================
--- code/trunk/src/orxonox/gametypes/LastManStanding.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/LastManStanding.h	(revision 9667)
@@ -65,5 +65,5 @@
 
         public:
-            LastManStanding(BaseObject* creator); //!< Default Constructor.
+            LastManStanding(Context* context); //!< Default Constructor.
             virtual ~LastManStanding() {} //!< Default Destructor.
             void setConfigValues(); //!< Makes values configurable.
Index: code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 9667)
@@ -33,12 +33,12 @@
 #include "infos/PlayerInfo.h"
 #include "worldentities/pawns/Pawn.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "util/Convert.h"
 
 namespace orxonox
 {
-    CreateUnloadableFactory(LastTeamStanding);
-
-    LastTeamStanding::LastTeamStanding(BaseObject* creator) : TeamDeathmatch(creator)
+    RegisterUnloadableClass(LastTeamStanding);
+
+    LastTeamStanding::LastTeamStanding(Context* context) : TeamDeathmatch(context)
     {
         RegisterObject(LastTeamStanding);
Index: code/trunk/src/orxonox/gametypes/LastTeamStanding.h
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.h	(revision 9667)
@@ -71,5 +71,5 @@
 
         public:
-            LastTeamStanding(BaseObject* creator); //!< Default Constructor.
+            LastTeamStanding(Context* context); //!< Default Constructor.
             virtual ~LastTeamStanding(); //!< Default Destructor.
 
Index: code/trunk/src/orxonox/gametypes/Mission.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Mission.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Mission.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(Mission);
+    RegisterUnloadableClass(Mission);
 
-    Mission::Mission(BaseObject* creator) : TeamGametype(creator)
+    Mission::Mission(Context* context) : TeamGametype(context)
     {
         RegisterObject(Mission);
Index: code/trunk/src/orxonox/gametypes/Mission.h
===================================================================
--- code/trunk/src/orxonox/gametypes/Mission.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/Mission.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            Mission(BaseObject* creator);
+            Mission(Context* context);
             virtual ~Mission() {}
 
Index: code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(TeamBaseMatch);
-
-    TeamBaseMatch::TeamBaseMatch(BaseObject* creator) : TeamDeathmatch(creator)
+    RegisterUnloadableClass(TeamBaseMatch);
+
+    TeamBaseMatch::TeamBaseMatch(Context* context) : TeamDeathmatch(context)
     {
         RegisterObject(TeamBaseMatch);
Index: code/trunk/src/orxonox/gametypes/TeamBaseMatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamBaseMatch.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamBaseMatch.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            TeamBaseMatch(BaseObject* creator);
+            TeamBaseMatch(Context* context);
             virtual ~TeamBaseMatch() {}
 
Index: code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(TeamDeathmatch);
+    RegisterUnloadableClass(TeamDeathmatch);
 
-    TeamDeathmatch::TeamDeathmatch(BaseObject* creator) : TeamGametype(creator)
+    TeamDeathmatch::TeamDeathmatch(Context* context) : TeamGametype(context)
     {
         RegisterObject(TeamDeathmatch);
Index: code/trunk/src/orxonox/gametypes/TeamDeathmatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamDeathmatch.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamDeathmatch.h	(revision 9667)
@@ -38,5 +38,5 @@
     {
         public:
-            TeamDeathmatch(BaseObject* creator);
+            TeamDeathmatch(Context* context);
             virtual ~TeamDeathmatch() {}
 
Index: code/trunk/src/orxonox/gametypes/TeamGametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamGametype.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamGametype.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "infos/PlayerInfo.h"
 #include "interfaces/TeamColourable.h"
@@ -40,7 +40,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(TeamGametype);
-
-    TeamGametype::TeamGametype(BaseObject* creator) : Gametype(creator)
+    RegisterUnloadableClass(TeamGametype);
+
+    TeamGametype::TeamGametype(Context* context) : Gametype(context)
     {
         RegisterObject(TeamGametype);
Index: code/trunk/src/orxonox/gametypes/TeamGametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamGametype.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/TeamGametype.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            TeamGametype(BaseObject* creator);
+            TeamGametype(Context* context);
             virtual ~TeamGametype() {}
 
Index: code/trunk/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/UnderAttack.cc	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/UnderAttack.cc	(revision 9667)
@@ -31,5 +31,5 @@
 #include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "chat/ChatManager.h"
 #include "worldentities/pawns/Destroyer.h"
@@ -38,7 +38,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(UnderAttack);
+    RegisterUnloadableClass(UnderAttack);
 
-    UnderAttack::UnderAttack(BaseObject* creator) : TeamDeathmatch(creator)
+    UnderAttack::UnderAttack(Context* context) : TeamDeathmatch(context)
     {
         RegisterObject(UnderAttack);
Index: code/trunk/src/orxonox/gametypes/UnderAttack.h
===================================================================
--- code/trunk/src/orxonox/gametypes/UnderAttack.h	(revision 9666)
+++ code/trunk/src/orxonox/gametypes/UnderAttack.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            UnderAttack(BaseObject* creator);
+            UnderAttack(Context* context);
             virtual ~UnderAttack() {}
 
Index: code/trunk/src/orxonox/graphics/AnimatedModel.cc
===================================================================
--- code/trunk/src/orxonox/graphics/AnimatedModel.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/AnimatedModel.cc	(revision 9667)
@@ -39,7 +39,7 @@
 namespace orxonox
 {
-    CreateFactory(AnimatedModel);
+    RegisterClass(AnimatedModel);
 
-    AnimatedModel::AnimatedModel(BaseObject* creator) : Model(creator)
+    AnimatedModel::AnimatedModel(Context* context) : Model(context)
     {
         RegisterObject(AnimatedModel);
Index: code/trunk/src/orxonox/graphics/AnimatedModel.h
===================================================================
--- code/trunk/src/orxonox/graphics/AnimatedModel.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/AnimatedModel.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            AnimatedModel(BaseObject* creator);
+            AnimatedModel(Context* context);
             virtual ~AnimatedModel();
 
Index: code/trunk/src/orxonox/graphics/Backlight.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Backlight.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Backlight.cc	(revision 9667)
@@ -45,7 +45,7 @@
 namespace orxonox
 {
-    CreateFactory(Backlight);
-
-    Backlight::Backlight(BaseObject* creator) : FadingBillboard(creator)
+    RegisterClass(Backlight);
+
+    Backlight::Backlight(Context* context) : FadingBillboard(context)
     {
         RegisterObject(Backlight);
Index: code/trunk/src/orxonox/graphics/Backlight.h
===================================================================
--- code/trunk/src/orxonox/graphics/Backlight.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Backlight.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            Backlight(BaseObject* creator);
+            Backlight(Context* context);
             virtual ~Backlight();
 
Index: code/trunk/src/orxonox/graphics/Billboard.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Billboard.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Billboard.cc	(revision 9667)
@@ -38,7 +38,7 @@
 namespace orxonox
 {
-    CreateFactory(Billboard);
+    RegisterClass(Billboard);
 
-    Billboard::Billboard(BaseObject* creator) : StaticEntity(creator)
+    Billboard::Billboard(Context* context) : StaticEntity(context)
     {
         RegisterObject(Billboard);
Index: code/trunk/src/orxonox/graphics/Billboard.h
===================================================================
--- code/trunk/src/orxonox/graphics/Billboard.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Billboard.h	(revision 9667)
@@ -44,5 +44,5 @@
     {
         public:
-            Billboard(BaseObject* creator);
+            Billboard(Context* context);
             virtual ~Billboard();
 
Index: code/trunk/src/orxonox/graphics/BlinkingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/graphics/BlinkingBillboard.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/BlinkingBillboard.cc	(revision 9667)
@@ -35,7 +35,7 @@
 namespace orxonox
 {
-    CreateFactory(BlinkingBillboard);
+    RegisterClass(BlinkingBillboard);
 
-    BlinkingBillboard::BlinkingBillboard(BaseObject* creator) : Billboard(creator)
+    BlinkingBillboard::BlinkingBillboard(Context* context) : Billboard(context)
     {
         RegisterObject(BlinkingBillboard);
Index: code/trunk/src/orxonox/graphics/BlinkingBillboard.h
===================================================================
--- code/trunk/src/orxonox/graphics/BlinkingBillboard.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/BlinkingBillboard.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            BlinkingBillboard(BaseObject* creator);
+            BlinkingBillboard(Context* context);
             virtual ~BlinkingBillboard();
 
Index: code/trunk/src/orxonox/graphics/Camera.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Camera.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Camera.cc	(revision 9667)
@@ -37,5 +37,5 @@
 #include "util/StringUtils.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/GUIManager.h"
@@ -46,7 +46,7 @@
 namespace orxonox
 {
-    CreateFactory(Camera);
-
-    Camera::Camera(BaseObject* creator) : StaticEntity(creator)
+    RegisterClass(Camera);
+
+    Camera::Camera(Context* context) : StaticEntity(context)
     {
         RegisterObject(Camera);
Index: code/trunk/src/orxonox/graphics/Camera.h
===================================================================
--- code/trunk/src/orxonox/graphics/Camera.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Camera.h	(revision 9667)
@@ -46,5 +46,5 @@
 
         public:
-            Camera(BaseObject* creator);
+            Camera(Context* context);
             virtual ~Camera();
 
Index: code/trunk/src/orxonox/graphics/FadingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/graphics/FadingBillboard.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/FadingBillboard.cc	(revision 9667)
@@ -34,7 +34,7 @@
 namespace orxonox
 {
-    CreateFactory(FadingBillboard);
+    RegisterClass(FadingBillboard);
 
-    FadingBillboard::FadingBillboard(BaseObject* creator) : Billboard(creator)
+    FadingBillboard::FadingBillboard(Context* context) : Billboard(context)
     {
         RegisterObject(FadingBillboard);
Index: code/trunk/src/orxonox/graphics/FadingBillboard.h
===================================================================
--- code/trunk/src/orxonox/graphics/FadingBillboard.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/FadingBillboard.h	(revision 9667)
@@ -42,5 +42,5 @@
     {
         public:
-            FadingBillboard(BaseObject* creator);
+            FadingBillboard(Context* context);
             virtual ~FadingBillboard();
 
Index: code/trunk/src/orxonox/graphics/GlobalShader.cc
===================================================================
--- code/trunk/src/orxonox/graphics/GlobalShader.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/GlobalShader.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateFactory(GlobalShader);
+    RegisterClass(GlobalShader);
 
-    GlobalShader::GlobalShader(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    GlobalShader::GlobalShader(Context* context) : BaseObject(context), Synchronisable(context)
     {
         RegisterObject(GlobalShader);
Index: code/trunk/src/orxonox/graphics/GlobalShader.h
===================================================================
--- code/trunk/src/orxonox/graphics/GlobalShader.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/GlobalShader.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            GlobalShader(BaseObject* creator);
+            GlobalShader(Context* context);
             virtual ~GlobalShader();
 
Index: code/trunk/src/orxonox/graphics/Light.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Light.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Light.cc	(revision 9667)
@@ -42,5 +42,5 @@
 namespace orxonox
 {
-    CreateFactory(Light);
+    RegisterClass(Light);
 
     // Be sure we don't do bad conversions
@@ -49,5 +49,5 @@
     BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight);
 
-    Light::Light(BaseObject* creator) : StaticEntity(creator)
+    Light::Light(Context* context) : StaticEntity(context)
     {
         RegisterObject(Light);
Index: code/trunk/src/orxonox/graphics/Light.h
===================================================================
--- code/trunk/src/orxonox/graphics/Light.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Light.h	(revision 9667)
@@ -53,5 +53,5 @@
 
         public:
-            Light(BaseObject* creator);
+            Light(Context* context);
             virtual ~Light();
 
Index: code/trunk/src/orxonox/graphics/MeshLodInformation.cc
===================================================================
--- code/trunk/src/orxonox/graphics/MeshLodInformation.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/MeshLodInformation.cc	(revision 9667)
@@ -38,8 +38,8 @@
 namespace orxonox
 {
-    CreateFactory(MeshLodInformation);
+    RegisterClass(MeshLodInformation);
 
-    MeshLodInformation::MeshLodInformation(BaseObject* creator)
-    : BaseObject(creator), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15f)
+    MeshLodInformation::MeshLodInformation(Context* context)
+    : BaseObject(context), lodLevel_(5), bEnabled_(true), numLevels_(10), reductionRate_(0.15f)
     {
         RegisterObject(MeshLodInformation);
Index: code/trunk/src/orxonox/graphics/MeshLodInformation.h
===================================================================
--- code/trunk/src/orxonox/graphics/MeshLodInformation.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/MeshLodInformation.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            MeshLodInformation(BaseObject* creator);
+            MeshLodInformation(Context* context);
             virtual ~MeshLodInformation();
 
Index: code/trunk/src/orxonox/graphics/Model.cc
===================================================================
--- code/trunk/src/orxonox/graphics/Model.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Model.cc	(revision 9667)
@@ -32,5 +32,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
@@ -41,8 +41,8 @@
 namespace orxonox
 {
-    CreateFactory(Model);
-
-    Model::Model(BaseObject* creator) :
-        StaticEntity(creator), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15f)
+    RegisterClass(Model);
+
+    Model::Model(Context* context) :
+        StaticEntity(context), bCastShadows_(true), lodLevel_(5), bLodEnabled_(true), numLodLevels_(10), lodReductionRate_(.15f)
     {
         RegisterObject(Model);
Index: code/trunk/src/orxonox/graphics/Model.h
===================================================================
--- code/trunk/src/orxonox/graphics/Model.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/Model.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            Model(BaseObject* creator);
+            Model(Context* context);
             virtual ~Model();
 
Index: code/trunk/src/orxonox/graphics/ParticleEmitter.cc
===================================================================
--- code/trunk/src/orxonox/graphics/ParticleEmitter.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/ParticleEmitter.cc	(revision 9667)
@@ -43,7 +43,7 @@
 namespace orxonox
 {
-    CreateFactory(ParticleEmitter);
+    RegisterClass(ParticleEmitter);
 
-    ParticleEmitter::ParticleEmitter(BaseObject* creator) : StaticEntity(creator)
+    ParticleEmitter::ParticleEmitter(Context* context) : StaticEntity(context)
     {
         RegisterObject(ParticleEmitter);
@@ -63,5 +63,5 @@
         {
             this->detachOgreObject(this->particles_->getParticleSystem());
-            this->particles_->destroy();
+            delete this->particles_;
         }
     }
@@ -101,5 +101,5 @@
         if (this->particles_)
         {
-            this->particles_->destroy();
+            delete this->particles_;
             this->particles_ = 0;
         }
Index: code/trunk/src/orxonox/graphics/ParticleEmitter.h
===================================================================
--- code/trunk/src/orxonox/graphics/ParticleEmitter.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/ParticleEmitter.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            ParticleEmitter(BaseObject* creator);
+            ParticleEmitter(Context* context);
             virtual ~ParticleEmitter();
 
Index: code/trunk/src/orxonox/graphics/ParticleSpawner.cc
===================================================================
--- code/trunk/src/orxonox/graphics/ParticleSpawner.cc	(revision 9666)
+++ code/trunk/src/orxonox/graphics/ParticleSpawner.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(ParticleSpawner);
+    RegisterClass(ParticleSpawner);
 
-    ParticleSpawner::ParticleSpawner(BaseObject* creator) : ParticleEmitter(creator)
+    ParticleSpawner::ParticleSpawner(Context* context) : ParticleEmitter(context)
     {
         RegisterObject(ParticleSpawner);
Index: code/trunk/src/orxonox/graphics/ParticleSpawner.h
===================================================================
--- code/trunk/src/orxonox/graphics/ParticleSpawner.h	(revision 9666)
+++ code/trunk/src/orxonox/graphics/ParticleSpawner.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            ParticleSpawner(BaseObject* creator);
+            ParticleSpawner(Context* context);
             virtual ~ParticleSpawner();
 
Index: code/trunk/src/orxonox/infos/Bot.cc
===================================================================
--- code/trunk/src/orxonox/infos/Bot.cc	(revision 9666)
+++ code/trunk/src/orxonox/infos/Bot.cc	(revision 9667)
@@ -32,5 +32,5 @@
 #include "core/GameMode.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "gametypes/Gametype.h"
 #include "controllers/AIController.h"
@@ -38,7 +38,7 @@
 namespace orxonox
 {
-    CreateFactory(Bot);
+    RegisterClass(Bot);
 
-    Bot::Bot(BaseObject* creator) : PlayerInfo(creator)
+    Bot::Bot(Context* context) : PlayerInfo(context)
     {
         RegisterObject(Bot);
Index: code/trunk/src/orxonox/infos/Bot.h
===================================================================
--- code/trunk/src/orxonox/infos/Bot.h	(revision 9666)
+++ code/trunk/src/orxonox/infos/Bot.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            Bot(BaseObject* creator);
+            Bot(Context* context);
             virtual ~Bot();
 
Index: code/trunk/src/orxonox/infos/GametypeInfo.cc
===================================================================
--- code/trunk/src/orxonox/infos/GametypeInfo.cc	(revision 9666)
+++ code/trunk/src/orxonox/infos/GametypeInfo.cc	(revision 9667)
@@ -48,5 +48,5 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(GametypeInfo);
+    RegisterUnloadableClass(GametypeInfo);
 
     registerMemberNetworkFunction(GametypeInfo, dispatchAnnounceMessage);
@@ -65,5 +65,5 @@
         Registers and initializes the object.
     */
-    GametypeInfo::GametypeInfo(BaseObject* creator) : Info(creator)
+    GametypeInfo::GametypeInfo(Context* context) : Info(context)
     {
         RegisterObject(GametypeInfo);
Index: code/trunk/src/orxonox/infos/GametypeInfo.h
===================================================================
--- code/trunk/src/orxonox/infos/GametypeInfo.h	(revision 9666)
+++ code/trunk/src/orxonox/infos/GametypeInfo.h	(revision 9667)
@@ -58,5 +58,5 @@
 
         public:
-            GametypeInfo(BaseObject* creator);
+            GametypeInfo(Context* context);
             virtual ~GametypeInfo();
 
Index: code/trunk/src/orxonox/infos/HumanPlayer.cc
===================================================================
--- code/trunk/src/orxonox/infos/HumanPlayer.cc	(revision 9666)
+++ code/trunk/src/orxonox/infos/HumanPlayer.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 // #include "network/ClientInformation.h"
@@ -41,7 +41,7 @@
 namespace orxonox
 {
-    CreateUnloadableFactory(HumanPlayer);
-
-    HumanPlayer::HumanPlayer(BaseObject* creator) : PlayerInfo(creator)
+    RegisterUnloadableClass(HumanPlayer);
+
+    HumanPlayer::HumanPlayer(Context* context) : PlayerInfo(context)
     {
         RegisterObject(HumanPlayer);
@@ -183,5 +183,5 @@
         if (this->isLocalPlayer() && !this->humanHudTemplate_.empty() && GameMode::showsGraphics())
         {
-            this->humanHud_ = new OverlayGroup(this);
+            this->humanHud_ = new OverlayGroup(this->getContext());
             this->humanHud_->addTemplate(this->humanHudTemplate_);
             this->humanHud_->setOwner(this);
@@ -199,5 +199,5 @@
         if (this->isLocalPlayer() && !this->gametypeHudTemplate_.empty())
         {
-            this->gametypeHud_ = new OverlayGroup(this);
+            this->gametypeHud_ = new OverlayGroup(this->getContext());
             this->gametypeHud_->addTemplate(this->gametypeHudTemplate_);
             this->gametypeHud_->setOwner(this);
Index: code/trunk/src/orxonox/infos/HumanPlayer.h
===================================================================
--- code/trunk/src/orxonox/infos/HumanPlayer.h	(revision 9666)
+++ code/trunk/src/orxonox/infos/HumanPlayer.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            HumanPlayer(BaseObject* creator);
+            HumanPlayer(Context* context);
             virtual ~HumanPlayer();
 
Index: code/trunk/src/orxonox/infos/Info.cc
===================================================================
--- code/trunk/src/orxonox/infos/Info.cc	(revision 9666)
+++ code/trunk/src/orxonox/infos/Info.cc	(revision 9667)
@@ -32,5 +32,7 @@
 namespace orxonox
 {
-    Info::Info(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    RegisterClass(Info);
+
+    Info::Info(Context* context) : BaseObject(context), Synchronisable(context)
     {
         RegisterObject(Info);
Index: code/trunk/src/orxonox/infos/Info.h
===================================================================
--- code/trunk/src/orxonox/infos/Info.h	(revision 9666)
+++ code/trunk/src/orxonox/infos/Info.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            Info(BaseObject* creator);
+            Info(Context* context);
             virtual ~Info() {}
     };
Index: code/trunk/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 9666)
+++ code/trunk/src/orxonox/infos/PlayerInfo.cc	(revision 9667)
@@ -40,5 +40,7 @@
 namespace orxonox
 {
-    PlayerInfo::PlayerInfo(BaseObject* creator) : Info(creator)
+    RegisterAbstractClass(PlayerInfo).inheritsFrom(Class(Info));
+
+    PlayerInfo::PlayerInfo(Context* context) : Info(context)
     {
         RegisterObject(PlayerInfo);
@@ -136,5 +138,5 @@
             this->controller_ = 0;
         }
-        this->controller_ = this->defaultController_.fabricate(this);
+        this->controller_ = this->defaultController_.fabricate(this->getContext());
         assert(this->controller_);
         this->controller_->setPlayer(this);
Index: code/trunk/src/orxonox/infos/PlayerInfo.h
===================================================================
--- code/trunk/src/orxonox/infos/PlayerInfo.h	(revision 9666)
+++ code/trunk/src/orxonox/infos/PlayerInfo.h	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "Info.h"
-#include "core/SubclassIdentifier.h"
+#include "core/class/SubclassIdentifier.h"
 
 namespace orxonox // tolua_export
@@ -41,5 +41,5 @@
     { // tolua_export
         public:
-            PlayerInfo(BaseObject* creator);
+            PlayerInfo(Context* context);
             virtual ~PlayerInfo();
 
Index: code/trunk/src/orxonox/interfaces/GametypeMessageListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/GametypeMessageListener.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/GametypeMessageListener.h	(revision 9667)
@@ -31,9 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport GametypeMessageListener : virtual public OrxonoxClass
+    class _OrxonoxExport GametypeMessageListener : virtual public OrxonoxInterface
     {
         public:
Index: code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 9667)
@@ -50,7 +50,9 @@
     // GametypeMessageListener
     //----------------------------
+    RegisterAbstractClass(GametypeMessageListener).inheritsFrom(Class(OrxonoxInterface));
+
     GametypeMessageListener::GametypeMessageListener()
     {
-        RegisterRootObject(GametypeMessageListener);
+        RegisterObject(GametypeMessageListener);
     }
 
@@ -58,7 +60,9 @@
     // PlayerTrigger
     //----------------------------
+    RegisterAbstractClass(PlayerTrigger).inheritsFrom(Class(OrxonoxInterface));
+
     PlayerTrigger::PlayerTrigger()
     {
-        RegisterRootObject(PlayerTrigger);
+        RegisterObject(PlayerTrigger);
 
         this->isForPlayer_ = false;
@@ -76,7 +80,9 @@
     // RadarListener
     //----------------------------
+    RegisterAbstractClass(RadarListener).inheritsFrom(Class(OrxonoxInterface));
+
     RadarListener::RadarListener()
     {
-        RegisterRootObject(RadarListener);
+        RegisterObject(RadarListener);
     }
 
@@ -84,7 +90,9 @@
     // TeamColourable
     //----------------------------
+    RegisterAbstractClass(TeamColourable).inheritsFrom(Class(OrxonoxInterface));
+
     TeamColourable::TeamColourable()
     {
-        RegisterRootObject(TeamColourable);
+        RegisterObject(TeamColourable);
     }
 
@@ -92,7 +100,9 @@
     // Rewardable
     //----------------------------
+    RegisterAbstractClass(Rewardable).inheritsFrom(Class(OrxonoxInterface));
+
     Rewardable::Rewardable()
     {
-        RegisterRootObject(Rewardable);
+        RegisterObject(Rewardable);
     }
 }
Index: code/trunk/src/orxonox/interfaces/NotificationListener.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/NotificationListener.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/NotificationListener.cc	(revision 9667)
@@ -53,5 +53,5 @@
     NotificationListener::NotificationListener()
     {
-        RegisterRootObject(NotificationListener);
+        RegisterObject(NotificationListener);
     }
 
Index: code/trunk/src/orxonox/interfaces/NotificationListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/NotificationListener.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/NotificationListener.h	(revision 9667)
@@ -44,5 +44,5 @@
 #include "util/StringUtils.h"
 
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
@@ -90,5 +90,5 @@
     @todo Consistent terminology between message, notification and command.
     */
-    class _OrxonoxExport NotificationListener : virtual public OrxonoxClass
+    class _OrxonoxExport NotificationListener : virtual public OrxonoxInterface
     {
         public:
Index: code/trunk/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.cc	(revision 9667)
@@ -35,9 +35,11 @@
 
 #include "core/CoreIncludes.h"
-#include "core/Identifier.h"
+#include "core/class/Identifier.h"
 
 #include "Pickupable.h"
 
-namespace orxonox {
+namespace orxonox
+{
+    RegisterAbstractClass(PickupCarrier).inheritsFrom(Class(OrxonoxInterface));
 
     /**
@@ -47,5 +49,5 @@
     PickupCarrier::PickupCarrier()
     {
-        RegisterRootObject(PickupCarrier);
+        RegisterObject(PickupCarrier);
     }
 
Index: code/trunk/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.h	(revision 9667)
@@ -41,5 +41,5 @@
 #include <vector>
 
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
@@ -66,5 +66,5 @@
     @ingroup Pickup
     */
-    class _OrxonoxExport PickupCarrier : virtual public OrxonoxClass
+    class _OrxonoxExport PickupCarrier : virtual public OrxonoxInterface
     {
         // So that the different Pickupables have full access to their PickupCarrier.
Index: code/trunk/src/orxonox/interfaces/PickupListener.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupListener.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/PickupListener.cc	(revision 9667)
@@ -47,5 +47,5 @@
     PickupListener::PickupListener()
     {
-        RegisterRootObject(PickupListener);
+        RegisterObject(PickupListener);
     }
 
Index: code/trunk/src/orxonox/interfaces/PickupListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupListener.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/PickupListener.h	(revision 9667)
@@ -39,5 +39,5 @@
 #include "Pickupable.h"
 
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
@@ -55,5 +55,5 @@
     @ingroup Pickup
     */
-    class _OrxonoxExport PickupListener : virtual public OrxonoxClass
+    class _OrxonoxExport PickupListener : virtual public OrxonoxInterface
     {
         public:
Index: code/trunk/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/Pickupable.cc	(revision 9667)
@@ -34,5 +34,5 @@
 #include "Pickupable.h"
 
-#include "core/Identifier.h"
+#include "core/class/Identifier.h"
 #include "core/CoreIncludes.h"
 #include "util/Convert.h"
@@ -46,4 +46,5 @@
 namespace orxonox
 {
+    RegisterAbstractClass(Pickupable).inheritsFrom(Class(OrxonoxInterface)).inheritsFrom(Class(Rewardable));
 
     /**
@@ -53,5 +54,5 @@
     Pickupable::Pickupable() : used_(false), pickedUp_(false)
     {
-        RegisterRootObject(Pickupable);
+        RegisterObject(Pickupable);
 
         this->carrier_ = NULL;
@@ -71,5 +72,5 @@
     /**
     @brief
-        A method that is called by OrxonoxClass::destroy() before the object is actually destroyed.
+        A method that is called by Destroyable::destroy() before the object is actually destroyed.
     */
     void Pickupable::preDestroy(void)
@@ -98,5 +99,5 @@
     {
         if(!this->isBeingDestroyed())
-            this->OrxonoxClass::destroy();
+            this->Destroyable::destroy();
         else
             orxout(internal_warning, context::pickups) << this->getIdentifier()->getName() << " may be unsafe. " << endl;
Index: code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/Pickupable.h	(revision 9667)
@@ -39,7 +39,7 @@
 
 #include <list>
-#include "core/Super.h"
+#include "core/class/Super.h"
 
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 #include "Rewardable.h"
 
@@ -58,5 +58,5 @@
     @ingroup Pickup
     */
-    class _OrxonoxExport Pickupable : virtual public OrxonoxClass, public Rewardable
+    class _OrxonoxExport Pickupable : virtual public OrxonoxInterface, public Rewardable
     {
         friend class PickupCarrier;
@@ -144,5 +144,5 @@
 
         protected:
-            virtual void preDestroy(void); //!< A method that is called by OrxonoxClass::destroy() before the object is actually destroyed.
+            virtual void preDestroy(void); //!< A method that is called by Destroyable::destroy() before the object is actually destroyed.
             virtual void destroyPickup(void); //!< Destroys a Pickupable.
             virtual void carrierDestroyed(void); //!< Is called by the PickupCarrier when it is being destroyed.
Index: code/trunk/src/orxonox/interfaces/PlayerTrigger.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PlayerTrigger.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/PlayerTrigger.h	(revision 9667)
@@ -38,6 +38,6 @@
 #include "OrxonoxPrereqs.h"
 
-#include "core/OrxonoxClass.h"
-#include "core/WeakPtr.h"
+#include "core/class/OrxonoxInterface.h"
+#include "core/object/WeakPtr.h"
 
 namespace orxonox
@@ -52,5 +52,5 @@
     @ingroup Triggers
     */
-    class _OrxonoxExport PlayerTrigger : virtual public OrxonoxClass
+    class _OrxonoxExport PlayerTrigger : virtual public OrxonoxInterface
     {
     public:
Index: code/trunk/src/orxonox/interfaces/RadarListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarListener.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/RadarListener.h	(revision 9667)
@@ -31,9 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport RadarListener : virtual public OrxonoxClass
+    class _OrxonoxExport RadarListener : virtual public OrxonoxInterface
     {
     public:
Index: code/trunk/src/orxonox/interfaces/RadarViewable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarViewable.cc	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/RadarViewable.cc	(revision 9667)
@@ -38,4 +38,6 @@
 namespace orxonox
 {
+    RegisterAbstractClass(RadarViewable).inheritsFrom(Class(OrxonoxInterface));
+
     /**
         @brief Constructor.
@@ -45,5 +47,4 @@
         , bVisibility_(true)
         , bInitialized_(false)
-        , creator_(creator)
         , wePtr_(wePtr)
         , radarObjectCamouflage_(0.0f)
@@ -52,10 +53,10 @@
         , scale_(1.0f)
     {
-        RegisterRootObject(RadarViewable);
+        RegisterObject(RadarViewable);
 
         this->uniqueId_=getUniqueNumberString();
         if( GameMode::showsGraphics() )
         {
-            this->radar_ = this->creator_->getScene()->getRadar();
+            this->radar_ = creator->getScene()->getRadar();
             this->radar_->addRadarObject(this);
         }
Index: code/trunk/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 9667)
@@ -36,6 +36,6 @@
 
 #include "util/Math.h"
-#include "core/OrxonoxClass.h"
-#include "core/SmartPtr.h"
+#include "core/class/OrxonoxInterface.h"
+#include "core/object/SmartPtr.h"
 
 namespace orxonox
@@ -46,5 +46,5 @@
     @brief Interface for receiving window events.
     */
-    class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
+    class _OrxonoxExport RadarViewable : virtual public OrxonoxInterface
     {
     public:
@@ -153,5 +153,4 @@
         //Map
         std::string uniqueId_;
-        BaseObject* creator_;
 
 
Index: code/trunk/src/orxonox/interfaces/Rewardable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Rewardable.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/Rewardable.h	(revision 9667)
@@ -36,5 +36,5 @@
 
 #include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
@@ -48,5 +48,5 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport Rewardable : virtual public OrxonoxClass
+    class _OrxonoxExport Rewardable : virtual public OrxonoxInterface
     {
         public:
Index: code/trunk/src/orxonox/interfaces/TeamColourable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/TeamColourable.h	(revision 9666)
+++ code/trunk/src/orxonox/interfaces/TeamColourable.h	(revision 9667)
@@ -33,9 +33,9 @@
 
 #include "util/UtilPrereqs.h"
-#include "core/OrxonoxClass.h"
+#include "core/class/OrxonoxInterface.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport TeamColourable : virtual public OrxonoxClass
+    class _OrxonoxExport TeamColourable : virtual public OrxonoxInterface
     {
         public:
Index: code/trunk/src/orxonox/items/Engine.cc
===================================================================
--- code/trunk/src/orxonox/items/Engine.cc	(revision 9666)
+++ code/trunk/src/orxonox/items/Engine.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/Template.h"
 #include "core/XMLPort.h"
@@ -40,5 +40,5 @@
 namespace orxonox
 {
-    CreateFactory(Engine);
+    RegisterClass(Engine);
 
     /**
@@ -46,5 +46,5 @@
         Constructor. Registers and initializes the object.
     */
-    Engine::Engine(BaseObject* creator) : Item(creator)
+    Engine::Engine(Context* context) : Item(context)
     {
         RegisterObject(Engine);
Index: code/trunk/src/orxonox/items/Engine.h
===================================================================
--- code/trunk/src/orxonox/items/Engine.h	(revision 9666)
+++ code/trunk/src/orxonox/items/Engine.h	(revision 9667)
@@ -56,5 +56,5 @@
     {
         public:
-            Engine(BaseObject* creator);
+            Engine(Context* context);
             virtual ~Engine();
 
Index: code/trunk/src/orxonox/items/Item.cc
===================================================================
--- code/trunk/src/orxonox/items/Item.cc	(revision 9666)
+++ code/trunk/src/orxonox/items/Item.cc	(revision 9667)
@@ -32,5 +32,7 @@
 namespace orxonox
 {
-    Item::Item(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    RegisterClass(Item);
+
+    Item::Item(Context* context) : BaseObject(context), Synchronisable(context)
     {
         RegisterObject(Item);
Index: code/trunk/src/orxonox/items/Item.h
===================================================================
--- code/trunk/src/orxonox/items/Item.h	(revision 9666)
+++ code/trunk/src/orxonox/items/Item.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            Item(BaseObject* creator);
+            Item(Context* context);
             virtual ~Item() {}
     };
Index: code/trunk/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/trunk/src/orxonox/items/MultiStateEngine.cc	(revision 9666)
+++ code/trunk/src/orxonox/items/MultiStateEngine.cc	(revision 9667)
@@ -49,7 +49,7 @@
     static const float MAX_VELOCITY_BOOST = 221;
 
-    CreateFactory(MultiStateEngine);
-
-    MultiStateEngine::MultiStateEngine(BaseObject* creator) : Engine(creator)
+    RegisterClass(MultiStateEngine);
+
+    MultiStateEngine::MultiStateEngine(Context* context) : Engine(context)
     {
         RegisterObject(MultiStateEngine);
@@ -57,6 +57,6 @@
         if (GameMode::isMaster())
         {
-            this->defEngineSndNormal_ = new WorldSound(this);
-            this->defEngineSndBoost_  = new WorldSound(this);
+            this->defEngineSndNormal_ = new WorldSound(this->getContext());
+            this->defEngineSndBoost_  = new WorldSound(this->getContext());
             this->defEngineSndNormal_->setLooping(true);
             this->defEngineSndBoost_->setLooping(true);
Index: code/trunk/src/orxonox/items/MultiStateEngine.h
===================================================================
--- code/trunk/src/orxonox/items/MultiStateEngine.h	(revision 9666)
+++ code/trunk/src/orxonox/items/MultiStateEngine.h	(revision 9667)
@@ -49,5 +49,5 @@
             };
 
-            MultiStateEngine(BaseObject* creator);
+            MultiStateEngine(Context* context);
             virtual ~MultiStateEngine();
 
Index: code/trunk/src/orxonox/overlays/GUISheet.cc
===================================================================
--- code/trunk/src/orxonox/overlays/GUISheet.cc	(revision 9666)
+++ code/trunk/src/orxonox/overlays/GUISheet.cc	(revision 9667)
@@ -36,8 +36,8 @@
 namespace orxonox
 {
-    CreateFactory(GUISheet);
+    RegisterClass(GUISheet);
 
-    GUISheet::GUISheet(BaseObject* creator)
-        : BaseObject(creator)
+    GUISheet::GUISheet(Context* context)
+        : BaseObject(context)
         , bShowOnLoad_(false)
         , bHidePrevious_(false)
Index: code/trunk/src/orxonox/overlays/GUISheet.h
===================================================================
--- code/trunk/src/orxonox/overlays/GUISheet.h	(revision 9666)
+++ code/trunk/src/orxonox/overlays/GUISheet.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
     public:
-        GUISheet(BaseObject* creator);
+        GUISheet(Context* context);
         ~GUISheet();
 
Index: code/trunk/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/trunk/src/orxonox/overlays/InGameConsole.cc	(revision 9666)
+++ code/trunk/src/orxonox/overlays/InGameConsole.cc	(revision 9667)
@@ -49,5 +49,5 @@
 #include "util/output/OutputManager.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/command/ConsoleCommand.h"
 #include "core/GUIManager.h"
@@ -110,5 +110,5 @@
 
         // destroy the underlaying shell
-        this->shell_->destroy();
+        delete this->shell_;
 
         Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 9666)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 9667)
@@ -63,6 +63,8 @@
     SetConsoleCommand("OrxonoxOverlay", "rotateOverlay",    &OrxonoxOverlay::rotateOverlay);
 
-    OrxonoxOverlay::OrxonoxOverlay(BaseObject* creator)
-        : BaseObject(creator)
+    RegisterClass(OrxonoxOverlay);
+
+    OrxonoxOverlay::OrxonoxOverlay(Context* context)
+        : BaseObject(context)
     {
         RegisterObject(OrxonoxOverlay);
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 9666)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 9667)
@@ -42,6 +42,6 @@
 #include "util/OgreForwardRefs.h"
 #include "core/BaseObject.h"
-#include "core/Super.h"
 #include "core/WindowEventListener.h"
+#include "core/class/Super.h"
 
 namespace orxonox
@@ -87,5 +87,5 @@
 
     public:
-        OrxonoxOverlay(BaseObject* creator);
+        OrxonoxOverlay(Context* context);
         virtual ~OrxonoxOverlay();
 
Index: code/trunk/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 9666)
+++ code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 9667)
@@ -41,5 +41,5 @@
 namespace orxonox
 {
-    CreateFactory(OverlayGroup);
+    RegisterClass(OverlayGroup);
 
     SetConsoleCommand("OverlayGroup", "toggleVisibility", &OverlayGroup::toggleVisibility);
@@ -48,6 +48,6 @@
     SetConsoleCommand("OverlayGroup", "scrollGroup",      &OverlayGroup::scrollGroup);
 
-    OverlayGroup::OverlayGroup(BaseObject* creator)
-        : BaseObject(creator)
+    OverlayGroup::OverlayGroup(Context* context)
+        : BaseObject(context)
     {
         RegisterObject(OverlayGroup);
@@ -148,4 +148,13 @@
         for (std::set< SmartPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
             (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
+    }
+
+    //! Changes the gametype of all elements
+    void OverlayGroup::changedGametype()
+    {
+        SUPER( OverlayGroup, changedGametype );
+
+        for (std::set< SmartPtr<OrxonoxOverlay> >::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
+            (*it)->setGametype(this->getGametype());
     }
 
Index: code/trunk/src/orxonox/overlays/OverlayGroup.h
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayGroup.h	(revision 9666)
+++ code/trunk/src/orxonox/overlays/OverlayGroup.h	(revision 9667)
@@ -54,5 +54,5 @@
     {
     public:
-        OverlayGroup(BaseObject* creator);
+        OverlayGroup(Context* context);
         //! Empty destructor.
         ~OverlayGroup();
@@ -68,5 +68,6 @@
             { return this->hudElements_; }
 
-        void changedVisibility();
+        virtual void changedVisibility();
+        virtual void changedGametype();
 
         void setOwner(BaseObject* owner);
Index: code/trunk/src/orxonox/sound/BaseSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/BaseSound.cc	(revision 9666)
+++ code/trunk/src/orxonox/sound/BaseSound.cc	(revision 9667)
@@ -43,4 +43,6 @@
 namespace orxonox
 {
+    RegisterAbstractClass(BaseSound).inheritsFrom(Class(Listable));
+
     BaseSound::BaseSound()
         : bPooling_(false)
@@ -50,5 +52,5 @@
         , pitch_ (1.0)
     {
-        RegisterRootObject(BaseSound);
+        RegisterObject(BaseSound);
 
         // Initialise audioSource_ to a value that is not a source
Index: code/trunk/src/orxonox/sound/BaseSound.h
===================================================================
--- code/trunk/src/orxonox/sound/BaseSound.h	(revision 9666)
+++ code/trunk/src/orxonox/sound/BaseSound.h	(revision 9667)
@@ -35,5 +35,5 @@
 #include <boost/shared_ptr.hpp>
 #include <OgreDataStream.h>
-#include "core/OrxonoxClass.h"
+#include "core/object/Listable.h"
 
 namespace orxonox
@@ -43,5 +43,5 @@
      * It serves as main interface to the OpenAL library.
      */
-    class _OrxonoxExport BaseSound : virtual public OrxonoxClass
+    class _OrxonoxExport BaseSound : virtual public Listable
     {
     public:
Index: code/trunk/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.cc	(revision 9666)
+++ code/trunk/src/orxonox/sound/SoundManager.cc	(revision 9667)
@@ -39,5 +39,5 @@
 #include "util/Clock.h"
 #include "util/ScopedSingletonManager.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/GameMode.h"
@@ -69,5 +69,5 @@
         : effectsPoolSize_(0)
     {
-        RegisterRootObject(SoundManager);
+        RegisterObject(SoundManager);
 
         orxout(user_status) << "Loading sound" << endl;
Index: code/trunk/src/orxonox/sound/SoundManager.h
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.h	(revision 9666)
+++ code/trunk/src/orxonox/sound/SoundManager.h	(revision 9667)
@@ -39,6 +39,6 @@
 
 #include "util/Singleton.h"
-#include "core/OrxonoxClass.h"
-#include "core/SmartPtr.h"
+#include "core/config/Configurable.h"
+#include "core/object/SmartPtr.h"
 
 // tolua_begin
@@ -59,5 +59,5 @@
     class _OrxonoxExport SoundManager
     // tolua_end
-        : public Singleton<SoundManager>, public OrxonoxClass
+        : public Singleton<SoundManager>, public Configurable
     { // tolua_export
         friend class Singleton<SoundManager>;
Index: code/trunk/src/orxonox/sound/WorldAmbientSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/WorldAmbientSound.cc	(revision 9666)
+++ code/trunk/src/orxonox/sound/WorldAmbientSound.cc	(revision 9667)
@@ -36,7 +36,7 @@
 namespace orxonox
 {
-    CreateFactory(WorldAmbientSound);
+    RegisterClass(WorldAmbientSound);
 
-    WorldAmbientSound::WorldAmbientSound(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    WorldAmbientSound::WorldAmbientSound(Context* context) : BaseObject(context), Synchronisable(context)
     {
         RegisterObject(WorldAmbientSound);
Index: code/trunk/src/orxonox/sound/WorldAmbientSound.h
===================================================================
--- code/trunk/src/orxonox/sound/WorldAmbientSound.h	(revision 9666)
+++ code/trunk/src/orxonox/sound/WorldAmbientSound.h	(revision 9667)
@@ -44,5 +44,5 @@
     {
         public:
-            WorldAmbientSound(BaseObject* creator);
+            WorldAmbientSound(Context* context);
             virtual ~WorldAmbientSound();
 
Index: code/trunk/src/orxonox/sound/WorldSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/WorldSound.cc	(revision 9666)
+++ code/trunk/src/orxonox/sound/WorldSound.cc	(revision 9667)
@@ -41,8 +41,8 @@
 namespace orxonox
 {
-    CreateFactory(WorldSound);
+    RegisterClass(WorldSound);
 
-    WorldSound::WorldSound(BaseObject* creator)
-        : StaticEntity(creator)
+    WorldSound::WorldSound(Context* context)
+        : StaticEntity(context)
     {
         RegisterObject(WorldSound);
Index: code/trunk/src/orxonox/sound/WorldSound.h
===================================================================
--- code/trunk/src/orxonox/sound/WorldSound.h	(revision 9666)
+++ code/trunk/src/orxonox/sound/WorldSound.h	(revision 9667)
@@ -45,5 +45,5 @@
     {
     public:
-        WorldSound(BaseObject* creator);
+        WorldSound(Context* context);
 
         void XMLPort(Element& xmlelement, XMLPort::Mode mode);
Index: code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.cc	(revision 9667)
@@ -35,7 +35,7 @@
 namespace orxonox
 {
-    CreateFactory(DefaultWeaponmodeLink);
+    RegisterClass(DefaultWeaponmodeLink);
 
-    DefaultWeaponmodeLink::DefaultWeaponmodeLink(BaseObject* creator) : BaseObject(creator)
+    DefaultWeaponmodeLink::DefaultWeaponmodeLink(Context* context) : BaseObject(context)
     {
         RegisterObject(DefaultWeaponmodeLink);
Index: code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/DefaultWeaponmodeLink.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            DefaultWeaponmodeLink(BaseObject* creator);
+            DefaultWeaponmodeLink(Context* context);
             virtual ~DefaultWeaponmodeLink();
 
Index: code/trunk/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 9667)
@@ -35,7 +35,7 @@
 namespace orxonox
 {
-    CreateFactory(Munition);
-
-    Munition::Munition(BaseObject* creator) : BaseObject(creator)
+    RegisterClass(Munition);
+
+    Munition::Munition(Context* context) : BaseObject(context)
     {
         RegisterObject(Munition);
Index: code/trunk/src/orxonox/weaponsystem/Munition.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Munition.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/Munition.h	(revision 9667)
@@ -56,5 +56,5 @@
 
         public:
-            Munition(BaseObject* creator);
+            Munition(Context* context);
             virtual ~Munition();
 
Index: code/trunk/src/orxonox/weaponsystem/Weapon.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Weapon.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/Weapon.cc	(revision 9667)
@@ -39,7 +39,7 @@
 namespace orxonox
 {
-    CreateFactory(Weapon);
+    RegisterClass(Weapon);
 
-    Weapon::Weapon(BaseObject* creator) : StaticEntity(creator)
+    Weapon::Weapon(Context* context) : StaticEntity(context)
     {
         RegisterObject(Weapon);
Index: code/trunk/src/orxonox/weaponsystem/Weapon.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Weapon.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/Weapon.h	(revision 9667)
@@ -42,5 +42,5 @@
     {
         public:
-            Weapon(BaseObject* creator);
+            Weapon(Context* context);
             virtual ~Weapon();
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponMode.cc	(revision 9667)
@@ -45,5 +45,7 @@
 namespace orxonox
 {
-    WeaponMode::WeaponMode(BaseObject* creator) : BaseObject(creator)
+    RegisterAbstractClass(WeaponMode).inheritsFrom(Class(BaseObject));
+
+    WeaponMode::WeaponMode(Context* context) : BaseObject(context)
     {
         RegisterObject(WeaponMode);
@@ -75,5 +77,5 @@
         if( GameMode::isMaster() )
         {
-            this->defSndWpnFire_ = new WorldSound(this);
+            this->defSndWpnFire_ = new WorldSound(this->getContext());
             this->defSndWpnFire_->setLooping(false);
             this->bSoundAttached_ = false;
Index: code/trunk/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponMode.h	(revision 9667)
@@ -36,5 +36,5 @@
 #include "util/Math.h"
 #include "core/BaseObject.h"
-#include "core/SubclassIdentifier.h"
+#include "core/class/SubclassIdentifier.h"
 #include "tools/Timer.h"
 
@@ -44,5 +44,5 @@
     {
         public:
-            WeaponMode(BaseObject* creator);
+            WeaponMode(Context* context);
             virtual ~WeaponMode();
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponPack.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponPack.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponPack.cc	(revision 9667)
@@ -38,7 +38,7 @@
 namespace orxonox
 {
-    CreateFactory(WeaponPack);
+    RegisterClass(WeaponPack);
 
-    WeaponPack::WeaponPack(BaseObject* creator) : BaseObject(creator)
+    WeaponPack::WeaponPack(Context* context) : BaseObject(context)
     {
         RegisterObject(WeaponPack);
Index: code/trunk/src/orxonox/weaponsystem/WeaponPack.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponPack.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponPack.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            WeaponPack(BaseObject* creator);
+            WeaponPack(Context* context);
             virtual ~WeaponPack();
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponSet.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSet.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSet.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(WeaponSet);
+    RegisterClass(WeaponSet);
 
-    WeaponSet::WeaponSet(BaseObject* creator) : BaseObject(creator)
+    WeaponSet::WeaponSet(Context* context) : BaseObject(context)
     {
         RegisterObject(WeaponSet);
Index: code/trunk/src/orxonox/weaponsystem/WeaponSet.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSet.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSet.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            WeaponSet(BaseObject* creator);
+            WeaponSet(Context* context);
             virtual ~WeaponSet();
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSlot.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(WeaponSlot);
+    RegisterClass(WeaponSlot);
 
-    WeaponSlot::WeaponSlot(BaseObject* creator) : StaticEntity(creator)
+    WeaponSlot::WeaponSlot(Context* context) : StaticEntity(context)
     {
         RegisterObject(WeaponSlot);
Index: code/trunk/src/orxonox/weaponsystem/WeaponSlot.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSlot.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSlot.h	(revision 9667)
@@ -57,5 +57,5 @@
     {
         public:
-            WeaponSlot(BaseObject* creator);
+            WeaponSlot(Context* context);
             virtual ~WeaponSlot();
 
Index: code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 9667)
@@ -30,5 +30,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/SubclassIdentifier.h"
+#include "core/class/SubclassIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
 
@@ -46,7 +46,7 @@
 namespace orxonox
 {
-    CreateFactory(WeaponSystem);
-
-    WeaponSystem::WeaponSystem(BaseObject* creator) : BaseObject(creator)
+    RegisterClass(WeaponSystem);
+
+    WeaponSystem::WeaponSystem(Context* context) : BaseObject(context)
     {
         RegisterObject(WeaponSystem);
@@ -308,5 +308,5 @@
         else if (identifier->getIdentifier()->isA(Class(Munition)))
         {
-            Munition* munition = identifier->fabricate(this);
+            Munition* munition = identifier->fabricate(this->getContext());
             this->munitions_[identifier->getIdentifier()] = munition;
             return munition;
Index: code/trunk/src/orxonox/weaponsystem/WeaponSystem.h
===================================================================
--- code/trunk/src/orxonox/weaponsystem/WeaponSystem.h	(revision 9666)
+++ code/trunk/src/orxonox/weaponsystem/WeaponSystem.h	(revision 9667)
@@ -43,5 +43,5 @@
     {
         public:
-            WeaponSystem(BaseObject* creator);
+            WeaponSystem(Context* context);
             virtual ~WeaponSystem();
 
Index: code/trunk/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/BigExplosion.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/BigExplosion.cc	(revision 9667)
@@ -41,7 +41,7 @@
 namespace orxonox
 {
-    CreateFactory(BigExplosion);
-
-    BigExplosion::BigExplosion(BaseObject* creator) : StaticEntity(creator)
+    RegisterClass(BigExplosion);
+
+    BigExplosion::BigExplosion(Context* context) : StaticEntity(context)
     {
         RegisterObject(BigExplosion);
@@ -80,8 +80,8 @@
     void BigExplosion::init()
     {
-        this->debrisEntity1_ = new MovableEntity(this);
-        this->debrisEntity2_ = new MovableEntity(this);
-        this->debrisEntity3_ = new MovableEntity(this);
-        this->debrisEntity4_ = new MovableEntity(this);
+        this->debrisEntity1_ = new MovableEntity(this->getContext());
+        this->debrisEntity2_ = new MovableEntity(this->getContext());
+        this->debrisEntity3_ = new MovableEntity(this->getContext());
+        this->debrisEntity4_ = new MovableEntity(this->getContext());
 
         this->debrisEntity1_->setSyncMode(0);
@@ -90,8 +90,8 @@
         this->debrisEntity4_->setSyncMode(0);
 
-        this->debris1_ = new Model(this);
-        this->debris2_ = new Model(this);
-        this->debris3_ = new Model(this);
-        this->debris4_ = new Model(this);
+        this->debris1_ = new Model(this->getContext());
+        this->debris2_ = new Model(this->getContext());
+        this->debris3_ = new Model(this->getContext());
+        this->debris4_ = new Model(this->getContext());
 
         this->debris1_->setSyncMode(0);
@@ -100,5 +100,5 @@
         this->debris4_->setSyncMode(0);
 
-        this->explosion_ = new StaticEntity(this);
+        this->explosion_ = new StaticEntity(this->getContext());
         this->explosion_->setSyncMode(0);
 
@@ -148,5 +148,5 @@
         this->debrisEntity4_->attach(debris4_);
 
-        ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+        ParticleSpawner* effect = new ParticleSpawner(this->getContext());
         effect->setDestroyAfterLife(true);
         effect->setSource("Orxonox/explosion2b");
@@ -154,5 +154,5 @@
         effect->setSyncMode(0);
 
-        ParticleSpawner* effect2 = new ParticleSpawner(this->getCreator());
+        ParticleSpawner* effect2 = new ParticleSpawner(this->getContext());
         effect2->setDestroyAfterLife(true);
         effect2->setSource("Orxonox/smoke6");
@@ -172,9 +172,9 @@
         for(int i=0;i<10;i++)
         {
-            Model* part1 = new Model(this);
-            Model* part2 = new Model(this);
-
-            MovableEntity* partEntity1 = new MovableEntity(this);
-            MovableEntity* partEntity2 = new MovableEntity(this);
+            Model* part1 = new Model(this->getContext());
+            Model* part2 = new Model(this->getContext());
+
+            MovableEntity* partEntity1 = new MovableEntity(this->getContext());
+            MovableEntity* partEntity2 = new MovableEntity(this->getContext());
 
             part1->setSyncMode(0);
@@ -225,10 +225,10 @@
             {
                 this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem());
-                this->debrisFire1_->destroy();
+                delete this->debrisFire1_;
             }
             if (this->debrisSmoke1_)
             {
                 this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem());
-                this->debrisSmoke1_->destroy();
+                delete this->debrisSmoke1_;
             }
 
@@ -236,10 +236,10 @@
             {
                 this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem());
-                this->debrisFire2_->destroy();
+                delete this->debrisFire2_;
             }
             if (this->debrisSmoke2_)
             {
                 this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem());
-                this->debrisSmoke2_->destroy();
+                delete this->debrisSmoke2_;
             }
 
@@ -247,10 +247,10 @@
             {
                 this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem());
-                this->debrisFire3_->destroy();
+                delete this->debrisFire3_;
             }
             if (this->debrisSmoke3_)
             {
                 this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem());
-                this->debrisSmoke3_->destroy();
+                delete this->debrisSmoke3_;
             }
 
@@ -258,10 +258,10 @@
             {
                 this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem());
-                this->debrisFire4_->destroy();
+                delete this->debrisFire4_;
             }
             if (this->debrisSmoke4_)
             {
                 this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem());
-                this->debrisSmoke4_->destroy();
+                delete this->debrisSmoke4_;
             }
         }
Index: code/trunk/src/orxonox/worldentities/BigExplosion.h
===================================================================
--- code/trunk/src/orxonox/worldentities/BigExplosion.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/BigExplosion.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            BigExplosion(BaseObject* creator);
+            BigExplosion(Context* context);
             virtual ~BigExplosion();
 
Index: code/trunk/src/orxonox/worldentities/CameraPosition.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/CameraPosition.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/CameraPosition.cc	(revision 9667)
@@ -35,7 +35,7 @@
 namespace orxonox
 {
-    CreateFactory(CameraPosition);
+    RegisterClass(CameraPosition);
 
-    CameraPosition::CameraPosition(BaseObject* creator) : StaticEntity(creator)
+    CameraPosition::CameraPosition(Context* context) : StaticEntity(context)
     {
         RegisterObject(CameraPosition);
Index: code/trunk/src/orxonox/worldentities/CameraPosition.h
===================================================================
--- code/trunk/src/orxonox/worldentities/CameraPosition.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/CameraPosition.h	(revision 9667)
@@ -38,5 +38,5 @@
     {
         public:
-            CameraPosition(BaseObject* creator);
+            CameraPosition(Context* context);
             virtual ~CameraPosition();
 
Index: code/trunk/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/ControllableEntity.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/ControllableEntity.cc	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
@@ -47,10 +47,10 @@
 namespace orxonox
 {
-    CreateFactory(ControllableEntity);
+    RegisterClass(ControllableEntity);
 
     registerMemberNetworkFunction( ControllableEntity, fire );
     registerMemberNetworkFunction( ControllableEntity, setTargetInternal );
 
-    ControllableEntity::ControllableEntity(BaseObject* creator) : MobileEntity(creator)
+    ControllableEntity::ControllableEntity(Context* context) : MobileEntity(context)
     {
         RegisterObject(ControllableEntity);
@@ -397,5 +397,5 @@
         if (!this->camera_ && GameMode::showsGraphics())
         {
-            this->camera_ = new Camera(this);
+            this->camera_ = new Camera(this->getContext());
             this->camera_->requestFocus();
             if (!this->cameraPositionTemplate_.empty())
@@ -423,5 +423,5 @@
             if (!this->hudtemplate_.empty())
             {
-                this->hud_ = new OverlayGroup(this);
+                this->hud_ = new OverlayGroup(this->getContext());
                 this->hud_->addTemplate(this->hudtemplate_);
                 this->hud_->setOwner(this);
Index: code/trunk/src/orxonox/worldentities/ControllableEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/ControllableEntity.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/ControllableEntity.h	(revision 9667)
@@ -44,5 +44,5 @@
 
         public:
-            ControllableEntity(BaseObject* creator);
+            ControllableEntity(Context* context);
             virtual ~ControllableEntity();
 
Index: code/trunk/src/orxonox/worldentities/Drone.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/Drone.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/Drone.cc	(revision 9667)
@@ -34,10 +34,10 @@
 namespace orxonox
 {
-    CreateFactory(Drone);
+    RegisterClass(Drone);
     /**
     @brief
         Constructor. Registers the object and initializes some default values.
     */
-    Drone::Drone(BaseObject* creator) : Pawn(creator)
+    Drone::Drone(Context* context) : Pawn(context)
     {
         RegisterObject(Drone);
@@ -50,5 +50,5 @@
         this->setCollisionType(WorldEntity::Dynamic);
 
-        myController_ = new DroneController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator.
+        myController_ = new DroneController(this->getContext()); //!< Creates a new controller and passes our this pointer to it as creator.
         myController_->setDrone(this);
 
Index: code/trunk/src/orxonox/worldentities/Drone.h
===================================================================
--- code/trunk/src/orxonox/worldentities/Drone.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/Drone.h	(revision 9667)
@@ -47,5 +47,5 @@
     {
         public:
-            Drone(BaseObject* creator);
+            Drone(Context* context);
             virtual ~Drone();
 
Index: code/trunk/src/orxonox/worldentities/EffectContainer.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/EffectContainer.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/EffectContainer.cc	(revision 9667)
@@ -40,8 +40,8 @@
 namespace orxonox
 {
-    CreateFactory(EffectContainer);
+    RegisterClass(EffectContainer);
 
-    EffectContainer::EffectContainer(BaseObject* creator)
-        : BaseObject(creator)
+    EffectContainer::EffectContainer(Context* context)
+        : BaseObject(context)
         , lua_(NULL)
     {
Index: code/trunk/src/orxonox/worldentities/EffectContainer.h
===================================================================
--- code/trunk/src/orxonox/worldentities/EffectContainer.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/EffectContainer.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            EffectContainer(BaseObject* creator);
+            EffectContainer(Context* context);
             virtual ~EffectContainer();
 
Index: code/trunk/src/orxonox/worldentities/ExplosionChunk.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/ExplosionChunk.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/ExplosionChunk.cc	(revision 9667)
@@ -38,7 +38,7 @@
 namespace orxonox
 {
-    CreateFactory(ExplosionChunk);
+    RegisterClass(ExplosionChunk);
 
-    ExplosionChunk::ExplosionChunk(BaseObject* creator) : MovableEntity(creator)
+    ExplosionChunk::ExplosionChunk(Context* context) : MovableEntity(context)
     {
         RegisterObject(ExplosionChunk);
@@ -92,10 +92,10 @@
             {
                 this->detachOgreObject(this->fire_->getParticleSystem());
-                this->fire_->destroy();
+                delete this->fire_;
             }
             if (this->smoke_)
             {
                 this->detachOgreObject(this->smoke_->getParticleSystem());
-                this->smoke_->destroy();
+                delete this->smoke_;
             }
         }
Index: code/trunk/src/orxonox/worldentities/ExplosionChunk.h
===================================================================
--- code/trunk/src/orxonox/worldentities/ExplosionChunk.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/ExplosionChunk.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            ExplosionChunk(BaseObject* creator);
+            ExplosionChunk(Context* context);
             virtual ~ExplosionChunk();
 
Index: code/trunk/src/orxonox/worldentities/MobileEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/MobileEntity.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/MobileEntity.cc	(revision 9667)
@@ -39,5 +39,7 @@
 namespace orxonox
 {
-    MobileEntity::MobileEntity(BaseObject* creator) : WorldEntity(creator)
+    RegisterClass(MobileEntity);
+
+    MobileEntity::MobileEntity(Context* context) : WorldEntity(context)
     {
         RegisterObject(MobileEntity);
Index: code/trunk/src/orxonox/worldentities/MobileEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/MobileEntity.h	(revision 9667)
@@ -41,5 +41,5 @@
     {
         public:
-            MobileEntity(BaseObject* creator);
+            MobileEntity(Context* context);
             virtual ~MobileEntity();
 
Index: code/trunk/src/orxonox/worldentities/MovableEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/MovableEntity.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/MovableEntity.cc	(revision 9667)
@@ -41,7 +41,7 @@
     static const float CONTINUOUS_SYNCHRONIZATION_TIME = 10.0f;
 
-    CreateFactory(MovableEntity);
+    RegisterClass(MovableEntity);
 
-    MovableEntity::MovableEntity(BaseObject* creator) : MobileEntity(creator)
+    MovableEntity::MovableEntity(Context* context) : MobileEntity(context)
     {
         RegisterObject(MovableEntity);
Index: code/trunk/src/orxonox/worldentities/MovableEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/MovableEntity.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/MovableEntity.h	(revision 9667)
@@ -43,5 +43,5 @@
     {
         public:
-            MovableEntity(BaseObject* creator);
+            MovableEntity(Context* context);
             virtual ~MovableEntity();
 
Index: code/trunk/src/orxonox/worldentities/SpawnPoint.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/SpawnPoint.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/SpawnPoint.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(SpawnPoint);
+    RegisterClass(SpawnPoint);
 
-    SpawnPoint::SpawnPoint(BaseObject* creator) : StaticEntity(creator)
+    SpawnPoint::SpawnPoint(Context* context) : StaticEntity(context)
     {
         RegisterObject(SpawnPoint);
@@ -81,5 +81,5 @@
     Pawn* SpawnPoint::spawn()
     {
-        Pawn* entity = this->spawnclass_.fabricate(this);
+        Pawn* entity = this->spawnclass_.fabricate(this->getContext());
         if (entity)
         {
Index: code/trunk/src/orxonox/worldentities/SpawnPoint.h
===================================================================
--- code/trunk/src/orxonox/worldentities/SpawnPoint.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/SpawnPoint.h	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include <string>
-#include "core/SubclassIdentifier.h"
+#include "core/class/SubclassIdentifier.h"
 #include "worldentities/StaticEntity.h"
 
@@ -41,5 +41,5 @@
     {
         public:
-            SpawnPoint(BaseObject* creator);
+            SpawnPoint(Context* context);
             virtual ~SpawnPoint() {}
 
Index: code/trunk/src/orxonox/worldentities/StaticEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/StaticEntity.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/StaticEntity.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(StaticEntity);
+    RegisterClass(StaticEntity);
 
-    StaticEntity::StaticEntity(BaseObject* creator) : WorldEntity(creator)
+    StaticEntity::StaticEntity(Context* context) : WorldEntity(context)
     {
         RegisterObject(StaticEntity);
Index: code/trunk/src/orxonox/worldentities/StaticEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/StaticEntity.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/StaticEntity.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            StaticEntity(BaseObject* creator);
+            StaticEntity(Context* context);
             virtual ~StaticEntity();
 
Index: code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc	(revision 9667)
@@ -34,7 +34,7 @@
 namespace orxonox
 {
-    CreateFactory(TeamSpawnPoint);
+    RegisterClass(TeamSpawnPoint);
 
-    TeamSpawnPoint::TeamSpawnPoint(BaseObject* creator) : SpawnPoint(creator)
+    TeamSpawnPoint::TeamSpawnPoint(Context* context) : SpawnPoint(context)
     {
         RegisterObject(TeamSpawnPoint);
Index: code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h
===================================================================
--- code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            TeamSpawnPoint(BaseObject* creator);
+            TeamSpawnPoint(Context* context);
             virtual ~TeamSpawnPoint() {}
 
Index: code/trunk/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 9667)
@@ -61,4 +61,6 @@
     BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
 
+    RegisterAbstractClass(WorldEntity).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable));
+
     /**
     @brief
@@ -66,5 +68,5 @@
         All the default values are being set here.
     */
-    WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), Synchronisable(creator)
+    WorldEntity::WorldEntity(Context* context) : BaseObject(context), Synchronisable(context)
     {
         RegisterObject(WorldEntity);
@@ -92,5 +94,6 @@
         this->bPhysicsActiveSynchronised_    = false;
         this->bPhysicsActiveBeforeAttaching_ = false;
-        this->collisionShape_ = new WorldEntityCollisionShape(this);
+        this->collisionShape_ = new WorldEntityCollisionShape(this->getContext());
+        this->collisionShape_->setWorldEntityOwner(this);
         this->collisionType_             = None;
         this->collisionTypeSynchronised_ = None;
Index: code/trunk/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 9667)
@@ -90,5 +90,5 @@
 
         public:
-            WorldEntity(BaseObject* creator);
+            WorldEntity(Context* context);
             virtual ~WorldEntity();
 
Index: code/trunk/src/orxonox/worldentities/pawns/Destroyer.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Destroyer.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Destroyer.cc	(revision 9667)
@@ -34,7 +34,7 @@
 namespace orxonox
 {
-    CreateFactory(Destroyer);
+    RegisterClass(Destroyer);
 
-    Destroyer::Destroyer(BaseObject* creator) : SpaceShip(creator)
+    Destroyer::Destroyer(Context* context) : SpaceShip(context)
     {
         RegisterObject(Destroyer);
Index: code/trunk/src/orxonox/worldentities/pawns/Destroyer.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Destroyer.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Destroyer.h	(revision 9667)
@@ -39,5 +39,5 @@
     {
         public:
-            Destroyer(BaseObject* creator);
+            Destroyer(Context* context);
             virtual ~Destroyer() {};
 
Index: code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc	(revision 9667)
@@ -38,5 +38,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/Template.h"
 #include "core/XMLPort.h"
@@ -53,7 +53,7 @@
     const float orientationGain_ = 100;
     const float jumpValue_ = 300;
-    CreateFactory(FpsPlayer);
-
-    FpsPlayer::FpsPlayer(BaseObject* creator) : Pawn(creator)
+    RegisterClass(FpsPlayer);
+
+    FpsPlayer::FpsPlayer(Context* context) : Pawn(context)
     {
         RegisterObject(FpsPlayer);
Index: code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h	(revision 9667)
@@ -43,5 +43,5 @@
     {
         public:
-            FpsPlayer(BaseObject* creator);
+            FpsPlayer(Context* context);
             virtual ~FpsPlayer();
 
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	(revision 9667)
@@ -51,9 +51,9 @@
 namespace orxonox
 {
-    CreateFactory(Pawn);
-
-    Pawn::Pawn(BaseObject* creator)
-        : ControllableEntity(creator)
-        , RadarViewable(creator, static_cast<WorldEntity*>(this))
+    RegisterClass(Pawn);
+
+    Pawn::Pawn(Context* context)
+        : ControllableEntity(context)
+        , RadarViewable(this, static_cast<WorldEntity*>(this))
     {
         RegisterObject(Pawn);
@@ -86,5 +86,5 @@
         if (GameMode::isMaster())
         {
-            this->weaponSystem_ = new WeaponSystem(this);
+            this->weaponSystem_ = new WeaponSystem(this->getContext());
             this->weaponSystem_->setPawn(this);
         }
@@ -299,5 +299,5 @@
         if (!this->spawnparticlesource_.empty())
         {
-            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
             effect->setPosition(this->getPosition());
             effect->setOrientation(this->getOrientation());
@@ -365,5 +365,5 @@
         this->setDestroyWhenPlayerLeft(false);
 
-        BigExplosion* chunk = new BigExplosion(this->getCreator());
+        BigExplosion* chunk = new BigExplosion(this->getContext());
         chunk->setPosition(this->getPosition());
 
@@ -373,5 +373,5 @@
         // play death effect
         {
-            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
             effect->setPosition(this->getPosition());
             effect->setOrientation(this->getOrientation());
@@ -381,5 +381,5 @@
         }
         {
-            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
             effect->setPosition(this->getPosition());
             effect->setOrientation(this->getOrientation());
@@ -389,5 +389,5 @@
         }
         {
-            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
+            ParticleSpawner* effect = new ParticleSpawner(this->getContext());
             effect->setPosition(this->getPosition());
             effect->setOrientation(this->getOrientation());
@@ -398,5 +398,5 @@
         for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
         {
-            ExplosionChunk* chunk = new ExplosionChunk(this->getCreator());
+            ExplosionChunk* chunk = new ExplosionChunk(this->getContext());
             chunk->setPosition(this->getPosition());
         }
Index: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	(revision 9667)
@@ -45,5 +45,5 @@
 
         public:
-            Pawn(BaseObject* creator);
+            Pawn(Context* context);
             virtual ~Pawn();
 
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 9667)
@@ -32,5 +32,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/Template.h"
 #include "core/XMLPort.h"
@@ -46,7 +46,7 @@
 namespace orxonox
 {
-    CreateFactory(SpaceShip);
-
-    SpaceShip::SpaceShip(BaseObject* creator) : Pawn(creator), boostBlur_(NULL)
+    RegisterClass(SpaceShip);
+
+    SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL)
     {
         RegisterObject(SpaceShip);
@@ -96,5 +96,5 @@
 
             if (this->boostBlur_)
-                this->boostBlur_->destroy();
+                delete this->boostBlur_;
         }
     }
@@ -447,5 +447,5 @@
         if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL)
         {
-            this->boostBlur_->destroy();
+            delete this->boostBlur_;
             this->boostBlur_ = NULL;
         }
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	(revision 9667)
@@ -88,5 +88,5 @@
     {
         public:
-            SpaceShip(BaseObject* creator);
+            SpaceShip(Context* context);
             virtual ~SpaceShip();
 
Index: code/trunk/src/orxonox/worldentities/pawns/Spectator.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Spectator.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Spectator.cc	(revision 9667)
@@ -31,5 +31,5 @@
 #include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/GameMode.h"
 #include "core/command/CommandExecutor.h"
@@ -45,7 +45,7 @@
     extern const std::string __CC_suicide_name;
 
-    CreateFactory(Spectator);
-
-    Spectator::Spectator(BaseObject* creator) : ControllableEntity(creator)
+    RegisterClass(Spectator);
+
+    Spectator::Spectator(Context* context) : ControllableEntity(context)
     {
         RegisterObject(Spectator);
Index: code/trunk/src/orxonox/worldentities/pawns/Spectator.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Spectator.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/Spectator.h	(revision 9667)
@@ -40,5 +40,5 @@
     {
         public:
-            Spectator(BaseObject* creator);
+            Spectator(Context* context);
             virtual ~Spectator();
 
Index: code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 9667)
@@ -37,7 +37,7 @@
 namespace orxonox
 {
-    CreateFactory(TeamBaseMatchBase);
+    RegisterClass(TeamBaseMatchBase);
 
-    TeamBaseMatchBase::TeamBaseMatchBase(BaseObject* creator) : Pawn(creator)
+    TeamBaseMatchBase::TeamBaseMatchBase(Context* context) : Pawn(context)
     {
         RegisterObject(TeamBaseMatchBase);
Index: code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h	(revision 9666)
+++ code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h	(revision 9667)
@@ -50,5 +50,5 @@
     {
         public:
-            TeamBaseMatchBase(BaseObject* creator);
+            TeamBaseMatchBase(Context* context);
 
             // if class closes, close everything
