Index: code/trunk/src/libraries/network/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/network/CMakeLists.txt	(revision 10622)
+++ code/trunk/src/libraries/network/CMakeLists.txt	(revision 10624)
@@ -34,4 +34,7 @@
   MasterServerComm.cc
   NetworkFunction.cc
+  NetworkFunctionIncludes.cc
+  NetworkFunctionManager.cc
+  NetworkStaticInitializationHandler.cc
   Host.cc
   Server.cc
@@ -43,36 +46,9 @@
 )
 
-SET_SOURCE_FILES(NETWORK_HDR_FILES
-  Client.h
-  ClientConnection.h
-  ClientConnectionListener.h
-  Connection.h
-  FunctionCall.h
-  FunctionCallManager.h
-  #GamestateClient.h
-  GamestateHandler.h
-  GamestateManager.h
-  Host.h
-  LANDiscoverable.h
-  LANDiscovery.h
-  WANDiscoverable.h
-  WANDiscovery.h
-  MasterServerComm.h
-  NetworkChatListener.h
-  NetworkFunction.h
-  NetworkPrecompiledHeaders.h
-  NetworkPrereqs.h
-  Server.h
-  MasterServer.h
-  PeerList.h
-  ServerList.h
-  ServerConnection.h
-  TrafficControl.h
-)
-
 ADD_SUBDIRECTORY(packet)
 ADD_SUBDIRECTORY(synchronisable)
 
 ORXONOX_ADD_LIBRARY(network
+  FIND_HEADER_FILES
   TOLUA_FILES
     Client.h
@@ -90,4 +66,4 @@
     core
   SOURCE_FILES
-    ${NETWORK_SRC_FILES} ${NETWORK_HDR_FILES}
+    ${NETWORK_SRC_FILES}
 )
Index: code/trunk/src/libraries/network/Client.cc
===================================================================
--- code/trunk/src/libraries/network/Client.cc	(revision 10622)
+++ code/trunk/src/libraries/network/Client.cc	(revision 10624)
@@ -45,5 +45,4 @@
 #include "util/Clock.h"
 #include "util/Output.h"
-#include "util/ScopedSingletonManager.h"
 #include "synchronisable/Synchronisable.h"
 #include "packet/Chat.h"
@@ -52,10 +51,11 @@
 #include "core/CoreIncludes.h"
 #include "core/Game.h"
