Index: code/trunk/src/libraries/network/Client.cc
===================================================================
--- code/trunk/src/libraries/network/Client.cc	(revision 7266)
+++ code/trunk/src/libraries/network/Client.cc	(revision 7284)
@@ -45,4 +45,5 @@
 #include "util/Clock.h"
 #include "util/Debug.h"
+#include "util/ScopedSingletonManager.h"
 #include "synchronisable/Synchronisable.h"
 #include "packet/Chat.h"
@@ -52,5 +53,4 @@
 #include "core/CommandLineParser.h"
 #include "core/Game.h"
-#include "core/ScopedSingletonManager.h"
 
 namespace orxonox
@@ -107,5 +107,5 @@
     return ClientConnection::closeConnection();
   }
-  
+
   void Client::setDestination(const std::string& serverAddress, unsigned int port)
   {
Index: code/trunk/src/libraries/network/ClientConnection.cc
===================================================================
--- code/trunk/src/libraries/network/ClientConnection.cc	(revision 7266)
+++ code/trunk/src/libraries/network/ClientConnection.cc	(revision 7284)
@@ -149,6 +149,8 @@
   uint32_t ClientConnection::getRTT()
   {
-    assert(server_);
-    return server_->roundTripTime;
+    if (server_)
+        return server_->roundTripTime;
+    else
+        return 0;
   }
 
Index: code/trunk/src/libraries/network/GamestateManager.cc
===================================================================
--- code/trunk/src/libraries/network/GamestateManager.cc	(revision 7266)
+++ code/trunk/src/libraries/network/GamestateManager.cc	(revision 7284)
@@ -47,6 +47,6 @@
 
 #include "util/Debug.h"
-#include "core/Executor.h"
 #include "core/ThreadPool.h"
+#include "core/command/Executor.h"
 #include "ClientInformation.h"
 #include "packet/Acknowledgement.h"
Index: code/trunk/src/libraries/network/Host.cc
===================================================================
--- code/trunk/src/libraries/network/Host.cc	(revision 7266)
+++ code/trunk/src/libraries/network/Host.cc	(revision 7284)
@@ -32,11 +32,14 @@
 #include <string>
 
-#include "core/ConsoleCommand.h"
 #include "core/ObjectList.h"
+#include "core/command/ConsoleCommand.h"
 #include "ChatListener.h"
 
 namespace orxonox {
 
-  SetConsoleCommandShortcut(Host, Chat);
+  static const std::string __CC_printRTT_name = "printRTT";
+
+  SetConsoleCommand("chat", &Host::Chat);
+  SetConsoleCommand(__CC_printRTT_name, &Host::printRTT);
 
   // Host*               Host::instance_=0;
@@ -52,6 +55,5 @@
   //   assert(instance_==0);
     instances_s.push_back(this);
-    this->printRTTCC_ = createConsoleCommand( createFunctor(&Host::printRTT, this), "printRTT" );
-    CommandExecutor::addConsoleCommandShortcut( this->printRTTCC_ );
+    ModifyConsoleCommand(__CC_printRTT_name).setObject(this);
     this->bIsActive_ = false;
   }
@@ -65,6 +67,5 @@
     assert( std::find( instances_s.begin(), instances_s.end(), this )!=instances_s.end() );
     instances_s.erase(std::find( instances_s.begin(), instances_s.end(), this ));
-    if( this->printRTTCC_ )
-      delete this->printRTTCC_;
+    ModifyConsoleCommand(__CC_printRTT_name).setObject(0);
   }
 
@@ -89,5 +90,5 @@
   }
 
-  bool Host::Chat(const std::string& message)
+  void Host::Chat(const std::string& message)
   {
     if(instances_s.size()==0)
@@ -95,5 +96,5 @@
       for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
         it->incomingChat(message, 0);
-      return true;
+//      return true;
     }
     else
@@ -108,5 +109,5 @@
         }
       }
-      return result;
+//      return result;
     }
   }
@@ -139,5 +140,5 @@
     for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it)
       it->incomingChat(message, playerID);
-    
+
     bool result = true;
     for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
Index: code/trunk/src/libraries/network/Host.h
===================================================================
--- code/trunk/src/libraries/network/Host.h	(revision 7266)
+++ code/trunk/src/libraries/network/Host.h	(revision 7284)
@@ -79,5 +79,5 @@
     static void setShipID(unsigned int id){ shipID_s = id; }
     static bool isServer();
