Index: code/trunk/src/libraries/network/Client.cc
===================================================================
--- code/trunk/src/libraries/network/Client.cc	(revision 9550)
+++ code/trunk/src/libraries/network/Client.cc	(revision 9667)
@@ -51,6 +51,6 @@
 #include "FunctionCallManager.h"
 #include "core/CoreIncludes.h"
-#include "core/CommandLineParser.h"
 #include "core/Game.h"
+#include "core/config/CommandLineParser.h"
 
 namespace orxonox
Index: code/trunk/src/libraries/network/ClientConnectionListener.cc
===================================================================
--- code/trunk/src/libraries/network/ClientConnectionListener.cc	(revision 9550)
+++ code/trunk/src/libraries/network/ClientConnectionListener.cc	(revision 9667)
@@ -35,7 +35,9 @@
 namespace orxonox
 {
+    RegisterAbstractClass(ClientConnectionListener).inheritsFrom(Class(Listable));
+
     ClientConnectionListener::ClientConnectionListener()
     {
-        RegisterRootObject(ClientConnectionListener);
+        RegisterObject(ClientConnectionListener);
     }
 
Index: code/trunk/src/libraries/network/ClientConnectionListener.h
===================================================================
--- code/trunk/src/libraries/network/ClientConnectionListener.h	(revision 9550)
+++ code/trunk/src/libraries/network/ClientConnectionListener.h	(revision 9667)
@@ -31,9 +31,9 @@
 
 #include "NetworkPrereqs.h"
-#include "core/OrxonoxClass.h"
+#include "core/object/Listable.h"
 
 namespace orxonox
 {
-    class _NetworkExport ClientConnectionListener : virtual public OrxonoxClass
+    class _NetworkExport ClientConnectionListener : virtual public Listable
     {
         public:
Index: code/trunk/src/libraries/network/Host.cc
===================================================================
--- code/trunk/src/libraries/network/Host.cc	(revision 9550)
+++ code/trunk/src/libraries/network/Host.cc	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ObjectList.h"
+#include "core/object/ObjectList.h"
 #include "core/command/ConsoleCommand.h"
 #include "NetworkChatListener.h"
@@ -145,5 +145,5 @@
   NetworkChatListener::NetworkChatListener()
   {
-      RegisterRootObject(NetworkChatListener);
+      RegisterObject(NetworkChatListener);
   }
 
Index: code/trunk/src/libraries/network/NetworkChatListener.h
===================================================================
--- code/trunk/src/libraries/network/NetworkChatListener.h	(revision 9550)
+++ code/trunk/src/libraries/network/NetworkChatListener.h	(revision 9667)
@@ -32,5 +32,5 @@
 #include "NetworkPrereqs.h"
 
-#include "core/OrxonoxClass.h"
+#include "core/object/Listable.h"
 
 namespace orxonox
@@ -43,5 +43,5 @@
         in Host and ChatManager. ChatManager is the main derivative of this interface.
     */
-    class _NetworkExport NetworkChatListener : virtual public OrxonoxClass
+    class _NetworkExport NetworkChatListener : virtual public Listable
     {
         friend class Host;
Index: code/trunk/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.cc	(revision 9550)
+++ code/trunk/src/libraries/network/NetworkFunction.cc	(revision 9667)
@@ -37,7 +37,12 @@
   std::map<uint32_t, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::idMap_;
 
+  // no suitable factory for NetworkFunctionBase (and children), so we declare it abstract
+  RegisterAbstractClass(NetworkFunctionBase).inheritsFrom(Class(Listable));
+  RegisterAbstractClass(NetworkFunctionStatic).inheritsFrom(Class(NetworkFunctionBase));
+  RegisterAbstractClass(NetworkMemberFunctionBase).inheritsFrom(Class(NetworkFunctionBase));
+
   NetworkFunctionBase::NetworkFunctionBase(const std::string& name)
   {
-    RegisterRootObject(NetworkFunctionBase);
+      RegisterObject(NetworkFunctionBase);
 
     static uint32_t networkID = 0;
@@ -57,5 +62,5 @@
     std::map<std::string, NetworkFunctionBase*>::iterator it;
     for( it=map.begin(); it!=map.end(); ++it )
-      it->second->destroy();
+      delete it->second;
   }
 
Index: code/trunk/src/libraries/network/NetworkFunction.h
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.h	(revision 9550)
+++ code/trunk/src/libraries/network/NetworkFunction.h	(revision 9667)
@@ -39,5 +39,6 @@
 #include <boost/static_assert.hpp>
 
-#include "core/Identifier.h"
+#include "core/object/Listable.h"
+#include "core/class/Identifier.h"
 #include "core/command/Functor.h"
 #include "FunctionCallManager.h"
@@ -70,5 +71,5 @@
 
 
-class _NetworkExport NetworkFunctionBase: virtual public OrxonoxClass {
+class _NetworkExport NetworkFunctionBase: virtual public Listable {
   public:
     NetworkFunctionBase(const std::string& name);
Index: code/trunk/src/libraries/network/Server.cc
===================================================================
--- code/trunk/src/libraries/network/Server.cc	(revision 9550)
+++ code/trunk/src/libraries/network/Server.cc	(revision 9667)
@@ -48,5 +48,4 @@
 #include "util/Clock.h"
 #include "util/Output.h"
-#include "core/ObjectList.h"
 #include "core/command/Executor.h"
 #include "packet/Chat.h"
Index: code/trunk/src/libraries/network/TrafficControl.cc
===================================================================
--- code/trunk/src/libraries/network/TrafficControl.cc	(revision 9550)
+++ code/trunk/src/libraries/network/TrafficControl.cc	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "synchronisable/Synchronisable.h"
 
Index: code/trunk/src/libraries/network/WANDiscoverable.cc
===================================================================
--- code/trunk/src/libraries/network/WANDiscoverable.cc	(revision 9550)
+++ code/trunk/src/libraries/network/WANDiscoverable.cc	(revision 9667)
@@ -33,5 +33,5 @@
 
 #include "MasterServerProtocol.h"
-#include "core/ConfigValueIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/libraries/network/WANDiscoverable.h
===================================================================
--- code/trunk/src/libraries/network/WANDiscoverable.h	(revision 9550)
+++ code/trunk/src/libraries/network/WANDiscoverable.h	(revision 9667)
@@ -30,6 +30,5 @@
 
 #include "NetworkPrereqs.h"
-#include "core/OrxonoxClass.h"
-#include "core/CoreIncludes.h"
+#include "core/config/Configurable.h"
 #include "MasterServerComm.h"
 
@@ -37,5 +36,5 @@
 {
 
-  class _NetworkExport WANDiscoverable: public OrxonoxClass
+  class _NetworkExport WANDiscoverable: public Configurable
   {
     public:
Index: code/trunk/src/libraries/network/WANDiscovery.h
===================================================================
--- code/trunk/src/libraries/network/WANDiscovery.h	(revision 9550)
+++ code/trunk/src/libraries/network/WANDiscovery.h	(revision 9667)
@@ -31,8 +31,6 @@
 #include "NetworkPrereqs.h"
 #include "packet/ServerInformation.h"
-#include "core/ConfigFileManager.h"
-#include "core/OrxonoxClass.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/CoreIncludes.h"
+#include "core/config/Configurable.h"
+#include "core/config/ConfigValueIncludes.h"
 #include "MasterServerComm.h"
 #include "MasterServerProtocol.h"
@@ -48,5 +46,5 @@
   class _NetworkExport WANDiscovery
 // tolua_end
-    : public OrxonoxClass
+    : public Configurable
   { // tolua_export
     public:
Index: code/trunk/src/libraries/network/packet/ClassID.cc
===================================================================
--- code/trunk/src/libraries/network/packet/ClassID.cc	(revision 9550)
+++ code/trunk/src/libraries/network/packet/ClassID.cc	(revision 9667)
@@ -55,6 +55,6 @@
 
   //calculate total needed size (for all strings and integers)
-  std::map<std::string, Identifier*>::const_iterator it = Identifier::getStringIdentifierMapBegin();
-  for(;it != Identifier::getStringIdentifierMapEnd();++it){
+  std::map<std::string, Identifier*>::const_iterator it = IdentifierManager::getInstance().getIdentifierByStringMap().begin();
+  for(;it != IdentifierManager::getInstance().getIdentifierByStringMap().end();++it){
     id = it->second;
     if(id == NULL || !id->hasFactory())
@@ -129,5 +129,5 @@
 
   //clear the map of network ids
-  Identifier::clearNetworkIDs();
+  IdentifierManager::getInstance().clearNetworkIDs();
 
   orxout(verbose, context::packets) << "=== processing classids: " << endl;
Index: code/trunk/src/libraries/network/packet/FunctionIDs.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 9550)
+++ code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 9667)
@@ -35,5 +35,5 @@
 
 #include "util/Output.h"
-#include "core/ObjectList.h"
+#include "core/object/ObjectList.h"
 #include "network/NetworkFunction.h"
 
Index: code/trunk/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/trunk/src/libraries/network/packet/Gamestate.cc	(revision 9550)
+++ code/trunk/src/libraries/network/packet/Gamestate.cc	(revision 9667)
@@ -33,6 +33,7 @@
 #include "util/Output.h"
 #include "util/OrxAssert.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/ObjectList.h"
+#include "core/object/ObjectList.h"
 #include "network/synchronisable/Synchronisable.h"
 #include "network/GamestateHandler.h"
@@ -132,5 +133,5 @@
     tempsize = it->getData(mem, this->sizes_, id, mode);
     if ( tempsize != 0 )
-      dataVector_.push_back( obj(it->getObjectID(), it->getCreatorID(), tempsize, mem-data_) );
+      dataVector_.push_back( obj(it->getObjectID(), it->getContextID(), tempsize, mem-data_) );
 
 #ifndef NDEBUG
@@ -468,5 +469,5 @@
     {
       assert( objectHeader.getClassID() == htemp.getClassID() );
-      assert( objectHeader.getCreatorID() == htemp.getCreatorID() );
+      assert( objectHeader.getContextID() == htemp.getContextID() );
       return true;
     }
Index: code/trunk/src/libraries/network/synchronisable/Serialise.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 9550)
+++ code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 9667)
@@ -41,7 +41,4 @@
 #include "util/Serialise.h"
 #include "core/CorePrereqs.h"
-#include "core/CoreIncludes.h"
-#include "core/BaseObject.h" // remove this if circular dependencies in BaseObject/SmartPtr are fixed
-//#include "core/SmartPtr.h"
 
 namespace orxonox{
Index: code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 9550)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 9667)
@@ -45,11 +45,13 @@
   uint8_t Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
 
+  RegisterAbstractClass(Synchronisable).inheritsFrom(Class(OrxonoxInterface));
+
   /**
   * Constructor:
   * Initializes all Variables and sets the right objectID_
   */
-  Synchronisable::Synchronisable(BaseObject* creator )
-  {
-    RegisterRootObject(Synchronisable);
+  Synchronisable::Synchronisable(Context* context)
+  {
+      RegisterObject(Synchronisable);
     static uint32_t idCounter=0;
     objectMode_=0x1; // by default do not send data to server
@@ -69,9 +71,6 @@
     this->setPriority( Priority::Normal );
 
-    // get creator id
-    if( creator )
-      this->creatorID_ = creator->getSceneID();
-    else
-      this->creatorID_ = OBJECTID_UNKNOWN;
+    // get context id
+    this->contextID_ = this->findContextID(context);
   }
 
@@ -83,5 +82,5 @@
   {
     // delete callback function objects
-    if(!Identifier::isCreatingHierarchy()){
+    if(!IdentifierManager::getInstance().isCreatingHierarchy()){
       // remove object from the static objectMap
       if (this->objectMode_ != 0x0 && (Host::running() && Host::isServer()))
@@ -100,4 +99,19 @@
   }
 
+  /**
+   * @brief Returns the id of the context.
+   * If the context is not Synchronisable, it moves on to its parent, recursively.
+   */
+  uint32_t Synchronisable::findContextID(Context* context)
+  {
+      if (context == NULL)
+          return OBJECTID_UNKNOWN;
+
+      Synchronisable* synchronisableContext = orxonox_cast<Synchronisable*>(context);
+      if (synchronisableContext != NULL)
+          return synchronisableContext->getObjectID();
+      else
+          return this->findContextID(context->getParentContext());
+  }
 
   /**
@@ -142,9 +156,9 @@
     }
     assert(id);
-    BaseObject* creator = 0;
-    if (header.getCreatorID() != OBJECTID_UNKNOWN)
-    {
-      Synchronisable* synchronisable_creator = Synchronisable::getSynchronisable(header.getCreatorID());
-      if (!synchronisable_creator)
+    Context* context = 0;
+    if (header.getContextID() != OBJECTID_UNKNOWN)
+    {
+      Synchronisable* synchronisable_context = Synchronisable::getSynchronisable(header.getContextID());
+      if (!synchronisable_context)
       {
         mem += header.getDataSize()+SynchronisableHeader::getSize(); //.TODO: this suckz.... remove size from header
@@ -153,8 +167,11 @@
       }
       else
-        creator = orxonox_cast<BaseObject*>(synchronisable_creator);
-    }
+        context = orxonox_cast<Context*>(synchronisable_context);
+    }
+    else
+      context = Context::getRootContext();
+
     assert(getSynchronisable(header.getObjectID())==0);   //make sure no object with this id exists
-    BaseObject *bo = id->fabricate(creator);
+    BaseObject *bo = orxonox_cast<BaseObject*>(id->fabricate(context));
     assert(bo);
     Synchronisable *no = orxonox_cast<Synchronisable*>(bo);
@@ -162,9 +179,13 @@
     assert( Synchronisable::objectMap_.find(header.getObjectID()) == Synchronisable::objectMap_.end() );
     no->setObjectID(header.getObjectID());
-    //no->creatorID=header.getCreatorID(); //TODO: remove this
+    //no->contextID=header.getContextID(); //TODO: remove this
     no->setClassID(header.getClassID());
-    assert(no->creatorID_ == header.getCreatorID());
-    if( creator )
-      bo->setLevel(creator->getLevel());          // Note: this ensures that the level is known on the client for child objects of the scene (and the scene itself)
+    assert(no->contextID_ == header.getContextID());
+    if( context )
+    {
+      BaseObject* boContext = orxonox_cast<BaseObject*>(context);
+      if (boContext)
+          bo->setLevel(boContext->getLevel()); // Note: this ensures that the level is known on the client for child objects of the scene (and the scene itself)
+    }
     //assert(no->classID_ == header.getClassID());
     orxout(verbose, context::network) << "fabricate objectID_: " << no->objectID_ << " classID_: " << no->classID_ << endl;
@@ -274,5 +295,5 @@
 
     header.setObjectID( this->objectID_ );
-    header.setCreatorID( this->creatorID_ );
+    header.setContextID( this->contextID_ );
     header.setClassID( this->classID_ );
     header.setDataSize( tempsize );
@@ -331,5 +352,5 @@
       SynchronisableHeader syncHeader2(mem);
       assert( this->getClassID() == syncHeader2.getClassID() );
-      assert( this->getCreatorID() == syncHeader2.getCreatorID() );
+      assert( this->getContextID() == syncHeader2.getContextID() );
       mem += SynchronisableHeader::getSize();
       std::vector<SynchronisableVariableBase *>::iterator i;
Index: code/trunk/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.h	(revision 9550)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.h	(revision 9667)
@@ -40,5 +40,6 @@
 
 #include "util/mbool.h"
-#include "core/OrxonoxClass.h"
+#include "util/Output.h"
+#include "core/class/OrxonoxInterface.h"
 #include "SynchronisableVariable.h"
 #include "NetworkCallback.h"
@@ -106,5 +107,5 @@
    * @brief: stores information about a Synchronisable
    *
-   * This class stores the information about a Synchronisable (objectID_, classID_, creatorID_, dataSize)
+   * This class stores the information about a Synchronisable (objectID_, classID_, contextID_, dataSize)
    * in an emulated bitset.
    * Bit 1 to 31 store the size of the Data the synchronisable consumes in the stream
@@ -112,5 +113,5 @@
    * Byte 5 to 8: objectID_
    * Byte 9 to 12: classID_
-   * Byte 13 to 16: creatorID_
+   * Byte 13 to 16: contextID_
    */
   class _NetworkExport SynchronisableHeader: public SynchronisableHeaderLight
@@ -125,8 +126,8 @@
       inline void setClassID(uint32_t classID_)
         { *(uint32_t*)(data_+SynchronisableHeaderLight::getSize()) = classID_; }
-      inline uint32_t getCreatorID() const
+      inline uint32_t getContextID() const
         { return *(uint32_t*)(data_+SynchronisableHeaderLight::getSize()+4); }
-      inline void setCreatorID(uint32_t creatorID_)
-        { *(uint32_t*)(data_+SynchronisableHeaderLight::getSize()+4) = creatorID_; }
+      inline void setContextID(uint32_t contextID_)
+        { *(uint32_t*)(data_+SynchronisableHeaderLight::getSize()+4) = contextID_; }
       inline void operator=(SynchronisableHeader& h)
         { memcpy(data_, h.data_, getSize()); }
@@ -143,5 +144,5 @@
   * @author Oliver Scheuss
   */
-  class _NetworkExport Synchronisable : virtual public OrxonoxClass{
+  class _NetworkExport Synchronisable : virtual public OrxonoxInterface {
   public:
     friend class packet::Gamestate;
@@ -157,5 +158,5 @@
 
     inline uint32_t getObjectID() const {return this->objectID_;}
-    inline unsigned int getCreatorID() const {return this->creatorID_;}
+    inline unsigned int getContextID() const {return this->contextID_;}
     inline uint32_t getClassID() const {return this->classID_;}
     inline unsigned int getPriority() const { return this->objectFrequency_;}
@@ -169,5 +170,5 @@
 
   protected:
-    Synchronisable(BaseObject* creator);
+    Synchronisable(Context* context);
     template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
     template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
@@ -175,5 +176,5 @@
 
     void setPriority(unsigned int freq){ objectFrequency_ = freq; }
-
+    uint32_t findContextID(Context* context);
 
   private:
@@ -188,5 +189,5 @@
 
     uint32_t objectID_;
-    uint32_t creatorID_;
+    uint32_t contextID_;
     uint32_t classID_;
 