-#include "core/config/CommandLineParser.h"
+#include "core/commandline/CommandLineParser.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
 
 namespace orxonox
 {
 
-  ManageScopedSingleton( Client, ScopeID::Root, true );
+  ManageScopedSingleton( Client, ScopeID::ROOT, false );
 
   /**
@@ -194,14 +194,4 @@
   void Client::connectionClosed()
   {
-    ObjectList<Synchronisable>::iterator it;
-    for(it = ObjectList<Synchronisable>::begin(); it; )
-    {
-      if( it->getSyncMode() != 0x0 )
-        (it++)->destroy();
-      else
-      {
-        ++it;
-      }
-    }
     Game::getInstance().popState();
     Game::getInstance().popState();
Index: code/trunk/src/libraries/network/ClientConnectionListener.cc
===================================================================
--- code/trunk/src/libraries/network/ClientConnectionListener.cc	(revision 10622)
+++ code/trunk/src/libraries/network/ClientConnectionListener.cc	(revision 10624)
@@ -35,5 +35,5 @@
 namespace orxonox
 {
-    RegisterAbstractClass(ClientConnectionListener).inheritsFrom(Class(Listable));
+    RegisterAbstractClass(ClientConnectionListener).inheritsFrom<Listable>();
 
     ClientConnectionListener::ClientConnectionListener()
Index: code/trunk/src/libraries/network/FunctionCall.cc
===================================================================
--- code/trunk/src/libraries/network/FunctionCall.cc	(revision 10622)
+++ code/trunk/src/libraries/network/FunctionCall.cc	(revision 10624)
@@ -32,4 +32,5 @@
 #include "util/MultiType.h"
 #include "NetworkFunction.h"
+#include "NetworkFunctionManager.h"
 
 namespace orxonox {
@@ -46,98 +47,57 @@
 
 bool FunctionCall::execute(){
-  if( this->bIsStatic_ )
+  NetworkFunctionBase* fct = NetworkFunctionManager::getInstance().getFunctionByNetworkId( this->functionID_ );
+  assert( fct != NULL );
+  assert( this->nrOfArguments_==this->arguments_.size() );
+  switch(this->nrOfArguments_)
   {
-    NetworkFunctionStatic *fct = NetworkFunctionStatic::getFunction( this->functionID_ );
-    assert( this->nrOfArguments_==this->arguments_.size() );
-    switch(this->nrOfArguments_)
-    {
-      case 0:
-        fct->call();
-        break;
-      case 1:
-        fct->call(this->arguments_[0]);
-        break;
-      case 2:
-        fct->call(this->arguments_[0], this->arguments_[1]);
-        break;
-      case 3:
-        fct->call(this->arguments_[0], this->arguments_[1], this->arguments_[2]);
-        break;
-      case 4:
-        fct->call(this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3]);
-        break;
-      case 5:
-        fct->call(this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3], this->arguments_[4]);
-        break;
-      default:
-        assert(0);
-    }
+    case 0:
+      return fct->call(this->objectID_);
+    case 1:
+      return fct->call(this->objectID_, this->arguments_[0]);
+    case 2:
+      return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1]);
+    case 3:
+      return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2]);
+    case 4:
+      return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3]);
+    case 5:
+      return fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3], this->arguments_[4]);
+    default:
+      assert(0);
+      return true; // return true to avoid that this functions gets called over and over again
   }
-  else // not a static function, so also handle with the objectID
-  {
-    NetworkMemberFunctionBase *fct = NetworkMemberFunctionBase::getFunction( this->functionID_ );
-    switch(this->nrOfArguments_)
-    {
-      case 0:
-        if( !fct->call(this->objectID_) )
-          return false;
-        break;
-      case 1:
-        if( !fct->call(this->objectID_, this->arguments_[0]) )
-          return false;
-        break;
-      case 2:
-        if( !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1]) )
-          return false;
-        break;
-      case 3:
-        if( !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2]) )
-          return false;
-        break;
-      case 4:
-        if( !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3]) )
-          return false;
-        break;
-      case 5:
-        if( !fct->call(this->objectID_, this->arguments_[0], this->arguments_[1], this->arguments_[2], this->arguments_[3], this->arguments_[4]) )
-          return false;
-        break;
-      default:
-        assert(0);
-    }
-  }
-  return true;
 }
 
-void FunctionCall::setCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){
+void FunctionCall::setCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5){
 
   // first determine the size that has to be reserved for this call
-  uint32_t callsize = 2*sizeof(uint32_t)+sizeof(uint8_t); //size for network-function-id and nrOfArguments and for bool isStatic
+  uint32_t callsize = 3*sizeof(uint32_t); //size for network-function-id and nrOfArguments and the objectID
   uint32_t nrOfArguments = 0;
-  if(mt1)
+  if(!mt1.null())
   {
     nrOfArguments++;
-    callsize += mt1->getNetworkSize();
-    this->arguments_.push_back(*mt1);
-    if(mt2)
+    callsize += mt1.getNetworkSize();
+    this->arguments_.push_back(mt1);
+    if(!mt2.null())
     {
       nrOfArguments++;
-      callsize += mt2->getNetworkSize();
-      this->arguments_.push_back(*mt2);
-      if(mt3)
+      callsize += mt2.getNetworkSize();
+      this->arguments_.push_back(mt2);
+      if(!mt3.null())
       {
         nrOfArguments++;
-        callsize += mt3->getNetworkSize();
-        this->arguments_.push_back(*mt3);
-        if(mt4)
+        callsize += mt3.getNetworkSize();
+        this->arguments_.push_back(mt3);
+        if(!mt4.null())
         {
           nrOfArguments++;
-          callsize += mt4->getNetworkSize();
-          this->arguments_.push_back(*mt4);
-          if(mt5)
+          callsize += mt4.getNetworkSize();
+          this->arguments_.push_back(mt4);
+          if(!mt5.null())
           {
             nrOfArguments++;
-            callsize += mt5->getNetworkSize();
-            this->arguments_.push_back(*mt5);
+            callsize += mt5.getNetworkSize();
+            this->arguments_.push_back(mt5);
           }
         }
@@ -146,49 +106,7 @@
   }
   this->nrOfArguments_ = nrOfArguments;
+  this->functionID_ = networkID;
+  this->objectID_ = objectID;
   this->size_ = callsize;
-  this->bIsStatic_ = true;
-  this->functionID_ = networkID;
-}
-
-void FunctionCall::setCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5){
-
-  // first determine the size that has to be reserved for this call
-  uint32_t callsize = 3*sizeof(uint32_t)+sizeof(uint8_t); //size for network-function-id and nrOfArguments and the objectID and bIsStatic
-  uint32_t nrOfArguments = 0;
-  if(mt1)
-  {
-    nrOfArguments++;
-    callsize += mt1->getNetworkSize();
-    this->arguments_.push_back(*mt1);
-    if(mt2)
-    {
-      nrOfArguments++;
-      callsize += mt2->getNetworkSize();
-      this->arguments_.push_back(*mt2);
-      if(mt3)
-      {
-        nrOfArguments++;
-        callsize += mt3->getNetworkSize();
-        this->arguments_.push_back(*mt3);
-        if(mt4)
-        {
-          nrOfArguments++;
-          callsize += mt4->getNetworkSize();
-          this->arguments_.push_back(*mt4);
-          if(mt5)
-          {
-            nrOfArguments++;
-            callsize += mt5->getNetworkSize();
-            this->arguments_.push_back(*mt5);
-          }
-        }
-      }
-    }
-  }
-  this->nrOfArguments_ = nrOfArguments;
-  this->bIsStatic_ = false;
-  this->functionID_ = networkID;
-  this->size_ = callsize;
-  this->objectID_ = objectID;
 }
 
@@ -196,15 +114,7 @@
 {
   this->functionID_ = *(uint32_t*)mem;
-  this->bIsStatic_ = *(uint8_t*)(mem+sizeof(uint32_t));
-  this->nrOfArguments_ = *(uint32_t*)(mem+sizeof(uint32_t)+sizeof(uint8_t));
-  if( this->bIsStatic_ )
-  {
-    mem += 2*sizeof(uint32_t)+sizeof(uint8_t);
-  }
-  else
-  {
-    this->objectID_ = *(uint32_t*)(mem+2*sizeof(uint32_t)+sizeof(uint8_t));
-    mem += 3*sizeof(uint32_t)+sizeof(uint8_t);
-  }
+  this->nrOfArguments_ = *(uint32_t*)(mem+sizeof(uint32_t));
+  this->objectID_ = *(uint32_t*)(mem+2*sizeof(uint32_t));
+  mem += 3*sizeof(uint32_t);
   for( unsigned int i=0; i<this->nrOfArguments_; ++i )
   {
@@ -218,15 +128,7 @@
   // now serialise the mt values and copy the function id and isStatic
   *(uint32_t*)mem = this->functionID_;
-  *(uint8_t*)(mem+sizeof(uint32_t)) = this->bIsStatic_;
-  *(uint32_t*)(mem+sizeof(uint32_t)+sizeof(uint8_t)) = this->nrOfArguments_;
-  if( this->bIsStatic_ )
-  {
-    mem += 2*sizeof(uint32_t)+sizeof(uint8_t);
-  }
-  else
-  {
-    *(uint32_t*)(mem+2*sizeof(uint32_t)+sizeof(uint8_t)) = this->objectID_;
-    mem += 3*sizeof(uint32_t)+sizeof(uint8_t);
-  }
+  *(uint32_t*)(mem+sizeof(uint32_t)) = this->nrOfArguments_;
+  *(uint32_t*)(mem+2*sizeof(uint32_t)) = this->objectID_;
+  mem += 3*sizeof(uint32_t);
   for( std::vector<MultiType>::iterator it = this->arguments_.begin(); it!=this->arguments_.end(); ++it )
   {
Index: code/trunk/src/libraries/network/FunctionCall.h
===================================================================
--- code/trunk/src/libraries/network/FunctionCall.h	(revision 10622)
+++ code/trunk/src/libraries/network/FunctionCall.h	(revision 10624)
@@ -52,6 +52,5 @@
   bool execute();
 
-  void setCallStatic( uint32_t networkID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
-  void setCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
+  void setCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
   
   void saveData( uint8_t*& mem );
@@ -59,7 +58,6 @@
 private:
   uint32_t                  nrOfArguments_;
-  bool                      bIsStatic_;
   uint32_t                  functionID_;
-  uint32_t                  objectID_;
+  uint32_t                  objectID_; // equals OBJECTID_UNKNOWN for static functions
   uint32_t                  size_;
   std::vector<MultiType>    arguments_;
Index: code/trunk/src/libraries/network/FunctionCallManager.cc
===================================================================
--- code/trunk/src/libraries/network/FunctionCallManager.cc	(revision 10622)
+++ code/trunk/src/libraries/network/FunctionCallManager.cc	(revision 10624)
@@ -39,7 +39,6 @@
 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> > > FunctionCallManager::sIncomingFunctionCallBuffer_;
 
-// Static calls
 
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID)
+void FunctionCallManager::addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
 {
   if(sPeerMap_.find(peerID)==sPeerMap_.end())
@@ -48,108 +47,5 @@
     FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
   }
-  FunctionCallManager::sPeerMap_[peerID]->addCallStatic(functionID);
-}
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager:: sPeerMap_[peerID]->addCallStatic(functionID, &mt1);
-}
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager:: sPeerMap_[peerID]->addCallStatic(functionID, &mt1, &mt2);
-}
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager:: sPeerMap_[peerID]->addCallStatic(functionID, &mt1, &mt2, &mt3);
-}
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager:: sPeerMap_[peerID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4);
-}
-void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager:: sPeerMap_[peerID]->addCallStatic(functionID, &mt1, &mt2, &mt3, &mt4, &mt5);
-}
-
-
-// MemberCalls
-
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID);
-}
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID, &mt1);
-}
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID, &mt1, &mt2);
-}
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3);
-}
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4);
-}
-void FunctionCallManager::addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
-{
-  if(sPeerMap_.find(peerID)==sPeerMap_.end())
-  {
-    FunctionCallManager::sPeerMap_[peerID] = new packet::FunctionCalls;
-    FunctionCallManager::sPeerMap_[peerID]->setPeerID(peerID);
-  }
-  FunctionCallManager::sPeerMap_[peerID]->addCallMember(functionID, objectID, &mt1, &mt2, &mt3, &mt4, &mt5);
+  FunctionCallManager::sPeerMap_[peerID]->addCall(functionID, objectID, mt1, mt2, mt3, mt4, mt5);
 }
 
Index: code/trunk/src/libraries/network/FunctionCallManager.h
===================================================================
--- code/trunk/src/libraries/network/FunctionCallManager.h	(revision 10622)
+++ code/trunk/src/libraries/network/FunctionCallManager.h	(revision 10624)
@@ -46,17 +46,5 @@
 {
 public:
-  static void addCallStatic(uint32_t functionID, uint32_t peerID);
-  static void addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1);
-  static void addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2);
-  static void addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3);
-  static void addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4);
-  static void addCallStatic(uint32_t functionID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
-
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4);
-  static void addCallMember(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
+  static void addCall(uint32_t functionID, uint32_t objectID, uint32_t peerID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
 
   static void sendCalls(orxonox::Host* host);
Index: code/trunk/src/libraries/network/Host.cc
===================================================================
--- code/trunk/src/libraries/network/Host.cc	(revision 10622)
+++ code/trunk/src/libraries/network/Host.cc	(revision 10624)
@@ -34,5 +34,5 @@
 #include "core/CoreIncludes.h"
 #include "core/object/ObjectList.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "NetworkChatListener.h"
 
@@ -143,4 +143,6 @@
   //////////////////////////////////////////////////////////////////////////
 
+  RegisterAbstractClass(NetworkChatListener).inheritsFrom<Listable>();
+
   NetworkChatListener::NetworkChatListener()
   {
Index: code/trunk/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/trunk/src/libraries/network/LANDiscovery.cc	(revision 10622)
+++ code/trunk/src/libraries/network/LANDiscovery.cc	(revision 10624)
@@ -32,11 +32,11 @@
 #include <cstring>
 
-#include "util/ScopedSingletonManager.h"
 #include "core/CoreIncludes.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
 
 
 namespace orxonox
 {
-  ManageScopedSingleton(LANDiscovery, ScopeID::Graphics, true);
+  ManageScopedSingleton(LANDiscovery, ScopeID::GRAPHICS, false);
 
   LANDiscovery::LANDiscovery()
Index: code/trunk/src/libraries/network/MasterServer.cc
===================================================================
--- code/trunk/src/libraries/network/MasterServer.cc	(revision 10622)
+++ code/trunk/src/libraries/network/MasterServer.cc	(revision 10624)
@@ -28,8 +28,8 @@
 
 #include "MasterServer.h"
-#include "util/ScopedSingletonManager.h"
-#include "core/command/ConsoleCommand.h"
+#include "core/command/ConsoleCommandIncludes.h"
 #include "core/CoreIncludes.h"
 #include "core/CorePrereqs.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
 #include "util/Output.h"
 
Index: code/trunk/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.cc	(revision 10622)
+++ code/trunk/src/libraries/network/NetworkFunction.cc	(revision 10624)
@@ -28,85 +28,20 @@
 
 #include "NetworkFunction.h"
-#include "core/CoreIncludes.h"
+#include "NetworkFunctionManager.h"
 
 namespace orxonox
 {
-  std::map<uint32_t, bool> NetworkFunctionBase::isStaticMap_;
+    NetworkFunctionBase::NetworkFunctionBase(const std::string& name, const NetworkFunctionPointer& pointer)
+    {
+        static uint32_t networkID = 0;
+        this->networkID_ = networkID++;
+        this->name_ = name;
+        this->pointer_ = pointer;
+    }
 
-  std::map<NetworkFunctionPointer, NetworkMemberFunctionBase*> NetworkMemberFunctionBase::functorMap_;
-  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)
-  {
-      RegisterObject(NetworkFunctionBase);
-
-    static uint32_t networkID = 0;
-    this->networkID_ = networkID++;
-
-    this->name_ = name;
-    NetworkFunctionBase::getNameMap()[name] = this;
-  }
-  NetworkFunctionBase::~NetworkFunctionBase()
-  {
-  }
-
-
-  void NetworkFunctionBase::destroyAllNetworkFunctions()
-  {
-    std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionBase::getNameMap();
-    std::map<std::string, NetworkFunctionBase*>::iterator it;
-    for( it=map.begin(); it!=map.end(); ++it )
-      delete it->second;
-  }
-
-
-  /*static*/ std::map<std::string, NetworkFunctionBase*>& NetworkFunctionBase::getNameMap()
-  {
-    static std::map<std::string, NetworkFunctionBase*> nameMap_;
-    return nameMap_;
-  }
-
-
-  NetworkFunctionStatic::NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p):
-    NetworkFunctionBase(name)
-  {
-    RegisterObject(NetworkFunctionStatic);
-
-    this->functor_ = functor;
-    NetworkFunctionStatic::getFunctorMap()[p] = this;
-    NetworkFunctionStatic::getIdMap()[ this->getNetworkID() ] = this;
-  }
-
-  /*static*/ std::map<NetworkFunctionPointer, NetworkFunctionStatic*>& NetworkFunctionStatic::getFunctorMap()
-  {
-    static std::map<NetworkFunctionPointer, NetworkFunctionStatic*> functorMap_;
-    return functorMap_;
-  }
-
-  /*static*/ std::map<uint32_t, NetworkFunctionStatic*>& NetworkFunctionStatic::getIdMap()
-  {
-    static std::map<uint32_t, NetworkFunctionStatic*> idMap_;
-    return idMap_;
-  }
-
-
-  NetworkMemberFunctionBase::NetworkMemberFunctionBase(const std::string& name, const NetworkFunctionPointer& p):
-    NetworkFunctionBase(name)
-  {
-    RegisterObject(NetworkMemberFunctionBase);
-
-    this->functorMap_[p] = this;
-    this->idMap_[ this->getNetworkID() ] = this;
-  }
-
-  NetworkMemberFunctionBase::~NetworkMemberFunctionBase()
-  {
-  }
-
-
+    void NetworkFunctionBase::setNetworkID(uint32_t id)
+    {
+        this->networkID_ = id;
+        NetworkFunctionManager::getInstance().registerFunction(this);   // register with new id
+    }
 }