-    static bool Chat(const std::string& message);
+    static void Chat(const std::string& message);
     static bool Broadcast(const std::string& message);
     static bool incomingChat(const std::string& message, unsigned int playerID);
@@ -85,5 +85,4 @@
     bool isActive(){ return bIsActive_; }
   private:
-    ConsoleCommand* printRTTCC_;
     static uint32_t clientID_s;
     static uint32_t shipID_s;
Index: code/trunk/src/libraries/network/LANDiscovery.cc
===================================================================
--- code/trunk/src/libraries/network/LANDiscovery.cc	(revision 7266)
+++ code/trunk/src/libraries/network/LANDiscovery.cc	(revision 7284)
@@ -32,12 +32,12 @@
 #include <cstring>
 
+#include "util/ScopedSingletonManager.h"
 #include "core/CoreIncludes.h"
-#include "core/ScopedSingletonManager.h"
 
 
 namespace orxonox
-{ 
+{
   ManageScopedSingleton(LANDiscovery, ScopeID::Root, true);
-  
+
   LANDiscovery::LANDiscovery()
   {
@@ -49,5 +49,5 @@
     enet_host_destroy(this->host_);
   }
-  
+
   void LANDiscovery::discover()
   {
@@ -56,8 +56,8 @@
     enet_address_set_host(&address, "255.255.255.255");
     address.port = LAN_DISCOVERY_PORT;
-    
+
     ENetPeer* peer;
     peer = enet_host_connect(this->host_, &address, 0);
-    
+
     ENetEvent event;
     while( enet_host_service(this->host_, &event, 1000 ) )
@@ -93,5 +93,5 @@
     }
   }
-  
+
   std::string LANDiscovery::getServerListItemName(unsigned int index)
   {
@@ -101,5 +101,5 @@
       return this->servers_[index].getServerName();
   }
-  
+
   std::string LANDiscovery::getServerListItemIP(unsigned int index)
   {
@@ -109,5 +109,5 @@
       return this->servers_[index].getServerIP();
   }
-  
-  
+
+
 } // namespace orxonox
Index: code/trunk/src/libraries/network/NetworkFunction.cc
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.cc	(revision 7266)
+++ code/trunk/src/libraries/network/NetworkFunction.cc	(revision 7284)
@@ -68,5 +68,5 @@
 
 
-  NetworkFunctionStatic::NetworkFunctionStatic(FunctorStatic* functor, const std::string& name, const NetworkFunctionPointer& p):
+  NetworkFunctionStatic::NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p):
     NetworkFunctionBase(name)
   {
@@ -76,9 +76,4 @@
     NetworkFunctionStatic::getFunctorMap()[p] = this;
     NetworkFunctionStatic::getIdMap()[ this->getNetworkID() ] = this;
-  }
-
-  NetworkFunctionStatic::~NetworkFunctionStatic()
-  {
-    delete this->functor_;
   }
 
Index: code/trunk/src/libraries/network/NetworkFunction.h
===================================================================
--- code/trunk/src/libraries/network/NetworkFunction.h	(revision 7266)
+++ code/trunk/src/libraries/network/NetworkFunction.h	(revision 7284)
@@ -39,6 +39,6 @@
 #include <boost/static_assert.hpp>
 
-#include "core/Functor.h"
 #include "core/Identifier.h"
+#include "core/command/Functor.h"
 #include "FunctionCallManager.h"
 #include "synchronisable/Synchronisable.h"
@@ -102,6 +102,5 @@
 class _NetworkExport NetworkFunctionStatic: public NetworkFunctionBase {
   public:
-    NetworkFunctionStatic(FunctorStatic* functor, const std::string& name, const NetworkFunctionPointer& p);
-    ~NetworkFunctionStatic();
+    NetworkFunctionStatic(const FunctorStaticPtr& functor, const std::string& name, const NetworkFunctionPointer& p);
 
     inline void call(){ (*this->functor_)(); }
@@ -124,5 +123,5 @@
     static std::map<NetworkFunctionPointer, NetworkFunctionStatic*>& getFunctorMap();
     static std::map<uint32_t, NetworkFunctionStatic*>& getIdMap();
-    FunctorStatic* functor_;
+    FunctorStaticPtr functor_;
 
 };
