Index: trunk/src/lib/network/converter.cc
===================================================================
--- trunk/src/lib/network/converter.cc	(revision 9656)
+++ trunk/src/lib/network/converter.cc	(revision 9869)
@@ -28,5 +28,5 @@
 SHELL_COMMAND_STATIC(debug, Converter, Converter::debug);
 
-
+ObjectListDefinition(Converter);
 /* using namespace std is default, this needs to be here */
 
Index: trunk/src/lib/network/converter.h
===================================================================
--- trunk/src/lib/network/converter.h	(revision 9656)
+++ trunk/src/lib/network/converter.h	(revision 9869)
@@ -24,4 +24,5 @@
 class Converter : public BaseObject
 {
+  ObjectListDeclaration(Converter);
   public:
     static byte* intToByteArray(int x);
Index: trunk/src/lib/network/data_stream.cc
===================================================================
--- trunk/src/lib/network/data_stream.cc	(revision 9656)
+++ trunk/src/lib/network/data_stream.cc	(revision 9869)
@@ -20,6 +20,5 @@
 /* using namespace std is default, this needs to be here */
 
-
-
+ObjectListDefinition(DataStream);
 
 /**
@@ -28,5 +27,4 @@
 DataStream::DataStream()
 {
-  this->setClassID(CL_DATA_STREAM, "DataStream");
   this->upBuffer = new byte[DATA_STREAM_BUFFER_SIZE];
   this->downBuffer = new byte[DATA_STREAM_BUFFER_SIZE];
@@ -38,5 +36,5 @@
 DataStream::DataStream(DataStream& inStream, DataStream& outStream)
 {
-    this->setClassID(CL_DATA_STREAM, "DataStream");
+  this->registerObject(this, DataStream::_objectList);
     this->downStream = &outStream;
     this->upStream = &inStream;
Index: trunk/src/lib/network/data_stream.h
===================================================================
--- trunk/src/lib/network/data_stream.h	(revision 9656)
+++ trunk/src/lib/network/data_stream.h	(revision 9869)
@@ -17,5 +17,6 @@
 class DataStream : public BaseObject
 {
-      public:
+  ObjectListDeclaration(DataStream);
+  public:
       DataStream();
       DataStream(DataStream& inStream, DataStream& outStream);
Index: trunk/src/lib/network/handshake.cc
===================================================================
--- trunk/src/lib/network/handshake.cc	(revision 9656)
+++ trunk/src/lib/network/handshake.cc	(revision 9869)
@@ -23,5 +23,5 @@
 
 
-
+ObjectListDefinition(Handshake);
 
 
@@ -30,5 +30,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_HANDSHAKE, "Handshake");
+  this->registerObject(this, Handshake::_objectList);
 
 
Index: trunk/src/lib/network/handshake.h
===================================================================
--- trunk/src/lib/network/handshake.h	(revision 9656)
+++ trunk/src/lib/network/handshake.h	(revision 9869)
@@ -42,5 +42,5 @@
 class Handshake : public Synchronizeable
 {
-
+  ObjectListDeclaration(Handshake);
   public:
     Handshake( int nodeType, int clientId = 0, int networkGameManagerId = 0, int messageManagerId = 0 );
Index: trunk/src/lib/network/message_manager.cc
===================================================================
--- trunk/src/lib/network/message_manager.cc	(revision 9656)
+++ trunk/src/lib/network/message_manager.cc	(revision 9869)
@@ -28,5 +28,5 @@
 
 
-
+ObjectListDefinition(MessageManager);
 MessageManager* MessageManager::singletonRef = NULL;
 
@@ -37,5 +37,5 @@
 MessageManager::MessageManager ()
 {
-  this->setClassID( CL_MESSAGE_MANAGER, "MessageManager" );
+  this->registerObject(this, MessageManager::_objectList);
   newNumber = 1;
   setSynchronized( true );
Index: trunk/src/lib/network/message_manager.h
===================================================================
--- trunk/src/lib/network/message_manager.h	(revision 9656)
+++ trunk/src/lib/network/message_manager.h	(revision 9869)
@@ -96,5 +96,5 @@
 class MessageManager : public Synchronizeable {
 
-
+  ObjectListDeclaration(MessageManager);
  public:
    inline static MessageManager * getInstance(){ if (!singletonRef) singletonRef = new MessageManager();  return singletonRef; }
Index: trunk/src/lib/network/monitor/connection_monitor.cc
===================================================================
--- trunk/src/lib/network/monitor/connection_monitor.cc	(revision 9656)
+++ trunk/src/lib/network/monitor/connection_monitor.cc	(revision 9869)
@@ -23,5 +23,5 @@
 /* using namespace std is default, this needs to be here */
 
-
+ObjectListDefinition(ConnectionMonitor);
 /**
  * constructor
@@ -31,5 +31,5 @@
 {
   /* set the class id for the base object and add ist to class list*/
-  this->setClassID(CL_CONNECTION_MONITOR, "ConnectionMonitor");
+  this->registerObject(this, ConnectionMonitor::_objectList);
 
   this->userId = userId;
Index: trunk/src/lib/network/monitor/connection_monitor.h
===================================================================
--- trunk/src/lib/network/monitor/connection_monitor.h	(revision 9656)
+++ trunk/src/lib/network/monitor/connection_monitor.h	(revision 9869)
@@ -19,4 +19,5 @@
 class ConnectionMonitor : virtual public BaseObject
 {
+  ObjectListDeclaration(ConnectionMonitor);
   public:
     ConnectionMonitor( int userId );
Index: trunk/src/lib/network/monitor/network_monitor.cc
===================================================================
--- trunk/src/lib/network/monitor/network_monitor.cc	(revision 9656)
+++ trunk/src/lib/network/monitor/network_monitor.cc	(revision 9869)
@@ -37,4 +37,5 @@
 SHELL_COMMAND(debug, NetworkMonitor, debug);
 
+ObjectListDefinition(NetworkMonitor);
 
 
@@ -45,5 +46,5 @@
   : Synchronizeable()
 {
-  this->setClassID(CL_NETWORK_MONITOR, "NetworkMonitor");
+  this->registerObject(this, NetworkMonitor::_objectList);
 
   this->networkStream = networkStream;
Index: trunk/src/lib/network/monitor/network_monitor.h
===================================================================
--- trunk/src/lib/network/monitor/network_monitor.h	(revision 9656)
+++ trunk/src/lib/network/monitor/network_monitor.h	(revision 9869)
@@ -27,5 +27,5 @@
 class NetworkMonitor : public Synchronizeable
 {
-
+  ObjectListDeclaration(NetworkMonitor);
   public:
     NetworkMonitor(NetworkStream* networkStream);
Index: trunk/src/lib/network/monitor/network_stats_widget.cc
===================================================================
--- trunk/src/lib/network/monitor/network_stats_widget.cc	(revision 9656)
+++ trunk/src/lib/network/monitor/network_stats_widget.cc	(revision 9869)
@@ -20,9 +20,9 @@
 #include "peer_info.h"
 
+#include "loading/resource_manager.h"
+
 #include "multi_type.h"
 
 #include "shell_command.h"
-
-#include "loading/resource_manager.h"
 
 // this fcuk does not work!
@@ -30,5 +30,4 @@
 // ->setAlias("ProxyGui");
 
-
 HostWidget::HostWidget(const std::string& name, const IP& ip)
     : GLGuiBox(OrxGui::Horizontal)
@@ -57,5 +56,5 @@
 {
   if(_font == NULL)
-    _font = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/arial.ttf", 20);
+    _font = new Font(Resources::ResourceManager::getInstance()->mainGlobalPath().name() + "/fonts/arial.ttf", 20);
 
   //this->_name.setFont(*_font);
@@ -211,4 +210,6 @@
 //======================================================//
 
+
+ObjectListDefinition(NetworkStatsWidget);
 /**
  * @brief standard constructor
@@ -273,16 +274,13 @@
 NetworkStatsWidget* NetworkStatsWidget::_statsWidget = NULL;
 
-#include "class_list.h"
-
 void NetworkStatsWidget::toggleGUI()
 {
-  BaseObject* bo = NULL;
-  const std::list<BaseObject*>* ls = ClassList::getList(CL_NETWORK_MONITOR);
-  if (ls != NULL && !ls->empty())
-    bo = ls->front();
-
-  if (bo != NULL && NetworkStatsWidget::_statsWidget == NULL)
-  {
-    NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(dynamic_cast<NetworkMonitor*> (bo));
+  NetworkMonitor* monitor;
+  if (!NetworkMonitor::objectList().empty())
+    monitor = NetworkMonitor::objectList().front();
+
+  if (monitor != NULL && NetworkStatsWidget::_statsWidget == NULL)
+  {
+    NetworkStatsWidget::_statsWidget = new NetworkStatsWidget(monitor);
     NetworkStatsWidget::_statsWidget->showAll();
   }
Index: trunk/src/lib/network/monitor/network_stats_widget.h
===================================================================
--- trunk/src/lib/network/monitor/network_stats_widget.h	(revision 9656)
+++ trunk/src/lib/network/monitor/network_stats_widget.h	(revision 9869)
@@ -81,4 +81,5 @@
 class NetworkStatsWidget : public OrxGui::GLGuiFixedpositionBox
 {
+  ObjectListDeclaration(NetworkStatsWidget);
   public:
     static void toggleGUI();
Index: trunk/src/lib/network/network_game_manager.cc
===================================================================
--- trunk/src/lib/network/network_game_manager.cc	(revision 9656)
+++ trunk/src/lib/network/network_game_manager.cc	(revision 9869)
@@ -23,5 +23,4 @@
 #include "util/loading/factory.h"
 #include "state.h"
-#include "class_list.h"
 #include "debug.h"
 
@@ -43,9 +42,9 @@
 #include "multiplayer_team_deathmatch.h"
 
-#include "preferences.h"
-
-
-
-
+#include "parser/preferences/preferences.h"
+
+
+
+ObjectListDefinition(NetworkGameManager);
 NetworkGameManager* NetworkGameManager::singletonRef = NULL;
 
@@ -59,5 +58,5 @@
 
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_GAME_MANAGER, "NetworkGameManager");
+  this->registerObject(this, NetworkGameManager::_objectList);
 
   this->setSynchronized(true);
@@ -93,10 +92,10 @@
   assert( SharedNetworkData::getInstance()->isMasterServer());
   assert( State::getGameRules() );
-  assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
+  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
 
   NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
 
   int          team = rules.getTeamForNewUser();
-  ClassID      playableClassId = rules.getPlayableClassId( userId, team );
+  ClassID   playableClassId = rules.getPlayableClassId( userId, team );
   std::string  playableModel = rules.getPlayableModelFileName( userId, team, playableClassId );
   std::string  playableTexture = rules.getPlayableModelFileName( userId, team, playableClassId );
@@ -106,5 +105,5 @@
 
   assert( bo != NULL );
-  assert( bo->isA( CL_PLAYABLE ) );
+  assert( bo->isA( Playable::staticClassID()) );
 
   Playable & playable = *(dynamic_cast<Playable*>(bo));
@@ -131,5 +130,5 @@
     stats->setNickName( Preferences::getInstance()->getString( "multiplayer", "nickname", "Server" ) );
 
-  if ( rules.isA( CL_MULTIPLAYER_TEAM_DEATHMATCH ) )
+  if ( rules.isA( MultiplayerTeamDeathmatch::staticClassID()) )
     dynamic_cast<MultiplayerTeamDeathmatch*>(&rules)->respawnPlayable( &playable, team, 0.0f );
 
@@ -187,11 +186,11 @@
   }
 
-  const std::list<BaseObject*> * list = ClassList::getList( CL_SYNCHRONIZEABLE );
-
-  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
-  {
-    if ( dynamic_cast<Synchronizeable*>(*it)->getUniqueID() == uniqueId )
+  for (ObjectList<Synchronizeable>::const_iterator it = Synchronizeable::objectList().begin();
+       it != Synchronizeable::objectList().end();
+      ++it)
+  {
+    if ( (*it)->getUniqueID() == uniqueId )
     {
-      if ( (*it)->isA(CL_PLAYABLE) )
+      if ( (*it)->isA(Playable::staticClassID()) )
       {
         getInstance()->playablesToDelete.push_back( dynamic_cast<Playable*>(*it) );
@@ -199,5 +198,5 @@
       }
 
-      delete dynamic_cast<Synchronizeable*>(*it);
+      delete (*it);
       return true;
     }
@@ -297,7 +296,5 @@
     if ( State::getPlayer()->getPlayable() != *it )
     {
-      const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-
-      if ( list && std::find( list->begin(), list->end(), *it ) != list->end() )
+      if ( std::find( Playable::objectList().begin(), Playable::objectList().end(), *it ) != Playable::objectList().end() )
       {
         PRINTF(0)("Delete unused playable: %s owner: %d\n", (*it)->getClassCName(), (*it)->getOwner() );
@@ -324,5 +321,5 @@
 
   assert( State::getGameRules() );
-  assert( State::getGameRules()->isA( CL_NETWORK_GAME_RULES ) );
+  assert( State::getGameRules()->isA( NetworkGameRules::staticClassID()) );
 
   NetworkGameRules & rules = *(dynamic_cast<NetworkGameRules*>(State::getGameRules()));
Index: trunk/src/lib/network/network_game_manager.h
===================================================================
--- trunk/src/lib/network/network_game_manager.h	(revision 9656)
+++ trunk/src/lib/network/network_game_manager.h	(revision 9869)
@@ -33,9 +33,9 @@
 class NetworkGameManager: public Synchronizeable
 {
-
+  ObjectListDeclaration(NetworkGameManager);
   public:
     virtual ~NetworkGameManager();
 
-    static NetworkGameManager* NetworkGameManager::getInstance()
+    static NetworkGameManager* getInstance()
     { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; }
 
Index: trunk/src/lib/network/network_log.cc
===================================================================
--- trunk/src/lib/network/network_log.cc	(revision 9656)
+++ trunk/src/lib/network/network_log.cc	(revision 9869)
@@ -15,4 +15,5 @@
 
 #include "network_log.h"
+#include <cassert>
 
 /**
@@ -53,11 +54,11 @@
     return false;
   }
-  
+
   listensock = SDLNet_TCP_Open( &ip );
-  
+
   if( !listensock ) {
     PRINT(1)( "SDLNet_TCP_Open: %s\n", SDLNet_GetError() );
     return false;
-  } 
+  }
 
   return true;
@@ -71,9 +72,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
- 
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   printfnet();
 }
@@ -85,5 +86,5 @@
 {
   TCPsocket newSock = SDLNet_TCP_Accept( listensock );
-  
+
   if ( newSock )
     sockets.push_back( newSock );
@@ -97,9 +98,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(0)( buf );
   printfnet();
@@ -114,9 +115,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(1)( buf );
   printfnet();
@@ -131,9 +132,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(2)( buf );
   printfnet();
@@ -148,9 +149,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(3)( buf );
   printfnet();
@@ -165,9 +166,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(4)( buf );
   printfnet();
@@ -182,9 +183,9 @@
   va_list ap;
   va_start( ap, format );
-  
-  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
-  
-  va_end( ap );
-  
+
+  assert( vsnprintf( buf, NETWORK_LOG_BUFLEN, format, ap ) < NETWORK_LOG_BUFLEN );
+
+  va_end( ap );
+
   PRINT(5)( buf );
   printfnet();
@@ -200,5 +201,5 @@
   if ( !listensock )
     return;
-  
+
   acceptNewConnections();
 
@@ -213,5 +214,5 @@
       continue;
     }
-    
+
     it++;
   }
Index: trunk/src/lib/network/network_log.h
===================================================================
--- trunk/src/lib/network/network_log.h	(revision 9656)
+++ trunk/src/lib/network/network_log.h	(revision 9869)
@@ -38,5 +38,4 @@
 class NetworkLog
 {
-
   public:
     virtual ~NetworkLog(void);
Index: trunk/src/lib/network/network_manager.cc
===================================================================
--- trunk/src/lib/network/network_manager.cc	(revision 9656)
+++ trunk/src/lib/network/network_manager.cc	(revision 9869)
@@ -20,5 +20,4 @@
 #define DEBUG_MODULE_NETWORK
 
-#include "class_list.h"
 #include "debug.h"
 #include "shell_command.h"
@@ -28,5 +27,5 @@
 #include "shared_network_data.h"
 #include "network_stream.h"
-#include "preferences.h"
+#include "parser/preferences/preferences.h"
 #include "network_log.h"
 #include "network_game_manager.h"
@@ -41,5 +40,5 @@
 
 
-
+ObjectListDefinition(NetworkManager);
 NetworkManager* NetworkManager::singletonRef = NULL;
 
@@ -50,5 +49,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_MANAGER, "NetworkManager");
+  this->registerObject(this, NetworkManager::_objectList);
   PRINTF(0)("START\n");
 
Index: trunk/src/lib/network/network_manager.h
===================================================================
--- trunk/src/lib/network/network_manager.h	(revision 9656)
+++ trunk/src/lib/network/network_manager.h	(revision 9869)
@@ -25,5 +25,5 @@
 class NetworkManager : public BaseObject
 {
-
+  ObjectListDeclaration(NetworkManager);
   public:
 
Index: trunk/src/lib/network/network_protocol.cc
===================================================================
--- trunk/src/lib/network/network_protocol.cc	(revision 9656)
+++ trunk/src/lib/network/network_protocol.cc	(revision 9869)
@@ -35,5 +35,5 @@
 
 
-
+ObjectListDefinition(NetworkProtocol);
 /**
   standard constructor
@@ -42,5 +42,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_PROTOCOL, "NetworkProtocol");
+  this->registerObject(this, NetworkProtocol::_objectList);
   this->headerLength = INTSIZE+FLOATSIZE;
 }
Index: trunk/src/lib/network/network_protocol.h
===================================================================
--- trunk/src/lib/network/network_protocol.h	(revision 9656)
+++ trunk/src/lib/network/network_protocol.h	(revision 9869)
@@ -25,4 +25,5 @@
 class NetworkProtocol : virtual public BaseObject
 {
+  ObjectListDeclaration(NetworkProtocol);
   public:
     NetworkProtocol();
Index: trunk/src/lib/network/network_socket.cc
===================================================================
--- trunk/src/lib/network/network_socket.cc	(revision 9656)
+++ trunk/src/lib/network/network_socket.cc	(revision 9869)
@@ -24,7 +24,5 @@
 #include "network_socket.h"
 
-/* header for debug output */
-#include "debug.h"
-
+ObjectListDefinition(NetworkSocket);
 /**
  * Default constructor
Index: trunk/src/lib/network/network_socket.h
===================================================================
--- trunk/src/lib/network/network_socket.h	(revision 9656)
+++ trunk/src/lib/network/network_socket.h	(revision 9869)
@@ -17,4 +17,5 @@
 class NetworkSocket : public BaseObject
 {
+  ObjectListDeclaration(NetworkSocket);
   public:
     NetworkSocket();
Index: trunk/src/lib/network/network_stream.cc
===================================================================
--- trunk/src/lib/network/network_stream.cc	(revision 9656)
+++ trunk/src/lib/network/network_stream.cc	(revision 9869)
@@ -33,19 +33,15 @@
 #include "shared_network_data.h"
 #include "message_manager.h"
-#include "preferences.h"
+#include "parser/preferences/preferences.h"
 #include "zip.h"
 
-#include "src/lib/util/loading/resource_manager.h"
-
 #include "network_log.h"
 
 #include "player_stats.h"
 
-#include "lib/util/loading/factory.h"
+#include "loading/factory.h"
+#include "loading/resource_manager.h"
 
 #include "debug.h"
-#include "class_list.h"
-#include <algorithm>
-
 
 #include "network_stream.h"
@@ -57,5 +53,5 @@
 #define PACKAGE_SIZE  256
 
-
+ObjectListDefinition(NetworkStream);
 /**
  * empty constructor
@@ -118,5 +114,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_STREAM, "NetworkStream");
+  this->registerObject(this, NetworkStream::_objectList);
   this->clientSocket = NULL;
   this->clientSoftSocket = NULL;
@@ -970,5 +966,5 @@
 
       // if handshake not finished only sync handshake
-      if ( peer->second.handshake && sync.getLeafClassID() != CL_HANDSHAKE )
+      if ( peer->second.handshake && Handshake::staticClassID() != sync.getLeafClassID())
         continue;
 
@@ -976,10 +972,10 @@
       if ( ( SharedNetworkData::getInstance()->isMasterServer() ||
              SharedNetworkData::getInstance()->isProxyServerActive() &&  peer->second.isClient())
-             && sync.getLeafClassID() == CL_HANDSHAKE && sync.getUniqueID() != peer->second.userId )
+	     && Handshake::staticClassID() == sync.getLeafClassID() && sync.getUniqueID() != peer->second.userId )
         continue;
 
       /* list of synchronizeables that will never be synchronized over the network: */
       // do not sync null parent
-      if ( sync.getLeafClassID() == CL_NULL_PARENT )
+      if ( NullParent::staticClassID() == sync.getLeafClassID())
         continue;
 
@@ -1190,5 +1186,5 @@
           /* These are some small exeptions in creation: Not all objects can/should be created via Factory */
           /* Exception 1: NullParent */
-          if( leafClassId == CL_NULL_PARENT || leafClassId == CL_SYNCHRONIZEABLE || leafClassId == CL_NETWORK_GAME_MANAGER )
+	  if( NullParent::staticClassID() == leafClassId || Synchronizeable::staticClassID() == leafClassId || NetworkGameManager::staticClassID() == leafClassId)
           {
             PRINTF(1)("Don't create Object with ID %x, ignored!\n", (int)leafClassId);
@@ -1197,5 +1193,5 @@
           }
           else
-            b = Factory::fabricate( (ClassID)leafClassId );
+	    ; /// FIXME CLASS_ID :: b = Factory::fabricate( leafClassId );
 
           if ( !b )
@@ -1206,5 +1202,5 @@
           }
 
-          if ( b->isA(CL_SYNCHRONIZEABLE) )
+	  if ( b->isA(Synchronizeable::staticClassID()) )
           {
             sync = dynamic_cast<Synchronizeable*>(b);
@@ -1303,5 +1299,5 @@
     length = remainingBytesToWriteToDict;
 
-  std::string fileName = ResourceManager::getInstance()->getDataDir();
+  std::string fileName = Resources::ResourceManager::getInstance()->mainGlobalPath().name();
   fileName += "/dicts/newdict";
 
Index: trunk/src/lib/network/network_stream.h
===================================================================
--- trunk/src/lib/network/network_stream.h	(revision 9656)
+++ trunk/src/lib/network/network_stream.h	(revision 9869)
@@ -33,5 +33,5 @@
 class NetworkStream : public DataStream
 {
-
+  ObjectListDeclaration(NetworkStream);
   public:
     NetworkStream();
Index: trunk/src/lib/network/player_stats.cc
===================================================================
--- trunk/src/lib/network/player_stats.cc	(revision 9656)
+++ trunk/src/lib/network/player_stats.cc	(revision 9869)
@@ -16,8 +16,8 @@
 #include "player_stats.h"
 
-#include "class_list.h"
 #include "src/lib/util/loading/factory.h"
 
 #include "player.h"
+#include "playable.h"
 #include "state.h"
 #include "shared_network_data.h"
@@ -25,12 +25,13 @@
 #include "converter.h"
 
-#include "preferences.h"
+#include "parser/preferences/preferences.h"
 
 #include "debug.h"
 #include "shell_command.h"
 
-
-CREATE_FACTORY(PlayerStats, CL_PLAYER_STATS);
-
+#include "class_id_DEPRECATED.h"
+
+ObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS);
+CREATE_FACTORY(PlayerStats);
 
 /**
@@ -54,5 +55,5 @@
 void PlayerStats::init( )
 {
-  this->setClassID( CL_PLAYER_STATS, "PlayerStats" );
+  this->registerObject(this, PlayerStats::_objectList);
 
   this->assignedUserId = 0;
@@ -122,21 +123,11 @@
 PlayerStats * PlayerStats::getStats( int userId )
 {
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-
-  if ( !list )
-  {
-    return NULL;
-  }
-
-  for ( std::list<BaseObject*>::const_iterator it = list->
-        begin();
-        it != list->end();
-        it++ )
-  {
-
-
-    if ( dynamic_cast<PlayerStats*>(*it)->getAssignedUserId() == userId )
+  for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    if ( (*it)->getAssignedUserId() == userId )
     {
-      return dynamic_cast<PlayerStats*>(*it);
+      return (*it);
     }
   }
@@ -150,22 +141,12 @@
 void PlayerStats::setPlayableUniqueId( int uniqueId )
 {
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
-
-  if ( !list )
-  {
-    this->playableUniqueId = uniqueId;
-    return;
-  }
-
   this->playable = NULL;
-  for ( std::list<BaseObject*>::const_iterator it = list->
-        begin();
-        it != list->end();
-        it++ )
-  {
-    if ( dynamic_cast<Playable*>(*it)->
-         getUniqueID() == uniqueId )
+  for (ObjectList<Playable>::const_iterator it = Playable::objectList().begin();
+       it != Playable::objectList().end();
+       ++it)
+  {
+    if ( (*it)->getUniqueID() == uniqueId )
     {
-      this->playable = dynamic_cast<Playable*>(*it);
+      this->playable = (*it);
       //TODO when OM_PLAYERS is ticked add line:
       //this->playable->toList( OM_PLAYERS );
@@ -174,6 +155,5 @@
   }
 
-  if ( this->playable && this->assignedUserId == SharedNetworkData::getInstance()
-       ->getHostID() )
+  if ( this->playable && this->assignedUserId == SharedNetworkData::getInstance()->getHostID() )
   {
     State::getPlayer()->setPlayable( this->playable );
@@ -272,8 +252,7 @@
 void PlayerStats::deleteAllPlayerStats( )
 {
-  const std::list<BaseObject*> * list;
-
-  while ( (list  = ClassList::getList( CL_PLAYER_STATS )) != NULL && list->begin() != list->end() )
-    delete *list->begin();
+
+  while(!PlayerStats::objectList().empty())
+    delete PlayerStats::objectList().front();
 }
 
@@ -287,17 +266,9 @@
   ScoreList result;
 
-  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYER_STATS );
-
-  if ( !list )
-  {
-    return result;
-  }
-
-  for ( std::list<BaseObject*>::const_iterator it = list->
-        begin();
-        it != list->end();
-        it++ )
-  {
-    PlayerStats & stats = *dynamic_cast<PlayerStats*>(*it);
+  for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+       it != PlayerStats::objectList().end();
+       ++it)
+  {
+    PlayerStats& stats = *(*it);
 
     TeamScoreList::iterator it = result[stats.getTeamId()].begin();
Index: trunk/src/lib/network/player_stats.h
===================================================================
--- trunk/src/lib/network/player_stats.h	(revision 9656)
+++ trunk/src/lib/network/player_stats.h	(revision 9869)
@@ -36,5 +36,5 @@
 class PlayerStats : public Synchronizeable
 {
-
+  ObjectListDeclaration(PlayerStats);
   public:
     PlayerStats( const TiXmlElement* root = NULL );
@@ -58,5 +58,5 @@
 
     inline int getPlayableClassId(){ return playableClassId; }
-    void setPlayableClassId( int classId ){ this->playableClassId = classId; };
+    void setPlayableClassId( const ClassID& classId ){ this->playableClassId = classId.id(); };
 
     inline int getPlayableUniqueId(){ return playableUniqueId; }
Index: trunk/src/lib/network/proxy/network_settings.cc
===================================================================
--- trunk/src/lib/network/proxy/network_settings.cc	(revision 9656)
+++ trunk/src/lib/network/proxy/network_settings.cc	(revision 9869)
@@ -21,10 +21,10 @@
 #include "shared_network_data.h"
 
+#include "loading/load_param.h"
 #include "loading/resource_manager.h"
-#include "loading/load_param.h"
-
 #include "debug.h"
 
 
+ObjectListDefinition(NetworkSettings);
 
 NetworkSettings* NetworkSettings::singletonRef = NULL;
@@ -36,5 +36,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_SETTINGS, "NetworkSettings");
+  this->registerObject(this, NetworkSettings::_objectList);
 
   // suggest a good standard max players value
@@ -64,5 +64,5 @@
 void NetworkSettings::loadData()
 {
-  std::string fileName = ResourceManager::getInstance()->getDataDir();
+  std::string fileName = Resources::ResourceManager::getInstance()->mainGlobalPath().name();
   fileName += "configs/network_settings.conf";
 
Index: trunk/src/lib/network/proxy/network_settings.h
===================================================================
--- trunk/src/lib/network/proxy/network_settings.h	(revision 9656)
+++ trunk/src/lib/network/proxy/network_settings.h	(revision 9869)
@@ -24,5 +24,5 @@
 class NetworkSettings : public BaseObject
 {
-
+  ObjectListDeclaration(NetworkSettings);
   public:
     inline static NetworkSettings* getInstance() { if (!NetworkSettings::singletonRef) NetworkSettings::singletonRef = new NetworkSettings();
Index: trunk/src/lib/network/proxy/proxy_control.cc
===================================================================
--- trunk/src/lib/network/proxy/proxy_control.cc	(revision 9656)
+++ trunk/src/lib/network/proxy/proxy_control.cc	(revision 9869)
@@ -15,5 +15,4 @@
 #include "proxy_control.h"
 
-#include "class_list.h"
 #include "shell_command.h"
 
@@ -28,5 +27,5 @@
 #include "converter.h"
 
-#include "preferences.h"
+#include "parser/preferences/preferences.h"
 
 #include "debug.h"
@@ -41,4 +40,5 @@
 
 SHELL_COMMAND(forceReconnect, ProxyControl, forceReconnectionShell);
+ObjectListDefinition(ProxyControl);
 
 /**
@@ -47,5 +47,5 @@
 ProxyControl::ProxyControl()
 {
-  this->setClassID( CL_PROXY_CONTROL, "ProxyControl" );
+  this->registerObject(this, ProxyControl::_objectList);
 
   this->setSynchronized(false);
Index: trunk/src/lib/network/proxy/proxy_control.h
===================================================================
--- trunk/src/lib/network/proxy/proxy_control.h	(revision 9656)
+++ trunk/src/lib/network/proxy/proxy_control.h	(revision 9869)
@@ -30,5 +30,5 @@
 class ProxyControl : public Synchronizeable
 {
-
+  ObjectListDeclaration(ProxyControl);
   public:
     inline static ProxyControl* getInstance() { if (!ProxyControl::singletonRef) ProxyControl::singletonRef = new ProxyControl();
Index: trunk/src/lib/network/server_socket.cc
===================================================================
--- trunk/src/lib/network/server_socket.cc	(revision 9656)
+++ trunk/src/lib/network/server_socket.cc	(revision 9869)
@@ -23,8 +23,5 @@
 #include "server_socket.h"
 
-/* header for debug output */
-#include "debug.h"
-
-
+ObjectListDefinition(ServerSocket);
 /**
  * constructor
Index: trunk/src/lib/network/server_socket.h
===================================================================
--- trunk/src/lib/network/server_socket.h	(revision 9656)
+++ trunk/src/lib/network/server_socket.h	(revision 9869)
@@ -19,4 +19,5 @@
 class ServerSocket : public BaseObject
 {
+  ObjectListDeclaration(ServerSocket);
   public:
     ServerSocket( int port);
Index: trunk/src/lib/network/shared_network_data.cc
===================================================================
--- trunk/src/lib/network/shared_network_data.cc	(revision 9656)
+++ trunk/src/lib/network/shared_network_data.cc	(revision 9869)
@@ -25,5 +25,5 @@
 
 
-
+ObjectListDefinition(SharedNetworkData);
 SharedNetworkData* SharedNetworkData::singletonRef = NULL;
 
@@ -34,5 +34,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_SHARED_NETWORK_DATA, "SharedNetworkData");
+  this->registerObject(this, SharedNetworkData::_objectList);
 
   this->nodeType = NET_MASTER_SERVER;
Index: trunk/src/lib/network/shared_network_data.h
===================================================================
--- trunk/src/lib/network/shared_network_data.h	(revision 9656)
+++ trunk/src/lib/network/shared_network_data.h	(revision 9869)
@@ -22,5 +22,5 @@
 class SharedNetworkData : public BaseObject
 {
-
+  ObjectListDeclaration(SharedNetworkData);
   public:
     inline static SharedNetworkData* getInstance() { if (!SharedNetworkData::singletonRef) SharedNetworkData::singletonRef = new SharedNetworkData();
Index: trunk/src/lib/network/synchronizeable.cc
===================================================================
--- trunk/src/lib/network/synchronizeable.cc	(revision 9656)
+++ trunk/src/lib/network/synchronizeable.cc	(revision 9869)
@@ -32,4 +32,5 @@
 
 
+ObjectListDefinition(Synchronizeable);
 
 /**
@@ -38,5 +39,5 @@
 Synchronizeable::Synchronizeable()
 {
-  this->setClassID(CL_SYNCHRONIZEABLE, "Synchronizeable");
+  this->registerObject(this, Synchronizeable::_objectList);
   this->owner = 0;
 //   this->setIsServer(SharedNetworkData::getInstance()->getHostID() == 0);
@@ -74,5 +75,5 @@
     // remove the message manager only by the server
     if ( (SharedNetworkData::getInstance()->isMasterServer() )
-           && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( CL_MESSAGE_MANAGER ) )
+	  && this->beSynchronized() && this->getUniqueID() > 0 && !this->isA( MessageManager::staticClassID() ) )
       NetworkGameManager::getInstance()->removeSynchronizeable( this->getUniqueID() );
   }
Index: trunk/src/lib/network/synchronizeable.h
===================================================================
--- trunk/src/lib/network/synchronizeable.h	(revision 9656)
+++ trunk/src/lib/network/synchronizeable.h	(revision 9869)
@@ -41,4 +41,5 @@
 class Synchronizeable : virtual public BaseObject
 {
+  ObjectListDeclaration(Synchronizeable);
 
   public:
Index: trunk/src/lib/network/tcp_server_socket.cc
===================================================================
--- trunk/src/lib/network/tcp_server_socket.cc	(revision 9656)
+++ trunk/src/lib/network/tcp_server_socket.cc	(revision 9869)
@@ -26,4 +26,5 @@
 #include "debug.h"
 
+ObjectListDefinition(TcpServerSocket);
 TcpServerSocket::TcpServerSocket( int port ) : ServerSocket( port )
 {
@@ -48,5 +49,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_SERVER_SOCKET, "TcpServerSocket");
+  this->registerObject(this, TcpServerSocket::_objectList);
 
   terminateThread = false;
Index: trunk/src/lib/network/tcp_server_socket.h
===================================================================
--- trunk/src/lib/network/tcp_server_socket.h	(revision 9656)
+++ trunk/src/lib/network/tcp_server_socket.h	(revision 9869)
@@ -19,4 +19,5 @@
 class TcpServerSocket : public ServerSocket
 {
+  ObjectListDeclaration(TcpServerSocket);
   public:
     TcpServerSocket( int port );
Index: trunk/src/lib/network/tcp_socket.cc
===================================================================
--- trunk/src/lib/network/tcp_socket.cc	(revision 9656)
+++ trunk/src/lib/network/tcp_socket.cc	(revision 9869)
@@ -30,4 +30,5 @@
 #include "debug.h"
 
+ObjectListDefinition(TcpSocket);
 /**
  * Default constructor
@@ -60,5 +61,5 @@
 {
   /* set the class id for the base object */
-  this->setClassID(CL_NETWORK_SOCKET, "TcpSocket");
+  this->registerObject(this, TcpSocket::_objectList);
 
   tcpSocket = NULL;
@@ -122,7 +123,7 @@
 {
   IPaddress ip;
-  
-  bOk = true; 
-  
+
+  bOk = true;
+
   if ( SDLNet_ResolveHost( &ip, host.c_str(), port ) != 0 )
   {
@@ -131,5 +132,5 @@
     return;
   }
-  
+
   //check if not already connected or listening
   if (tcpSocket)
@@ -345,7 +346,7 @@
 }
 #endif
-  
+
   PRINTF(0)("QUIT READ THREAD\n");
-  
+
   return 0;
 }
@@ -425,5 +426,5 @@
 
   return 0;
-  
+
 }
 
Index: trunk/src/lib/network/tcp_socket.h
===================================================================
--- trunk/src/lib/network/tcp_socket.h	(revision 9656)
+++ trunk/src/lib/network/tcp_socket.h	(revision 9869)
@@ -40,4 +40,5 @@
 class TcpSocket : public NetworkSocket
 {
+  ObjectListDeclaration(TcpSocket);
   public:
     TcpSocket();
Index: trunk/src/lib/network/udp_broadcast.cc
===================================================================
--- trunk/src/lib/network/udp_broadcast.cc	(revision 9656)
+++ trunk/src/lib/network/udp_broadcast.cc	(revision 9869)
@@ -26,11 +26,11 @@
   this->port = 0;
   packet = SDLNet_AllocPacket( BROADCAST_PACKET_SIZE );
-  
-  if ( !packet ) 
+
+  if ( !packet )
   {
     printf( "SDLNet_AllocPacket: %s\n", SDLNet_GetError() );
     assert( packet );
   }
-  
+
   this->socket = NULL;
 }
@@ -47,5 +47,5 @@
     this->packet = NULL;
   }
-  
+
   if ( this->socket )
   {
@@ -53,10 +53,10 @@
     this->socket = NULL;
   }
-  
+
 }
 
 /**
  * listen for incoming broadcast packets
- * @param port port to listen on 
+ * @param port port to listen on
  * @return true on success
  */
@@ -74,5 +74,5 @@
 {
   this->port = port;
-  
+
   return true;
 }
@@ -80,5 +80,5 @@
 /**
  * send packet
- * @param data data to send 
+ * @param data data to send
  * @param length length of data
  * @param ip if ip == NULL broadcast is used
Index: trunk/src/lib/network/udp_broadcast.h
===================================================================
--- trunk/src/lib/network/udp_broadcast.h	(revision 9656)
+++ trunk/src/lib/network/udp_broadcast.h	(revision 9869)
@@ -15,9 +15,8 @@
 class UdpBroadcast
 {
-
   public:
     UdpBroadcast();
     virtual ~UdpBroadcast();
-    
+
     bool listen( int port );
     bool open( int port );
Index: trunk/src/lib/network/udp_server_socket.cc
===================================================================
--- trunk/src/lib/network/udp_server_socket.cc	(revision 9656)
+++ trunk/src/lib/network/udp_server_socket.cc	(revision 9869)
@@ -18,5 +18,5 @@
 
 
-
+ObjectListDefinition(UdpServerSocket);
 /**
  * constructor
Index: trunk/src/lib/network/udp_server_socket.h
===================================================================
--- trunk/src/lib/network/udp_server_socket.h	(revision 9656)
+++ trunk/src/lib/network/udp_server_socket.h	(revision 9869)
@@ -50,4 +50,5 @@
 class UdpServerSocket : public ServerSocket
 {
+  ObjectListDeclaration(UdpServerSocket);
   public:
     UdpServerSocket( int port);
Index: trunk/src/lib/network/udp_socket.cc
===================================================================
--- trunk/src/lib/network/udp_socket.cc	(revision 9656)
+++ trunk/src/lib/network/udp_socket.cc	(revision 9869)
@@ -18,4 +18,5 @@
 #include "debug.h"
 
+ObjectListDefinition(UdpSocket);
 
 void UdpSocket::init( )
Index: trunk/src/lib/network/udp_socket.h
===================================================================
--- trunk/src/lib/network/udp_socket.h	(revision 9656)
+++ trunk/src/lib/network/udp_socket.h	(revision 9869)
@@ -24,4 +24,5 @@
 class UdpSocket : public NetworkSocket
 {
+  ObjectListDeclaration(UdpSocket);
   public:
     UdpSocket();
Index: trunk/src/lib/network/zip.cc
===================================================================
--- trunk/src/lib/network/zip.cc	(revision 9656)
+++ trunk/src/lib/network/zip.cc	(revision 9869)
@@ -15,6 +15,5 @@
 
 #include "zip.h"
-
-#include "src/lib/util/loading/resource_manager.h"
+#include "loading/resource_manager.h"
 #include "debug.h"
 
@@ -51,5 +50,5 @@
 int Zip::loadDictionary( std::string name )
 {
-  std::string fileName = ResourceManager::getInstance()->getDataDir();
+  std::string fileName = Resources::ResourceManager::getInstance()->mainGlobalPath().name();
   //PRINTF(0)("datadir: %s\n", fileName.c_str());
   fileName = fileName + "/dicts/" + name;