Index: code/trunk/src/libraries/network/NetworkFunction.h
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.h	(revision 10622)
+++ code/trunk/src/libraries/network/NetworkFunction.h	(revision 10624)
@@ -36,9 +36,5 @@
 #include <map>
 #include <string>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/static_assert.hpp>
-
-#include "core/object/Listable.h"
-#include "core/class/Identifier.h"
+
 #include "core/command/Functor.h"
 #include "FunctionCallManager.h"
@@ -60,8 +56,22 @@
   {
 #if defined(ORXONOX_COMPILER_GCC) && defined(ORXONOX_ARCH_32)
-    return pointer[0]<b.pointer[0] ? true : pointer[1]<b.pointer[1];
-#else //ORXONOX_COMPILER_GCC
-    return pointer[0]<b.pointer[0] ? true : ( pointer[1]<b.pointer[1] ? true : ( pointer[2]<b.pointer[2] ? true : pointer[3]<b.pointer[3] ) );
-#endif //ORXONOX_COMPILER_GCC
+    if (pointer[0] != b.pointer[0])
+        return pointer[0] < b.pointer[0];
+    else if (pointer[1] != b.pointer[1])
+        return pointer[1] < b.pointer[1];
+    else
+        return false;
+#else
+    if (pointer[0] != b.pointer[0])
+        return pointer[0] < b.pointer[0];
+    else if (pointer[1] != b.pointer[1])
+        return pointer[1] < b.pointer[1];
+    else if (pointer[2] != b.pointer[2])
+        return pointer[2] < b.pointer[2];
+    else if (pointer[3] != b.pointer[3])
+        return pointer[3] < b.pointer[3];
+    else
+        return false;
+#endif
   }
 };