@@ -155,6 +154,5 @@
 template <class T> class NetworkMemberFunction: public NetworkMemberFunctionBase {
   public:
-    NetworkMemberFunction(FunctorMember<T>* functor, const std::string& name, const NetworkFunctionPointer& p);
-    ~NetworkMemberFunction();
+    NetworkMemberFunction(const FunctorMemberPtr<T>& functor, const std::string& name, const NetworkFunctionPointer& p);
 
     inline void call(uint32_t objectID)
@@ -190,14 +188,10 @@
 
   private:
-    FunctorMember<T>* functor_;
-};
-
-template <class T> NetworkMemberFunction<T>::NetworkMemberFunction(FunctorMember<T>* functor, const std::string& name, const NetworkFunctionPointer& p):
+    FunctorMemberPtr<T> functor_;
+};
+
+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> NetworkMemberFunction<T>::~NetworkMemberFunction()
-{
-  delete this->functor_;
 }
 
Index: code/trunk/src/libraries/network/Server.cc
===================================================================
--- code/trunk/src/libraries/network/Server.cc	(revision 7266)
+++ code/trunk/src/libraries/network/Server.cc	(revision 7284)
@@ -49,5 +49,5 @@
 #include "util/Debug.h"
 #include "core/ObjectList.h"
-#include "core/Executor.h"
+#include "core/command/Executor.h"
 #include "packet/Chat.h"
 #include "packet/ClassID.h"
Index: code/trunk/src/libraries/network/synchronisable/Serialise.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 7266)
+++ code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 7284)
@@ -42,10 +42,11 @@
 #include "core/CorePrereqs.h"
 #include "core/CoreIncludes.h"
-#include "core/SmartPtr.h"
+#include "core/BaseObject.h" // remove this if circular dependencies in BaseObject/SmartPtr are fixed
+//#include "core/SmartPtr.h"
 
 namespace orxonox{
-    
+
     // These functions implement loading / saving / etc. for pointer types
-    
+
     /** @brief returns the size of the objectID needed to synchronise the pointer */
     template <class T> inline uint32_t returnSize( T*& variable )
@@ -53,5 +54,5 @@
       return sizeof(uint32_t);
     }
-    
+
     /** @brief reads the objectID of a pointer out of the bytestream and increases the mem pointer */
     template <class T> inline void loadAndIncrease( T*& variable, uint8_t*& mem )
@@ -60,5 +61,5 @@
         mem += returnSize( variable );
     }
-    
+
     /** @brief saves the objectID of a pointer into the bytestream and increases the mem pointer */
     template <class T> inline void saveAndIncrease( T*& variable, uint8_t*& mem )
@@ -70,5 +71,5 @@
         mem += returnSize( variable );
     }
-    
+
     /** @brief checks whether the objectID of the variable is the same as in the bytestream */
     template <class T> inline  bool checkEquality( T*& variable, uint8_t* mem )
@@ -79,7 +80,7 @@
             return variable == variable->getSynchronisable(*(uint32_t*)(mem));
     }
-    
+
     // These functions implement loading / saving / etc. for SmartPtr<T>
-    
+
     /** @brief returns the size of the objectID needed to synchronise the pointer */
     template <class T> inline uint32_t returnSize( const SmartPtr<T>& variable )
@@ -87,5 +88,5 @@
         return sizeof(uint32_t);
     }
-    
+
     /** @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 )
@@ -95,5 +96,5 @@
         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 )
@@ -105,5 +106,5 @@
         mem += returnSize( variable );
     }
-    
+
     /** @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 )
@@ -114,7 +115,7 @@
             return *(uint32_t*)(mem) == OBJECTID_UNKNOWN;
     }
-    
+
     // These functions implement loading / saving / etc. for WeakPtr<T>
-    
+
     /** @brief returns the size of the objectID needed to synchronise the pointer */
     template <class T> inline uint32_t returnSize( const WeakPtr<T>& variable )
@@ -122,5 +123,5 @@
         return sizeof(uint32_t);
     }
-    
+
     /** @brief reads the objectID of a pointer out of the bytestream and increases the mem pointer */
     template <class T> inline void loadAndIncrease( const WeakPtr<T>& variable, uint8_t*& mem )
@@ -130,5 +131,5 @@
         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 WeakPtr<T>& variable, uint8_t*& mem )
@@ -140,5 +141,5 @@
         mem += returnSize( variable );
     }
-    
+
     /** @brief checks whether the objectID of the variable is the same as in the bytestream */
     template <class T> inline  bool checkEquality( const WeakPtr<T>& variable, uint8_t* mem )