@@ -71,73 +81,14 @@
 
 
-class _NetworkExport NetworkFunctionBase: virtual public Listable {
-  public:
-    NetworkFunctionBase(const std::string& name);
-    ~NetworkFunctionBase();
-
-    virtual void        setNetworkID(uint32_t id)       { this->networkID_ = id; }
-    inline uint32_t     getNetworkID() const            { return this->networkID_; }
-    inline const std::string& getName() const           { return name_; }
-    static inline bool  isStatic( uint32_t networkID )  { return isStaticMap_[networkID]; }
-
-    static inline void setNetworkID(const std::string& name, uint32_t id)
-    {
-        std::map<std::string, NetworkFunctionBase*>& map = NetworkFunctionBase::getNameMap();
-        assert( map.find(name)!=map.end() );
-        map[name]->setNetworkID(id);
-    }
-
-    static void destroyAllNetworkFunctions();
-
-  protected:
-    static std::map<uint32_t, bool> isStaticMap_;
-
-  private:
-    static std::map<std::string, NetworkFunctionBase*>& getNameMap();
-    uint32_t networkID_;
-    std::string name_;
-
-};
-
-
-class _NetworkExport NetworkFunctionStatic: public NetworkFunctionBase {
-  public:
-    NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p);
-
-    inline void call(){ (*this->functor_)(); }
-    inline void call(const MultiType& mt1){ (*this->functor_)(mt1); }
-    inline void call(const MultiType& mt1, const MultiType& mt2){ (*this->functor_)(mt1, mt2); }
-    inline void call(const MultiType& mt1, const MultiType& mt2, const MultiType& mt3){ (*this->functor_)(mt1, mt2, mt3); }
-    inline void call(const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4){ (*this->functor_)(mt1, mt2, mt3, mt4); }
-    inline void call(const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5){ (*this->functor_)(mt1, mt2, mt3, mt4, mt5); }
-
-    virtual void setNetworkID( uint32_t id )
-        { NetworkFunctionBase::setNetworkID( id ); NetworkFunctionStatic::getIdMap()[id] = this; }
-    static inline NetworkFunctionStatic* getNetworkFunction( uint32_t id)
-        { assert( NetworkFunctionStatic::getIdMap().find(id)!=NetworkFunctionStatic::getIdMap().end() ); return NetworkFunctionStatic::getIdMap()[id]; }
-    static NetworkFunctionStatic* getFunction( uint32_t id )
-        { assert( NetworkFunctionStatic::getIdMap().find(id) != NetworkFunctionStatic::getIdMap().end() ); return NetworkFunctionStatic::getIdMap()[id]; }
-    static NetworkFunctionStatic* getFunction( const NetworkFunctionPointer& p )
-        { assert( NetworkFunctionStatic::getFunctorMap().find(p) != NetworkFunctionStatic::getFunctorMap().end() ); return NetworkFunctionStatic::getFunctorMap()[p]; }
-
-  private:
-    static std::map<NetworkFunctionPointer, NetworkFunctionStatic*>& getFunctorMap();
-    static std::map<uint32_t, NetworkFunctionStatic*>& getIdMap();
-    FunctorStaticPtr functor_;
-
-};
-
-
-class _NetworkExport NetworkMemberFunctionBase: public NetworkFunctionBase {
-  public:
-    NetworkMemberFunctionBase(const std::string& name, const NetworkFunctionPointer& p);
-    ~NetworkMemberFunctionBase();
-
-    virtual void setNetworkID( uint32_t id ){ NetworkFunctionBase::setNetworkID( id ); idMap_[id] = this; }
-    static inline NetworkMemberFunctionBase* getNetworkFunction( uint32_t id){ assert( idMap_.find(id)!=idMap_.end() ); return idMap_[id]; }
-    static NetworkMemberFunctionBase* getFunction( uint32_t id ){ assert( idMap_.find(id) != idMap_.end() ); return idMap_[id]; }
-    static NetworkMemberFunctionBase* getFunction( const NetworkFunctionPointer& p ){ assert( functorMap_.find(p) != functorMap_.end() ); return functorMap_[p]; }
-
-    //
+class _NetworkExport NetworkFunctionBase {
+  public:
+    NetworkFunctionBase(const std::string& name, const NetworkFunctionPointer& pointer);
+    virtual ~NetworkFunctionBase() {}
+
+    void setNetworkID(uint32_t id);
+    inline uint32_t     getNetworkID() const                { return this->networkID_; }
+    inline const std::string& getName() const               { return this->name_; }
+    inline const NetworkFunctionPointer& getPointer() const { return this->pointer_; }
+
     virtual bool call(uint32_t objectID)=0;
     virtual bool call(uint32_t objectID, const MultiType& mt1)=0;
@@ -148,6 +99,37 @@
 
   private:
-    static std::map<NetworkFunctionPointer, NetworkMemberFunctionBase*> functorMap_;
-    static std::map<uint32_t, NetworkMemberFunctionBase*> idMap_;
+    uint32_t networkID_;
+    std::string name_;
+    NetworkFunctionPointer pointer_;
+
+};
+
+
+class _NetworkExport NetworkFunctionStatic: public NetworkFunctionBase {
+  public:
+    NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p)
+        : NetworkFunctionBase(name, p)
+        , functor_(functor)
+    { }
+
+    // ignore the objectID because its a static function
+    virtual bool call(uint32_t objectID){ (*this->functor_)(); return true; }
+    virtual bool call(uint32_t objectID, const MultiType& mt1){ (*this->functor_)(mt1); return true; }
+    virtual bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2){ (*this->functor_)(mt1, mt2); return true; }
+    virtual bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3){ (*this->functor_)(mt1, mt2, mt3); return true; }
+    virtual bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4){ (*this->functor_)(mt1, mt2, mt3, mt4); return true; }
+    virtual bool call(uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5){ (*this->functor_)(mt1, mt2, mt3, mt4, mt5); return true; }
+
+  private:
+    FunctorStaticPtr functor_;
+
+};
+
+
+class _NetworkExport NetworkMemberFunctionBase: public NetworkFunctionBase {
+  public:
+    NetworkMemberFunctionBase(const std::string& name, const NetworkFunctionPointer& p)
+        : NetworkFunctionBase(name, p)
+    { }
 };
 
@@ -155,5 +137,8 @@
 template <class T> class NetworkMemberFunction: public NetworkMemberFunctionBase {
   public:
-    NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p);
+    NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p)
+        : NetworkMemberFunctionBase(name, p)
+        , functor_(functor)
+    { }
 
     inline bool call(uint32_t objectID)
@@ -222,58 +207,5 @@
 };
 
-template <class T> NetworkMemberFunction<T>::NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p):
-    NetworkMemberFunctionBase(name, p), functor_(functor)
-{
 }
 
-template<class T> inline void copyPtr( T ptr, NetworkFunctionPointer& destptr)
-{
-  if( sizeof(NetworkFunctionPointer)-sizeof(T) > 0)
-    memset((uint8_t*)&destptr + sizeof(T), 0, sizeof(NetworkFunctionPointer)-sizeof(T));
-  T p2 = ptr;
-  memcpy( &destptr, &p2, sizeof(T) );
-//   for(unsigned int i=0; i<(sizeof(T)-1/4)+1; i++)
-//     *((uint32_t*)destptr+i) = p2>>32*i;
-}
-
-template<class T> inline void* registerStaticNetworkFunctionFct( T ptr, const std::string& name )
-{
-  BOOST_STATIC_ASSERT( sizeof(T)<=sizeof(NetworkFunctionPointer) ); // if this fails your compiler uses bigger pointers for static functions than defined above
-  NetworkFunctionPointer destptr;
-  copyPtr( ptr, destptr );
-  new NetworkFunctionStatic( createFunctor(ptr), name, destptr );
-  return 0;
-}
-
-template<class T, class PT> inline void* registerMemberNetworkFunctionFct( PT ptr, const std::string& name )
-{
-  BOOST_STATIC_ASSERT( sizeof(PT)<=sizeof(NetworkFunctionPointer) ); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
-  NetworkFunctionPointer destptr;
-  copyPtr( ptr, destptr );
-  new NetworkMemberFunction<T>( createFunctor(ptr), name, destptr );
-  return 0;
-}
-
-#define registerStaticNetworkFunction( functionPointer ) \
-  static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
-#define registerMemberNetworkFunction( class, function ) \
-  static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
-  // call it with functionPointer, clientID, args
-#define callStaticNetworkFunction( functionPointer, ...) \
-  { \
-    NetworkFunctionPointer p1; \
-    copyPtr( functionPointer, p1 ); \
-    FunctionCallManager::addCallStatic(NetworkFunctionStatic::getFunction(p1)->getNetworkID(), __VA_ARGS__); \
-  }
-  // call it with class, function, objectID, clientID, args
-#define callMemberNetworkFunction( class, function, objectID, ...) \
-  { \
-    NetworkFunctionPointer p1; \
-    copyPtr( &class::function, p1 ); \
-    FunctionCallManager::addCallMember(NetworkMemberFunctionBase::getFunction(p1)->getNetworkID(), objectID, __VA_ARGS__); \
-  }
-
-
-}
-
 #endif /* _NetworkFunction_H__ */
Index: code/trunk/src/libraries/network/NetworkFunctionIncludes.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkFunctionIncludes.cc	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkFunctionIncludes.cc	(revision 10624)
@@ -0,0 +1,53 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#include "NetworkFunctionIncludes.h"
+#include "NetworkFunctionManager.h"
+
+#include "core/module/StaticInitializationHandlerIncludes.h"
+#include "NetworkStaticInitializationHandler.h"
+
+namespace orxonox
+{
+    RegisterStaticInitializationHandler(NetworkStaticInitializationHandler);
+
+    void StaticallyInitializedNetworkFunction::load()
+    {
+        NetworkFunctionManager::getInstance().registerFunction(this->function_);
+    }
+
+    void StaticallyInitializedNetworkFunction::unload()
+    {
+        NetworkFunctionManager::getInstance().unregisterFunction(this->function_);
+    }
+
+    uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer)
+    {
+        return NetworkFunctionManager::getInstance().getFunctionByFunctionPointer(pointer)->getNetworkID();
+    }
+}
Index: code/trunk/src/libraries/network/NetworkFunctionIncludes.h
===================================================================
--- code/trunk/src/libraries/network/NetworkFunctionIncludes.h	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkFunctionIncludes.h	(revision 10624)
@@ -0,0 +1,119 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Oliver Scheuss
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+#ifndef _NetworkFunctionIncludes_H__
+#define _NetworkFunctionIncludes_H__
+
+#include "NetworkPrereqs.h"
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/static_assert.hpp>
+
+#include "NetworkFunction.h"
+#include "core/module/StaticallyInitializedInstance.h"
+
+#define registerStaticNetworkFunction( functionPointer ) \
+    static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_, __UNIQUE_NUMBER__ ) \
+        = (new orxonox::SI_NF(orxonox::registerStaticNetworkFunctionFct( functionPointer, #functionPointer )))->getFunction()
+
+#define registerMemberNetworkFunction( class, function ) \
+    static orxonox::NetworkFunctionBase& BOOST_PP_CAT( NETWORK_FUNCTION_##class, __UNIQUE_NUMBER__ ) \
+        = (new orxonox::SI_NF(orxonox::registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function)))->getFunction()
+
+namespace orxonox
+{
+    class _NetworkExport StaticallyInitializedNetworkFunction : public StaticallyInitializedInstance
+    {
+        public:
+            StaticallyInitializedNetworkFunction(NetworkFunctionBase* function)
+                : StaticallyInitializedInstance(StaticInitialization::NETWORK_FUNCTION)
+                , function_(function)
+            {}
+            ~StaticallyInitializedNetworkFunction() { delete function_; }
+
+            virtual void load();
+            virtual void unload();
+
+            inline NetworkFunctionBase& getFunction()
+                { return *this->function_; }
+
+        private:
+            NetworkFunctionBase* function_;
+    };
+
+    typedef StaticallyInitializedNetworkFunction SI_NF;
+
+    template<class PT>
+    inline NetworkFunctionBase* registerStaticNetworkFunctionFct(PT ptr, const std::string& name)
+    {
+        BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for static functions than defined above
+        NetworkFunctionPointer destptr;
+        copyPtr(ptr, destptr);
+        return new NetworkFunctionStatic(createFunctor(ptr), name, destptr);
+    }
+
+    template<class T, class PT>
+    inline NetworkFunctionBase* registerMemberNetworkFunctionFct(PT ptr, const std::string& name)
+    {
+        BOOST_STATIC_ASSERT(sizeof(PT) <= sizeof(NetworkFunctionPointer)); // if this fails your compiler uses bigger pointers for a specific kind of member functions than defined above
+        NetworkFunctionPointer destptr;
+        copyPtr(ptr, destptr);
+        return new NetworkMemberFunction<T>(createFunctor(ptr), name, destptr);
+    }
+
+    _NetworkExport uint32_t getNetworkIdForPointer(const NetworkFunctionPointer& pointer);
+
+    // call it with functionPointer, clientID, args
+    template<class PT>
+    void callStaticNetworkFunction(PT ptr, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
+    {
+        NetworkFunctionPointer destptr;
+        copyPtr(ptr, destptr);
+        FunctionCallManager::addCall(getNetworkIdForPointer(destptr), OBJECTID_UNKNOWN, clientID, mt1, mt2, mt3, mt4, mt5);
+    }
+
+    // call it with class::function, objectID, clientID, args
+    template<class PT>
+    void callMemberNetworkFunction(PT ptr, uint32_t objectID, uint32_t clientID, const MultiType& mt1 = MultiType::Null, const MultiType& mt2 = MultiType::Null, const MultiType& mt3 = MultiType::Null, const MultiType& mt4 = MultiType::Null, const MultiType& mt5 = MultiType::Null)
+    {
+        NetworkFunctionPointer destptr;
+        copyPtr(ptr, destptr);
+        FunctionCallManager::addCall(getNetworkIdForPointer(destptr), objectID, clientID, mt1, mt2, mt3, mt4, mt5);
+    }
+
+    template<class PT>
+    inline void copyPtr(PT ptr, NetworkFunctionPointer& destptr)
+    {
+        if (sizeof(NetworkFunctionPointer) - sizeof(PT) > 0)
+            memset((uint8_t*)&destptr + sizeof(PT), 0, sizeof(NetworkFunctionPointer) - sizeof(PT));
+        PT p2 = ptr;
+        memcpy(&destptr, &p2, sizeof(PT));
+    }
+}
+
+#endif /* _NetworkFunctionIncludes_H__ */
Index: code/trunk/src/libraries/network/NetworkFunctionManager.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkFunctionManager.cc	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkFunctionManager.cc	(revision 10624)
@@ -0,0 +1,83 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "NetworkFunctionManager.h"
+#include "NetworkFunction.h"
+
+namespace orxonox
+{
+    NetworkFunctionManager* NetworkFunctionManager::singletonPtr_s = 0;
+
+    void NetworkFunctionManager::registerFunction(NetworkFunctionBase* function)
+    {
+        this->functions_.insert(function);
+        this->nameMap_[function->getName()] = function;
+        this->idMap_[function->getNetworkID()] = function;
+        this->functorMap_[function->getPointer()] = function;
+    }
+
+    void NetworkFunctionManager::unregisterFunction(NetworkFunctionBase* function)
+    {
+        this->functions_.erase(function);
+        this->nameMap_.erase(function->getName());
+        this->idMap_.erase(function->getNetworkID());
+        this->functorMap_.erase(function->getPointer());
+    }
+
+    NetworkFunctionBase* NetworkFunctionManager::getFunctionByName(const std::string& name)
+    {
+        std::map<std::string, NetworkFunctionBase*>::iterator it = nameMap_.find(name);
+        assert(it != nameMap_.end());
+        return it->second;
+    }
+
+    NetworkFunctionBase* NetworkFunctionManager::getFunctionByFunctionPointer(const NetworkFunctionPointer& p)
+    {
+        std::map<NetworkFunctionPointer, NetworkFunctionBase*>::iterator it = functorMap_.find(p);
+        assert(it != functorMap_.end());
+        return it->second;
+    }
+
+    NetworkFunctionBase* NetworkFunctionManager::getFunctionByNetworkId(uint32_t id)
+    {
+        std::map<uint32_t, NetworkFunctionBase*>::iterator it = idMap_.find(id);
+        assert(it != idMap_.end());
+        if(it != idMap_.end())
+            return it->second;
+        else
+            return NULL;
+    }
+
+    /**
+        @brief Cleans the NetworkID map (needed on clients for correct initialization)
+    */
+    void NetworkFunctionManager::clearNetworkIDs()
+    {
+        this->idMap_.clear();
+    }
+}
Index: code/trunk/src/libraries/network/NetworkFunctionManager.h
===================================================================
--- code/trunk/src/libraries/network/NetworkFunctionManager.h	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkFunctionManager.h	(revision 10624)
@@ -0,0 +1,70 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef __NetworkFunctionManager_H__
+#define __NetworkFunctionManager_H__
+
+#include "NetworkPrereqs.h"
+
+#include <cassert>
+#include <map>
+#include <set>
+
+#include "util/Singleton.h"
+#include "NetworkFunction.h"
+
+namespace orxonox
+{
+    class _NetworkExport NetworkFunctionManager : public Singleton<NetworkFunctionManager>
+    {
+        friend class Singleton<NetworkFunctionManager>;
+
+        public:
+            void registerFunction(NetworkFunctionBase* function);
+            void unregisterFunction(NetworkFunctionBase* function);
+
+            inline const std::set<NetworkFunctionBase*>& getAllFunctions()
+                { return functions_; }
+
+            NetworkFunctionBase* getFunctionByName(const std::string& name);
+            NetworkFunctionBase* getFunctionByFunctionPointer(const NetworkFunctionPointer& p);
+            NetworkFunctionBase* getFunctionByNetworkId(uint32_t id);
+
+            void clearNetworkIDs();
+
+        private:
+            std::set<NetworkFunctionBase*> functions_;
+            std::map<std::string, NetworkFunctionBase*> nameMap_;
+            std::map<NetworkFunctionPointer, NetworkFunctionBase*> functorMap_;
+            std::map<uint32_t, NetworkFunctionBase*> idMap_;
+
+            static NetworkFunctionManager* singletonPtr_s;
+    };
+}
+
+#endif /* __NetworkFunctionManager_H__ */
Index: code/trunk/src/libraries/network/NetworkPrereqs.h
===================================================================
--- code/trunk/src/libraries/network/NetworkPrereqs.h	(revision 10622)
+++ code/trunk/src/libraries/network/NetworkPrereqs.h	(revision 10624)
@@ -97,4 +97,10 @@
     }
   }
+
+  namespace StaticInitialization
+  {
+    typedef int Type;
+    static const Type NETWORK_FUNCTION = 6;
+  }
 }
 
Index: code/trunk/src/libraries/network/NetworkStaticInitializationHandler.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkStaticInitializationHandler.cc	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkStaticInitializationHandler.cc	(revision 10624)
@@ -0,0 +1,56 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "NetworkStaticInitializationHandler.h"
+
+#include "core/module/ModuleInstance.h"
+#include "NetworkFunctionManager.h"
+
+namespace orxonox
+{
+    void NetworkStaticInitializationHandler::setupHandler()
+    {
+        // initialize singleton
+        new NetworkFunctionManager();
+    }
+
+    void NetworkStaticInitializationHandler::shutdownHandler()
+    {
+        delete &NetworkFunctionManager::getInstance();
+    }
+
+    void NetworkStaticInitializationHandler::loadModule(ModuleInstance* module)
+    {
+        module->loadAllStaticallyInitializedInstances(StaticInitialization::NETWORK_FUNCTION);
+    }
+
+    void NetworkStaticInitializationHandler::unloadModule(ModuleInstance* module)
+    {
+        module->unloadAllStaticallyInitializedInstances(StaticInitialization::NETWORK_FUNCTION);
+    }
+}
Index: code/trunk/src/libraries/network/NetworkStaticInitializationHandler.h
===================================================================
--- code/trunk/src/libraries/network/NetworkStaticInitializationHandler.h	(revision 10624)
+++ code/trunk/src/libraries/network/NetworkStaticInitializationHandler.h	(revision 10624)
@@ -0,0 +1,49 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _NetworkStaticInitializationHandler_H__
+#define _NetworkStaticInitializationHandler_H__
+
+#include "network/NetworkPrereqs.h"
+
+#include "core/module/StaticInitializationHandler.h"
+
+namespace orxonox
+{
+    class _NetworkExport NetworkStaticInitializationHandler : public StaticInitializationHandler
+    {
+        public:
+            virtual void setupHandler();
+            virtual void shutdownHandler();
+
+            virtual void loadModule(ModuleInstance* module);
+            virtual void unloadModule(ModuleInstance* module);
+    };
+}
+
+#endif /* _NetworkStaticInitializationHandler_H__ */
Index: code/trunk/src/libraries/network/WANDiscoverable.cc
===================================================================
--- code/trunk/src/libraries/network/WANDiscoverable.cc	(revision 10622)
+++ code/trunk/src/libraries/network/WANDiscoverable.cc	(revision 10624)
@@ -39,4 +39,5 @@
 namespace orxonox
 {
+  RegisterAbstractClass(WANDiscoverable).inheritsFrom<Configurable>();
 
   WANDiscoverable::WANDiscoverable(): bActive_(false)
Index: code/trunk/src/libraries/network/WANDiscovery.cc
===================================================================
--- code/trunk/src/libraries/network/WANDiscovery.cc	(revision 10622)
+++ code/trunk/src/libraries/network/WANDiscovery.cc	(revision 10624)
@@ -37,4 +37,6 @@
 namespace orxonox
 {
+  RegisterAbstractClass(WANDiscovery).inheritsFrom<Configurable>();
+
   WANDiscovery::WANDiscovery()
   {
Index: code/trunk/src/libraries/network/packet/FunctionCalls.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.cc	(revision 10624)
@@ -82,19 +82,10 @@
 }
 
-void FunctionCalls::addCallStatic( uint32_t networkID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5)
+void FunctionCalls::addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5)
 {
   assert(!isDataENetAllocated());
   
   this->functionCalls_.push(orxonox::FunctionCall());
-  this->functionCalls_.back().setCallStatic( networkID, mt1, mt2, mt3, mt4, mt5 );
-  this->currentSize_ += this->functionCalls_.back().getSize();
-}
-
-void FunctionCalls::addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1, const MultiType* mt2, const MultiType* mt3, const MultiType* mt4, const MultiType* mt5)
-{
-  assert(!isDataENetAllocated());
-  
-  this->functionCalls_.push(orxonox::FunctionCall());
-  this->functionCalls_.back().setCallMember( networkID, objectID, mt1, mt2, mt3, mt4, mt5 );
+  this->functionCalls_.back().setCall( networkID, objectID, mt1, mt2, mt3, mt4, mt5 );
   this->currentSize_ += this->functionCalls_.back().getSize();
 }
Index: code/trunk/src/libraries/network/packet/FunctionCalls.h
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionCalls.h	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionCalls.h	(revision 10624)
@@ -56,6 +56,5 @@
   virtual bool process(orxonox::Host* host);
 
-  void addCallStatic( uint32_t networkID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
-  void addCallMember( uint32_t networkID, uint32_t objectID, const MultiType* mt1=0, const MultiType* mt2=0, const MultiType* mt3=0, const MultiType* mt4=0, const MultiType* mt5=0);
+  void addCall( uint32_t networkID, uint32_t objectID, const MultiType& mt1, const MultiType& mt2, const MultiType& mt3, const MultiType& mt4, const MultiType& mt5);
   virtual bool send(orxonox::Host* host);
 private:
Index: code/trunk/src/libraries/network/packet/FunctionIDs.cc
===================================================================
--- code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 10622)
+++ code/trunk/src/libraries/network/packet/FunctionIDs.cc	(revision 10624)
@@ -37,4 +37,5 @@
 #include "core/object/ObjectList.h"
 #include "network/NetworkFunction.h"
+#include "network/NetworkFunctionManager.h"
 
 namespace orxonox {
@@ -55,9 +56,10 @@
 
   //calculate total needed size (for all strings and integers)
-  ObjectList<NetworkFunctionBase>::iterator it;
-  for(it = ObjectList<NetworkFunctionBase>::begin(); it; ++it)
+  const std::set<NetworkFunctionBase*>& set = NetworkFunctionManager::getInstance().getAllFunctions();
+  std::set<NetworkFunctionBase*>::const_iterator it;
+  for (it = set.begin(); it != set.end(); ++it)
   {
-    const std::string& functionname = it->getName();
-    networkID = it->getNetworkID();
+    const std::string& functionname = (*it)->getName();
+    networkID = (*it)->getNetworkID();
     // now push the network id and the classname to the stack
     tempQueue.push( std::pair<unsigned int, std::string>(networkID, functionname) );
@@ -126,4 +128,7 @@
   unsigned char *functionname;
 
+  //clear the map of network ids
+  NetworkFunctionManager::getInstance().clearNetworkIDs();
+
   orxout(verbose, context::packets) << "=== processing functionids: " << endl;
   std::pair<uint32_t, std::string> tempPair;
@@ -138,5 +143,5 @@
     functionname = temp+2*sizeof(uint32_t);
     orxout(internal_info, context::packets) << "processing functionid: " << networkID << " name: " << functionname << endl;
-    NetworkFunctionBase::setNetworkID((const char*)functionname, networkID);
+    NetworkFunctionManager::getInstance().getFunctionByName((const char*)functionname)->setNetworkID(networkID);
     temp += 2*sizeof(uint32_t) + stringsize;
   }
Index: code/trunk/src/libraries/network/synchronisable/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/network/synchronisable/CMakeLists.txt	(revision 10622)
+++ code/trunk/src/libraries/network/synchronisable/CMakeLists.txt	(revision 10624)
@@ -2,5 +2,4 @@
   NetworkCallbackManager.cc
   Synchronisable.cc
-  SynchronisableVariable.cc
 )
 
Index: code/trunk/src/libraries/network/synchronisable/Serialise.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 10622)
+++ code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 10624)
@@ -78,8 +78,8 @@
     }
 
-    // These functions implement loading / saving / etc. for SmartPtr<T>
+    // These functions implement loading / saving / etc. for StrongPtr<T>
 
     /** @brief returns the size of the objectID needed to synchronise the pointer */
-    template <class T> inline uint32_t returnSize( const SmartPtr<T>& )
+    template <class T> inline uint32_t returnSize( const StrongPtr<T>& )
     {
         return sizeof(uint32_t);
@@ -87,13 +87,13 @@
 
     /** @brief reads the objectID of a pointer out of the bytestream and increases the mem pointer */
-    template <class T> inline void loadAndIncrease( const SmartPtr<T>& variable, uint8_t*& mem )
+    template <class T> inline void loadAndIncrease( const StrongPtr<T>& variable, uint8_t*& mem )
     {
 //         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
-        *const_cast<typename Loki::TypeTraits<SmartPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
+        *const_cast<typename Loki::TypeTraits<StrongPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
         mem += returnSize( variable );
     }
 
     /** @brief saves the objectID of a pointer into the bytestream and increases the mem pointer */
-    template <class T> inline void saveAndIncrease( const SmartPtr<T>& variable, uint8_t*& mem )
+    template <class T> inline void saveAndIncrease( const StrongPtr<T>& variable, uint8_t*& mem )
     {
         if ( variable.get() )
@@ -105,5 +105,5 @@
 
     /** @brief checks whether the objectID of the variable is the same as in the bytestream */
-    template <class T> inline  bool checkEquality( const SmartPtr<T>& variable, uint8_t* mem )
+    template <class T> inline  bool checkEquality( const StrongPtr<T>& variable, uint8_t* mem )
     {
         if ( variable.get() )
@@ -125,5 +125,5 @@
     {
         //         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
-        *const_cast<typename Loki::TypeTraits<SmartPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
+        *const_cast<typename Loki::TypeTraits<WeakPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
         mem += returnSize( variable );
     }
Index: code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10622)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10624)
@@ -45,5 +45,5 @@
   uint8_t Synchronisable::state_=0x1; // detemines wheter we are server (default) or client
 
-  RegisterAbstractClass(Synchronisable).inheritsFrom(Class(OrxonoxInterface));
+  RegisterAbstractClass(Synchronisable).inheritsFrom<OrxonoxInterface>();
 
   /**
@@ -151,5 +151,5 @@
         for(int i = 0; i<160; i++)
             orxout(user_error, context::network) << "classid: " << i << " identifier: " << ClassByID(i) << endl;
-        orxout(user_error, context::network) << "Assertion failed: id" << endl;
+        orxout(user_error, context::network) << "Assertion failed: Could not find Identifier for ClassID " << header.getClassID() << endl;
         orxout(user_error, context::network) << "Possible reason for this error: Client received a synchronizable object whose class has no factory." << endl;
         abort();
@@ -182,10 +182,4 @@
     no->setClassID(header.getClassID());
     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;
Index: code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.cc	(revision 10622)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Oliver Scheuss
- *   Co-authors:
- *      ...
- *
- */
-
-#include "SynchronisableVariable.h"
-
-namespace orxonox{
-
-uint8_t SynchronisableVariableBase::state_ = 0;
-
-
-} //namespace
Index: code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 10622)
+++ code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 10624)
@@ -65,6 +65,4 @@
       virtual uint8_t getMode()=0;
       virtual ~SynchronisableVariableBase() {}
-    protected:
-      static uint8_t state_;
   };
 
@@ -108,8 +106,4 @@
       variable_( variable ), mode_( syncDirection ), callback_( cb )
   {
-    if ( state_ == 0x0 )
-    {
-      state_ = GameMode::isMaster() ? 0x1 : 0x2;  // set the appropriate mode here
-    }
   }
 
