Index: branches/new_class_id/src/defs/class_id.h
===================================================================
--- branches/new_class_id/src/defs/class_id.h	(revision 9707)
+++ branches/new_class_id/src/defs/class_id.h	(revision 9709)
@@ -224,5 +224,5 @@
   CL_FPS_SNIPER_RIFLE           =    0x000003a7,
   CL_FPS_LASER_RIFLE            =    0x000003a8,
-  CL_BOOMERANG_GUN              =    0x00000309,
+  CL_BOOMERANG_GUN              =    0x000003a9,
 
   // Projectiles
@@ -237,5 +237,5 @@
   CL_GUIDED_MISSILE             =    0x000003e8,
   CL_HYPERBLAST                 =    0x000003e9,
-  CL_BOOMERANG_PROJECTILE       =    0x0000030a,
+  CL_BOOMERANG_PROJECTILE       =    0x000003ea,
 
   // NPC's
@@ -253,5 +253,5 @@
 
   CL_IMAGE_ENTITY               =    0x00000513,
-  CL_IMAGE_PLANE                =    0x00000514,
+  CL_IMAGE_PLANE                =    0x00000518,
   CL_MODEL_ENTITY               =    0x00000515,
   CL_TEXT_ELEMENT               =    0x00000516, /// TODO MOVE
Index: branches/new_class_id/src/lib/BuildLibs.am
===================================================================
--- branches/new_class_id/src/lib/BuildLibs.am	(revision 9707)
+++ branches/new_class_id/src/lib/BuildLibs.am	(revision 9709)
@@ -1,15 +1,9 @@
 
 libORXlibs_a_LIBRARIES_ = \
-                $(LIB_PREFIX)/util/libORXlibutil.a \
-                $(LIB_PREFIX)/shell/libORXshell.a \
                 $(LIB_PREFIX)/event/libORXevent.a \
                 $(LIB_PREFIX)/gui/qt/libORXqtgui.a \
                 $(LIB_PREFIX)/gui/gl/libORXglgui.a \
                 $(LIB_PREFIX)/gui/libORXbasegui.a \
-                $(LIB_PREFIX)/script_engine/libORXscript.a \
-                $(LIB_PREFIX)/graphics/importer/libORXimporter.a \
                 $(LIB_PREFIX)/graphics/libORXgraphics.a \
-                $(LIB_PREFIX)/graphics/importer/libtc.a \
-                $(LIB_PREFIX)/sound/libORXsound.a \
                 $(LIB_PREFIX)/particles/libORXparticles.a \
                 $(LIB_PREFIX)/collision_detection/libORXcd.a \
@@ -23,7 +17,15 @@
                 $(LIB_PREFIX)/physics/libORXphysics.a \
                 $(LIB_PREFIX)/gui/gl/libORXglgui.a \
+                \
+                $(LIB_PREFIX)/util/libORXlibutil.a \
+                \
+                $(LIB_PREFIX)/graphics/importer/libORXimporter.a \
+                $(LIB_PREFIX)/graphics/importer/libtc.a \
+                $(LIB_PREFIX)/sound/libORXsound.a \
                 $(LIB_PREFIX)/shell/libORXshell.a \
-                $(LIB_PREFIX)/math/libORXmath.a \
+                $(LIB_PREFIX)/script_engine/libORXscript.a \
+                $(LIB_PREFIX)/util/libORXexecutor.a \
                 $(LIB_PREFIX)/util/libORXlibutil.a \
                 $(LIB_PREFIX)/lang/libORXlang.a \
-                $(LIB_PREFIX)/libORXlibs.a
+                $(LIB_PREFIX)/libORXlibs.a \
+                $(LIB_PREFIX)/math/libORXmath.a
Index: branches/new_class_id/src/lib/Makefile.am
===================================================================
--- branches/new_class_id/src/lib/Makefile.am	(revision 9707)
+++ branches/new_class_id/src/lib/Makefile.am	(revision 9709)
@@ -16,6 +16,6 @@
 		data/data_tank.h
 
-SUBDIRS =
-#	. \
+SUBDIRS = \
+	. \
 	math \
 	lang \
Index: branches/new_class_id/src/lib/coord/p_node.cc
===================================================================
--- branches/new_class_id/src/lib/coord/p_node.cc	(revision 9707)
+++ branches/new_class_id/src/lib/coord/p_node.cc	(revision 9709)
@@ -29,4 +29,6 @@
 #include "color.h"
 
+
+NewObjectListDefinition(PNode);
 /**
  * @brief standard constructor
Index: branches/new_class_id/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/cloud_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/cloud_effect.cc	(revision 9709)
@@ -40,4 +40,5 @@
 float     CloudEffect::fadeTime;
 
+NewObjectListDefinitionID(CloudEffect, CL_CLOUD_EFFECT);
 
 
@@ -56,6 +57,5 @@
 
 
-CREATE_FACTORY(CloudEffect, CL_CLOUD_EFFECT);
-NewObjectListDefinitionID(CloudEffect, CL_CLOUD_EFFECT);
+CREATE_FACTORY(CloudEffect);
 
 CloudEffect::CloudEffect(const TiXmlElement* root) {
Index: branches/new_class_id/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/fog_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/fog_effect.cc	(revision 9709)
@@ -22,4 +22,5 @@
 #include "cloud_effect.h"
 
+NewObjectListDefinition(FogEffect);
 // Define shell commands
 //SHELL_COMMAND(activate, FogEffect, activateFog);
@@ -37,6 +38,5 @@
                        );
 
-CREATE_FACTORY(FogEffect, CL_FOG_EFFECT);
-NewObjectListDefinition(FogEffect);
+CREATE_FACTORY(FogEffect);
 
 /**
Index: branches/new_class_id/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/lense_flare.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/lense_flare.cc	(revision 9709)
@@ -35,6 +35,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(LenseFlare, CL_LENSE_FLARE);
 NewObjectListDefinitionID(LenseFlare, CL_LENSE_FLARE);
+CREATE_FACTORY(LenseFlare);
 
 /**
Index: branches/new_class_id/src/lib/graphics/effects/lightning_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/lightning_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/lightning_effect.cc	(revision 9709)
@@ -29,4 +29,6 @@
 #include "class_id.h"
 
+NewObjectListDefinitionID(LightningEffect, CL_LIGHTNING_EFFECT);
+
 SHELL_COMMAND(activate, LightningEffect, activateLightning);
 SHELL_COMMAND(deactivate, LightningEffect, deactivateLightning);
@@ -37,6 +39,5 @@
                        );
 
-CREATE_FACTORY(LightningEffect, CL_LIGHTNING_EFFECT);
-NewObjectListDefinitionID(LightningEffect, CL_LIGHTNING_EFFECT);
+CREATE_FACTORY(LightningEffect);
 
 LightningEffect::LightningEffect(const TiXmlElement* root) {
Index: branches/new_class_id/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/rain_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/rain_effect.cc	(revision 9709)
@@ -33,4 +33,6 @@
 #include "class_id.h"
 
+NewObjectListDefinitionID(RainEffect, CL_RAIN_EFFECT);
+
 // Define shell commands
 //SHELL_COMMAND(activate, RainEffect, activateRain);
@@ -48,6 +50,5 @@
                        );
 
-CREATE_FACTORY(RainEffect, CL_RAIN_EFFECT);
-NewObjectListDefinitionID(RainEffect, CL_RAIN_EFFECT);
+CREATE_FACTORY(RainEffect);
 
 /**
Index: branches/new_class_id/src/lib/graphics/effects/snow_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/snow_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/snow_effect.cc	(revision 9709)
@@ -32,4 +32,5 @@
 #include "class_id.h"
 
+NewObjectListDefinitionID(SnowEffect, CL_SNOW_EFFECT);
 SHELL_COMMAND(activate, SnowEffect, activateSnow);
 SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow);
@@ -41,6 +42,5 @@
                        );
 
-CREATE_FACTORY(SnowEffect, CL_SNOW_EFFECT);
-NewObjectListDefinitionID(SnowEffect, CL_SNOW_EFFECT);
+CREATE_FACTORY(SnowEffect);
 
 SnowEffect::SnowEffect(const TiXmlElement* root)
Index: branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc	(revision 9709)
@@ -48,7 +48,6 @@
 
 #include "class_id.h"
-
-CREATE_FACTORY(VolFogEffect, CL_VOLFOG_EFFECT);
 NewObjectListDefinitionID(VolFogEffect, CL_VOLFOG_EFFECT);
+CREATE_FACTORY(VolFogEffect);
 
 VolFogEffect::VolFogEffect(const TiXmlElement* root) {
Index: branches/new_class_id/src/lib/graphics/light.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/light.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/light.cc	(revision 9709)
@@ -29,6 +29,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(Light, CL_LIGHT);
 NewObjectListDefinitionID(Light, CL_LIGHT);
+CREATE_FACTORY(Light);
 
 //! Definition of the Lights and their Names
Index: branches/new_class_id/src/lib/graphics/render2D/image_plane.cc
===================================================================
--- branches/new_class_id/src/lib/graphics/render2D/image_plane.cc	(revision 9707)
+++ branches/new_class_id/src/lib/graphics/render2D/image_plane.cc	(revision 9709)
@@ -25,7 +25,7 @@
 
 #include "class_id.h"
-CREATE_FACTORY(ImagePlane, CL_IMAGE_ENTITY);
 
-NewObjectListDefinitionID(ImagePlane, CL_IMAGE_ENTITY);
+NewObjectListDefinitionID(ImagePlane, CL_IMAGE_PLANE);
+CREATE_FACTORY(ImagePlane);
 
 
Index: branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc
===================================================================
--- branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc	(revision 9707)
+++ branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc	(revision 9709)
@@ -26,6 +26,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
 NewObjectListDefinitionID(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
+CREATE_FACTORY(GLMenuImageScreen);
 
 /**
Index: branches/new_class_id/src/lib/lang/base_object.h
===================================================================
--- branches/new_class_id/src/lib/lang/base_object.h	(revision 9707)
+++ branches/new_class_id/src/lib/lang/base_object.h	(revision 9709)
@@ -44,7 +44,7 @@
   //inline const std::string& getClassName() const { return this->className; }
   /** @returns the className of the corresponding Object as a C-compliant string (const char*) */
-  inline const char* getClassCName() const { return this->className.c_str(); };
+  inline const char* getClassCName() const { return _classes.front()._objectList->name().c_str(); };
   /** @returns the ClassName of the Topmost Object of the ClassStack */
-  inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }
+  inline const std::string& getClassName() const { return _classes.front()._objectList->name(); };
 
   inline const NewClassID& getClassID() const { return *_leafClassID; }
Index: branches/new_class_id/src/lib/lang/new_class_id.cc
===================================================================
--- branches/new_class_id/src/lib/lang/new_class_id.cc	(revision 9707)
+++ branches/new_class_id/src/lib/lang/new_class_id.cc	(revision 9709)
@@ -19,16 +19,25 @@
 #include "new_object_list.h"
 
+/**
+ * @brief a Default Constructor.
+ * this Always points to the ID of the NullClass.
+ */
 NewClassID::NewClassID()
 {
-  *this = NullClass::classID();
+  NullClass::acquireID(this->_id, this->_name);
 };
 
-NewClassID::NewClassID(const NewObjectListBase* objList)
+/**
+ * @brief Acquiring the ID of a objectList.
+ * @param objList The NewObjectList to acquire the ID from.
+ */
+NewClassID::NewClassID(const NewObjectListBase* const objList)
 {
-
-  objList->acquireID(_id, _name);
-
+  objList->acquireID(this->_id, this->_name);
 }
 
 
 NewClassID NullClass::_classID;
+
+int NullClass::_nullID;
+const std::string NullClass::_nullName = std::string("NullClass");
Index: branches/new_class_id/src/lib/lang/new_class_id.h
===================================================================
--- branches/new_class_id/src/lib/lang/new_class_id.h	(revision 9707)
+++ branches/new_class_id/src/lib/lang/new_class_id.h	(revision 9709)
@@ -12,34 +12,64 @@
 class NewObjectListBase;
 
-//! A class to dynamically allocate ClassID's and support a isA operator
+//! A class to dynamically allocate ClassID's and to support a isA operator
+/**
+ * A NewClassID can only be aquired over a NewObjectList,
+ * thus enabling the developer to have permanent access to the correct ID and ClassName
+ *
+ * The Idea behind this concept is, that storing a NewClassID that changes its internal state
+ * all NewClassID's will be updated correctly.
+ *
+ * Since the Existance of any NewObjectList is a requirement during the working process all
+ * ID's should reference a valid ID and ClassName
+ */
 class NewClassID
 {
 public:
   NewClassID();
-  NewClassID(const NewObjectListBase* id);
-  // the copy constructor is also defined.
+  NewClassID(const NewObjectListBase* const id);
+  /// the copy constructor is also defined implicitely.
+
+  /** @returns A constant reference to the ID. */
   const int& id() const { return *_id; };
+  /** @returns A constant reference to the Name. */
   const std::string& name() const { return *_name; };
 
+  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
   bool operator==(const NewClassID& id) const { return *_id == *id._id /* || _name == id._name */; };
+  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
   bool operator==(int id) const { return *_id == id; };
+  /** @param name the id to compare @returns true on match (match is same Name) @brief compares an ID with a ClassName */
   bool operator==(const std::string& name) const { return *_name == name; };
+  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
   bool operator!=(const NewClassID& id) const { return *_id != *id._id /* && _name != id._name*/;  };
+  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
   bool operator!=(int id) const { return *_id != id; };
+  /** @param name the id to compare @returns false on match (match is same Name) @brief compares an ID with a ClassName */
   bool operator!=(const std::string& name) const { return *_name != name; };
 
 private:
-  const int*                _id;
-  const std::string*        _name;
+  const int*                _id;           //!< A pointer to the ID of the ClassID.
+  const std::string*        _name;         //!< A pointer to the Name of the ClassID.
 };
 
+//! A NullClass. This is the Null of the ClassID.
+/**
+ * implemented as a Class id can be used to reference NullObjects.
+ */
 class NullClass
 {
 public:
-  static NewClassID classID() { return NullClass::_classID; }
+  /** @returns the NullClass' ID. */
+  static const NewClassID& classID() { return NullClass::_classID; }
+  /** @param id the ID to acquire @param name the name to acquire @brief acquires the ID of this Class */
+  static void acquireID(const int*& id, const std::string*& name) { id = &_nullID; name = &_nullName; };
+
 private:
-  NullClass();
+  NullClass() {}; //!< The Default Constructor is hidden from the User.
+
 private:
-  static NewClassID _classID;
+  static NewClassID         _classID;      //!< The NullClass' ID
+  static const std::string  _nullName;     //!< The NullClass' Name ("NullClass")
+  static int                _nullID;       //!< The NullClass' ID
 };
 
Index: branches/new_class_id/src/lib/lang/new_object_list.cc
===================================================================
--- branches/new_class_id/src/lib/lang/new_object_list.cc	(revision 9707)
+++ branches/new_class_id/src/lib/lang/new_object_list.cc	(revision 9709)
@@ -20,4 +20,6 @@
 
 
+#include <stdio.h>
+
 /**
  * @brief Constructor, that creates an ObjectList while checking (development mode) for uniqueness of all Keys (names and ID's)
@@ -27,6 +29,7 @@
  */
 NewObjectListBase::NewObjectListBase(const std::string& className, int id)
-  : _name(className)
-{
+    : _name(className)
+{
+  printf("NewObjectList, Registered %s::%d\n", className.c_str(), id);
   if (NewObjectListBase::_classesByID == NULL)
   {
@@ -47,5 +50,5 @@
   _id = id;
   /// Some Output, that will fall out later
-  //std::cout << "register new ObjectList " << className << " ID: " << this->_id << std::endl;
+  std::cout << "register new ObjectList " << className << " ID: " << this->_id << std::endl;
 
   this->_identity = NewClassID(this);
@@ -98,4 +101,14 @@
  * @return true if such a class already exists.
  */
+bool NewObjectListBase::classIDExists(int id)
+{
+  return (NewObjectListBase::_classesByID->find(id) != NewObjectListBase::_classesByID->end());
+}
+
+/**
+ * @brief Checks if a Class with name already exists.
+ * @param name The Name of the Class to check.
+ * @return true if such a class already exists.
+ */
 bool NewObjectListBase::classNameExists(const std::string& name)
 {
@@ -108,5 +121,5 @@
  * @returns the ClassID if found and NullClass' identity if not.
  */
-const NewClassID& NewObejctListBase::retrieveIdentity(int id)
+const NewClassID& NewObjectListBase::retrieveIdentity(int id)
 {
   const NewObjectListBase* const base = NewObjectListBase::getObjectList(id);
@@ -117,4 +130,5 @@
     return NullClass::classID();
 }
+
 
 /**
@@ -130,16 +144,5 @@
     return base->_identity;
   else
-    return NullObject::classID();
-}
-
-
-/**
- * @brief Checks if a Class with name already exists.
- * @param name The Name of the Class to check.
- * @return true if such a class already exists.
- */
-bool NewObjectListBase::classIDExists(int id)
-{
-  return (NewObjectListBase::_classesByID->find(id) != NewObjectListBase::_classesByID->end());
+    return NullClass::classID();
 }
 
@@ -230,4 +233,45 @@
 }
 
+#include "base_object.h"
+
+/**
+ * @brief Prints out some debugging information about a given List.
+ */
+void NewObjectListBase::debug(unsigned int level) const
+{
+  base_list list;
+  this->getBaseObjectList(&list);
+
+  if (level > 1 || !list.empty())
+    printf(" ObjectList of class %s(id:%d) contains %d objects\n", this->name().c_str(), this->id(), list.size());
+
+  if (level >= 2)
+  {
+    printf("  - listing Instances: \n");
+    for (base_iterator it = list.begin();
+         it != list.end();
+         ++it)
+    {
+      printf("   + %s::%s\n", (*it)->getClassCName(), (*it)->getCName());
+    }
+  }
+}
+
+
+void NewObjectListBase::debugAll(unsigned int level)
+{
+  printf("Listing all %d ObjectLists \n", NewObjectListBase::_classesByID->size());
+
+  for (classNameMap::const_iterator it = NewObjectListBase::_classesByName->begin();
+       it != NewObjectListBase::_classesByName->end();
+       ++it)
+  {
+    (*it).second->debug(level);
+
+  }
+
+}
+
+
 
 /**
Index: branches/new_class_id/src/lib/lang/new_object_list.h
===================================================================
--- branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9707)
+++ branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9709)
@@ -48,27 +48,29 @@
   class IteratorBase { };
 
-  typedef std::list<BaseObject*>            base_list;
-  typedef base_list::iterator               base_iterator;
+  /** @brief A Typedefinition for the Base-List that can be retrieved with getBaseObjectList(base_list*) */
+  typedef std::list<BaseObject*>        base_list;
+  /** @brief An iterator for the base_list */
+  typedef base_list::iterator           base_iterator;
 
 public:
   /** @returns The Identity of the Class stored within. */
-  inline const NewClassID& identity() const { return _identity; }
+  inline const NewClassID&              identity() const { return _identity; }
   /** @returns the ID of the Identity of the ObjectList */
-  inline int id() const { return _id; };
+  inline int                            id() const { return _id; };
   /** @returns The Name of the Class stored in this ObjectList */
-  inline const std::string& name() const { return _name; };
+  inline const std::string&             name() const { return _name; };
   /** @param id The id to compare @returns true on match, false otherwise */
-  inline bool operator==(int id) const { return _id == id; };
+  inline bool                           operator==(int id) const { return _id == id; };
   /** @param id The id to compare @returns true on match, false otherwise */
-  inline bool operator==(const NewClassID& id) const { return id == _id; };
+  inline bool                           operator==(const NewClassID& id) const { return id == _id; };
   /** @param name The name to compare @returns true on match, false otherwise */
-  inline bool operator==(const std::string& name) const { return _name == name; };
+  inline bool                           operator==(const std::string& name) const { return _name == name; };
   /** @param id The id to check @returns true on match, false otherwise */
-  inline void acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
+  inline void                           acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
   /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
-  virtual void getBaseObjectList(base_list* list) const = 0;
-
-  static const NewClassID& retrieveIdentity(int id);
-  static const NewClassID& retrieveIdentity(const std::string& name);
+  virtual void                          getBaseObjectList(base_list* list) const = 0;
+
+  static const NewClassID&              retrieveIdentity(int id);
+  static const NewClassID&              retrieveIdentity(const std::string& name);
 
   static const NewObjectListBase* const getObjectList(int classID);
@@ -76,21 +78,23 @@
   static const NewObjectListBase* const getObjectList(const NewClassID& classID);
 
-  static BaseObject* getBaseObject(int classID, const std::string& objectName);
-  static BaseObject* getBaseObject(const std::string& className, const std::string& objectName);
-  static BaseObject* getBaseObject(const NewClassID& classID, const std::string& objectName);
+  static BaseObject*                    getBaseObject(int classID, const std::string& objectName);
+  static BaseObject*                    getBaseObject(const std::string& className, const std::string& objectName);
+  static BaseObject*                    getBaseObject(const NewClassID& classID, const std::string& objectName);
 
   /** @returns an Object with Name name out of this List @param name the name of the Object. */
-  virtual BaseObject* getBaseObject(const std::string& name) const = 0;
+  virtual BaseObject*                   getBaseObject(const std::string& name) const = 0;
 
   static const std::list<std::string>&  getClassNames();
 
+
   static unsigned int                   classCount();
+  void                                  debug(unsigned int level) const;
+  static void                           debugAll(unsigned int level);
+
   static const std::string&             IDToString(int classID);
   static int                            StringToID(const std::string& className);
 
-  virtual void debug() const = 0;
-
   //! Only uset to unsubscribe a BaseObject.
-  virtual void unregisterObject(IteratorBase* _iterators) = 0;
+  virtual void                          unregisterObject(IteratorBase* _iterators) = 0;
 
 protected:
@@ -101,6 +105,6 @@
   NewObjectListBase(const NewObjectListBase&);
 
-  static bool classIDExists(int id);
-  static bool classNameExists(const std::string& className);
+  static bool                         classIDExists(int id);
+  static bool                         classNameExists(const std::string& className);
 
 
@@ -126,4 +130,13 @@
 //! Defines a ObjectsList handler for objects of type T.
 /**
+ * The ObjectList is a generic way to store every object created from a Class 'T'
+ *  into a List. The list can be retrieved, and used constantly over iterators,
+ *  as with normal std::list.
+ *
+ * Furthermore the linkage over the single Lists is given over the Superclass NewObjectListBase.
+ *
+ *
+ *
+ *
  * To define a Class with a ObjectList, you have to:
  *  1. Include 'NewObjectListDeclaration(T);' in its Declaration (at the beginning)
@@ -132,4 +145,22 @@
  *
  * @note The Class must define the compare with const std::string& operator for this to work.
+ *
+ *
+ *
+ * Limitations:
+ *  ObjectList cannot be used with other Factory style Classes, if the class is also a BaseObject,
+ *   and not loaded before the ObjectList.
+ *
+ * @example Iterating: Iteration is made easy, and fast as follows:
+ *   for (NewObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+ *      it != PlayerStats::objectList().end();
+ *     ++it)
+ *   {
+ *    (*it)->dosomething
+ *   }
+ *
+ * @example Find an Object:
+ * Playable* playable = Playable::objectList("orxonox-super-rocket-fighter"); // searches an Object By its name.
+ *
  */
 template<class T>
@@ -154,27 +185,33 @@
   ~NewObjectList();
 
-  virtual BaseObject*     getBaseObject(const std::string& name) const;
-  T*                      getObject(const std::string& name) const;
-  inline const list&      objects() const { return _objects; };
-  bool exists(const T* const object) const;
-
-  inline iterator begin() { return _objects.begin(); };
-  inline const_iterator begin() const { return _objects.begin(); };
-  inline iterator  end() { return _objects.end(); };
-  inline const_iterator  end() const { return _objects.end(); };
-
-  inline bool empty() const { return _objects.empty(); };
-  inline int size() const { return _objects.size(); };
-  inline T* front() const { return _objects.front(); };
-  inline T* back() const { return _objects.back(); };
-
-
-  NewObjectListBase::IteratorBase* registerObject(T* object);
-  virtual void unregisterObject(IteratorBase* iterator);
-
-  virtual void debug() const;
+  virtual BaseObject*                getBaseObject(const std::string& name) const;
+  T*                                 getObject(const std::string& name) const;
+  inline const list&                 objects() const { return _objects; };
+  bool                               exists(const T* const object) const;
+
+  /** @returns an Iterator to the beginning of the List. */
+  inline iterator                    begin() { return _objects.begin(); };
+  /** @returns a constant Iterator to the beginning of the List. */
+  inline const_iterator              begin() const { return _objects.begin(); };
+  /** @returns an Iterator to the end of the List. */
+  inline iterator                    end() { return _objects.end(); };
+  /** @returns a constant Iterator to the beginning of the List. */
+  inline const_iterator              end() const { return _objects.end(); };
+
+  /** @returns true if the List is empty. */
+  inline bool                        empty() const { return _objects.empty(); };
+  /** @returns the size of the List */
+  inline int                         size() const { return _objects.size(); };
+  /** @returns the frontmost Element of the list (normaly the last added Object). */
+  inline T*                          front() const { return _objects.front(); };
+  /** @returns the last added Object */
+  inline T*                          back() const { return _objects.back(); };
+
+
+  NewObjectListBase::IteratorBase*   registerObject(T* object);
+  virtual void                       unregisterObject(IteratorBase* iterator);
 
 protected:
-  virtual void getBaseObjectList(NewObjectListBase::base_list* list) const;
+  virtual void                       getBaseObjectList(NewObjectListBase::base_list* list) const;
 
 
@@ -184,5 +221,5 @@
 
 private:
-  list                _objects;
+  list                _objects;     //!< The List of stored Objects of Type T.
 };
 
@@ -212,6 +249,5 @@
   if (!_objects.empty())
   {
-    std::cout << "There are still Object in the ObjectList of " << this->name() << "(id:" << this->id() << ")\n";
-    this->debug();
+    // std::cout << "There are " << this->size() << " objects from class " << this->name() << "(id:" << this->id() << ") in existance\n";
   }
 }
@@ -279,6 +315,6 @@
 NewObjectListBase::IteratorBase* NewObjectList<T>::registerObject(T* object)
 {
-  this->_objects.push_front(object);
-  return new Iterator(this->_objects.begin());
+  this->_objects.push_back(object);
+  return new Iterator(--this->_objects.end());
 }
 
@@ -294,17 +330,3 @@
 }
 
-/**
- * @brief print out some debug information
- * @note this function will most probably vanish from here and be completely moved to the base class.
- */
-template <class T>
-void NewObjectList<T>::debug() const
-{
-  const_iterator it;
-  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
-  {
-    std::cout << (*it)->getName() << std::endl;
-  }
-}
-
 #endif /* _NEW_OBJECT_LIST_H */
Index: branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc
===================================================================
--- branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc	(revision 9707)
+++ branches/new_class_id/src/lib/network/monitor/network_stats_widget.cc	(revision 9709)
@@ -29,6 +29,4 @@
 // SHELL_COMMAND(gui, NetworkStatsWidget, toggleGUI)
 // ->setAlias("ProxyGui");
-
-NewObjectListDefinition(NetworkStatsWidget);
 
 HostWidget::HostWidget(const std::string& name, const IP& ip)
@@ -212,4 +210,6 @@
 //======================================================//
 
+
+NewObjectListDefinition(NetworkStatsWidget);
 /**
  * @brief standard constructor
Index: branches/new_class_id/src/lib/network/network_stream.cc
===================================================================
--- branches/new_class_id/src/lib/network/network_stream.cc	(revision 9707)
+++ branches/new_class_id/src/lib/network/network_stream.cc	(revision 9709)
@@ -1194,5 +1194,5 @@
           }
           else
-            b = Factory::fabricate( leafClassId );
+	    ; /// FIXME NEW_CLASS_ID :: b = Factory::fabricate( leafClassId );
 
           if ( !b )
Index: branches/new_class_id/src/lib/network/player_stats.cc
===================================================================
--- branches/new_class_id/src/lib/network/player_stats.cc	(revision 9707)
+++ branches/new_class_id/src/lib/network/player_stats.cc	(revision 9709)
@@ -32,6 +32,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(PlayerStats, CL_PLAYER_STATS);
 NewObjectListDefinitionID(PlayerStats, CL_PLAYER_STATS);
+CREATE_FACTORY(PlayerStats);
 
 /**
Index: branches/new_class_id/src/lib/particles/box_emitter.cc
===================================================================
--- branches/new_class_id/src/lib/particles/box_emitter.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/box_emitter.cc	(revision 9709)
@@ -26,6 +26,7 @@
 #include "class_id.h"
 
-CREATE_FACTORY(BoxEmitter, CL_BOX_EMITTER);
 NewObjectListDefinitionID(BoxEmitter, CL_BOX_EMITTER);
+CREATE_FACTORY(BoxEmitter);
+
 /**
  *  standard constructor
Index: branches/new_class_id/src/lib/particles/dot_emitter.cc
===================================================================
--- branches/new_class_id/src/lib/particles/dot_emitter.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/dot_emitter.cc	(revision 9709)
@@ -27,6 +27,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(DotEmitter, CL_DOT_EMITTER);
 NewObjectListDefinitionID(DotEmitter, CL_DOT_EMITTER);
+CREATE_FACTORY(DotEmitter);
 
 /**
Index: branches/new_class_id/src/lib/particles/dot_particles.cc
===================================================================
--- branches/new_class_id/src/lib/particles/dot_particles.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/dot_particles.cc	(revision 9709)
@@ -26,6 +26,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(DotParticles, CL_DOT_PARTICLES);
 NewObjectListDefinitionID(DotParticles, CL_DOT_PARTICLES);
+CREATE_FACTORY(DotParticles);
 
 SHELL_COMMAND(texture, DotParticles, setMaterialTexture)
Index: branches/new_class_id/src/lib/particles/model_particles.cc
===================================================================
--- branches/new_class_id/src/lib/particles/model_particles.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/model_particles.cc	(revision 9709)
@@ -26,6 +26,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(ModelParticles, CL_MODEL_PARTICLES);
 NewObjectListDefinitionID(ModelParticles, CL_MODEL_PARTICLES);
+CREATE_FACTORY(ModelParticles);
 
 SHELL_COMMAND(texture, ModelParticles, setMaterialTexture)
Index: branches/new_class_id/src/lib/particles/plane_emitter.cc
===================================================================
--- branches/new_class_id/src/lib/particles/plane_emitter.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/plane_emitter.cc	(revision 9709)
@@ -26,6 +26,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(PlaneEmitter, CL_PLANE_EMITTER);
 NewObjectListDefinitionID(PlaneEmitter, CL_PLANE_EMITTER);
+CREATE_FACTORY(PlaneEmitter);
 
 /**
Index: branches/new_class_id/src/lib/particles/spark_particles.cc
===================================================================
--- branches/new_class_id/src/lib/particles/spark_particles.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/spark_particles.cc	(revision 9709)
@@ -26,6 +26,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(SparkParticles, CL_SPARK_PARTICLES);
 NewObjectListDefinitionID(SparkParticles, CL_SPARK_PARTICLES);
+CREATE_FACTORY(SparkParticles);
 
 /**
Index: branches/new_class_id/src/lib/particles/sprite_particles.cc
===================================================================
--- branches/new_class_id/src/lib/particles/sprite_particles.cc	(revision 9707)
+++ branches/new_class_id/src/lib/particles/sprite_particles.cc	(revision 9709)
@@ -26,6 +26,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(SpriteParticles, CL_SPRITE_PARTICLES);
 NewObjectListDefinitionID(SpriteParticles, CL_SPRITE_PARTICLES);
+CREATE_FACTORY(SpriteParticles);
 
 SHELL_COMMAND(texture, SpriteParticles, setMaterialTexture)
Index: branches/new_class_id/src/lib/physics/fields/gravity.cc
===================================================================
--- branches/new_class_id/src/lib/physics/fields/gravity.cc	(revision 9707)
+++ branches/new_class_id/src/lib/physics/fields/gravity.cc	(revision 9709)
@@ -24,5 +24,5 @@
 NewObjectListDefinitionID(Gravity, CL_FIELD_GRAVITY);
 
-CREATE_FACTORY(Gravity, CL_FIELD_GRAVITY);
+CREATE_FACTORY(Gravity);
 
 Gravity::Gravity(const TiXmlElement* root)
Index: branches/new_class_id/src/lib/physics/physics_connection.cc
===================================================================
--- branches/new_class_id/src/lib/physics/physics_connection.cc	(revision 9707)
+++ branches/new_class_id/src/lib/physics/physics_connection.cc	(revision 9709)
@@ -28,7 +28,6 @@
 
 #include "class_id.h"
-
-CREATE_FACTORY(PhysicsConnection, CL_PHYSICS_CONNECTION);
 NewObjectListDefinition(PhysicsConnection);
+CREATE_FACTORY(PhysicsConnection);
 /**
  *  creates a PhysicsConnection
Index: branches/new_class_id/src/lib/script_engine/script.cc
===================================================================
--- branches/new_class_id/src/lib/script_engine/script.cc	(revision 9707)
+++ branches/new_class_id/src/lib/script_engine/script.cc	(revision 9709)
@@ -22,4 +22,6 @@
 #include "loading/load_param.h"
 #include "parser/tinyxml/tinyxml.h"
+
+NewObjectListDefinition(Script);
 
 CREATE_SCRIPTABLE_CLASS(Script, Script::classID(),
@@ -30,5 +32,4 @@
                      );
 
-NewObjectListDefinition(Script);
 
 Script::Script(const TiXmlElement* root)
Index: branches/new_class_id/src/lib/script_engine/script_class.h
===================================================================
--- branches/new_class_id/src/lib/script_engine/script_class.h	(revision 9707)
+++ branches/new_class_id/src/lib/script_engine/script_class.h	(revision 9709)
@@ -29,8 +29,4 @@
 public:
   virtual ~ScriptClass();
-
-  const std::string& getName() const { return this->getName(); }
-  bool operator==(const std::string& name) const { return (this->getName() == name); }
-  bool operator==(NewClassID classID) const { return (this->_classID == classID); }
 
   virtual void registerClass(Script* script) = 0;
Index: branches/new_class_id/src/lib/shell/Makefile.am
===================================================================
--- branches/new_class_id/src/lib/shell/Makefile.am	(revision 9707)
+++ branches/new_class_id/src/lib/shell/Makefile.am	(revision 9709)
@@ -18,6 +18,6 @@
 		shell_buffer.h \
 		shell_input.h \
+		shell_command_class.h \
 		shell_command.h \
-		shell_command_class.h \
 		shell_completion.h \
 		shell_completion_plugin.h
Index: branches/new_class_id/src/lib/shell/shell_command.cc
===================================================================
--- branches/new_class_id/src/lib/shell/shell_command.cc	(revision 9707)
+++ branches/new_class_id/src/lib/shell/shell_command.cc	(revision 9709)
@@ -26,6 +26,6 @@
 namespace OrxShell
 {
+  NewObjectListDefinition(ShellCommand);
   SHELL_COMMAND(debug, ShellCommandClass, help);
-  NewObjectListDefinition(ShellCommand);
 
 
Index: branches/new_class_id/src/lib/shell/shell_completion.cc
===================================================================
--- branches/new_class_id/src/lib/shell/shell_completion.cc	(revision 9707)
+++ branches/new_class_id/src/lib/shell/shell_completion.cc	(revision 9709)
@@ -141,7 +141,9 @@
       type = ClassCompletion;
 
-    /// FIXME
-//     if (!this->addToCompleteList(*boList, objectBegin, type))
-//       return false;
+    NewObjectListBase::base_list list;
+    objectList->getBaseObjectList(&list);
+
+    if (!this->addToCompleteList(list, objectBegin, type))
+     return false;
 
     return true;
Index: branches/new_class_id/src/lib/shell/some_shell_commands.cc
===================================================================
--- branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9707)
+++ branches/new_class_id/src/lib/shell/some_shell_commands.cc	(revision 9709)
@@ -34,8 +34,8 @@
   SHELL_COMMAND(nick, PlayerStats, shellNick)->setAlias("nick");
 
-#include "class_list.h"
-  SHELL_COMMAND(debug, ClassList, ClassList::debugS)
-      ->describe("Shows all registered classes, if param1: is a valid ClassName only values of this class are shown. param2: how much output")
-      ->defaultValues(MT_NULL, 1);
+// #include "class_list.h"
+//   SHELL_COMMAND(debug, ClassList, ClassList::debugS)
+//       ->describe("Shows all registered classes, if param1: is a valid ClassName only values of this class are shown. param2: how much output")
+//       ->defaultValues(MT_NULL, 1);
 
 #include "p_node.h"
Index: branches/new_class_id/src/lib/util/Makefile.am
===================================================================
--- branches/new_class_id/src/lib/util/Makefile.am	(revision 9707)
+++ branches/new_class_id/src/lib/util/Makefile.am	(revision 9709)
@@ -2,5 +2,12 @@
 include $(MAINSRCDIR)/defs/include_paths.am
 
-noinst_LIBRARIES = libORXlibutil.a
+noinst_LIBRARIES = \
+		libORXlibutil.a \
+		libORXexecutor.a
+
+libORXexecutor_a_SOURCES = \
+		executor/executor.cc \
+		executor/executor_functional.cc \
+		executor/executor_lua.cc
 
 libORXlibutil_a_SOURCES = \
@@ -9,7 +16,4 @@
 		helper_functions.cc \
 		multi_type.cc \
-		executor/executor.cc \
-		executor/executor_functional.cc \
-		executor/executor_lua.cc \
 		\
 		loading/resource_manager.cc \
@@ -19,5 +23,5 @@
 		loading/load_param_description.cc \
 		loading/factory.cc \
-		loading/dynamic_loader.cc \
+		loading/fast_factory.cc \
 		\
 		filesys/file.cc \
@@ -28,4 +32,6 @@
 		threading.cc \
 		timer.cc
+
+#		loading/dynamic_loader.cc
 
 
@@ -55,4 +61,5 @@
 		loading/load_param_description.h \
 		loading/factory.h \
+		loading/fast_factory.h \
 		loading/dynamic_loader.h \
 		\
Index: branches/new_class_id/src/lib/util/loading/dynamic_loader.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/dynamic_loader.cc	(revision 9707)
+++ branches/new_class_id/src/lib/util/loading/dynamic_loader.cc	(revision 9709)
@@ -31,5 +31,5 @@
 */
 DynamicLoader::DynamicLoader (const std::string& libName)
-    : Factory(NULL, 0)
+    : Factory(libName)
 {
   this->registerObject(this, DynamicLoader::_objectList);
Index: branches/new_class_id/src/lib/util/loading/factory.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/factory.cc	(revision 9707)
+++ branches/new_class_id/src/lib/util/loading/factory.cc	(revision 9709)
@@ -28,9 +28,10 @@
  * set everything to zero and define factoryName
  */
-Factory::Factory (const std::string& factoryName, int classID)
-    : _classID(classID), _className(factoryName)
+Factory::Factory (const NewClassID& classID)
+    : _classID(classID)
 {
-  this->registerObject(this, Factory::_objectList);
-  this->setName(factoryName);
+  printf("Factory::create(%s::%d)\n", classID.name().c_str(), classID.id());
+  //this->registerObject(this, Factory::_objectList);
+  this->setName(classID.name());
 
   if( Factory::_factoryList == NULL)
@@ -79,13 +80,4 @@
 }
 
-/**
- * @brief Compares the Factories Name against a given ClassName
- * @param className the Name of the Class to Query
- * @returns true on match, false otherwise.
- */
-bool Factory::operator==(const char* className) const
-{
-  return (className != NULL && this->_className == className);
-}
 
 /**
@@ -96,5 +88,5 @@
 bool Factory::operator==(const std::string& className) const
 {
-  return (this->_className == className);
+  return (this->_classID.name() == className);
 }
 
@@ -143,5 +135,4 @@
 }
 
-
 /**
  * @brief Creates a new Object of type classID
@@ -149,5 +140,5 @@
  * @returns a new Object of Type classID on match, NULL otherwise
  */
-BaseObject* Factory::fabricate(int classID)
+BaseObject* Factory::fabricate(const NewClassID& classID)
 {
   if (Factory::_factoryList == NULL)
@@ -157,21 +148,10 @@
   for (factory = Factory::_factoryList->begin(); factory != Factory::_factoryList->end(); factory++)
     if (*(*factory) == classID)
-    {
-      PRINTF(4)("Create a new Object of type %s\n", (*factory)->getCName());
-      return (*factory)->fabricateObject(NULL);
+  {
+    PRINTF(4)("Create a new Object of type %s\n", (*factory)->getCName());
+    return (*factory)->fabricateObject(NULL);
 
-    }
-  PRINTF(2)("Could not Fabricate an Object of ClassID '0x%h'\n", classID);
+  }
+  PRINTF(2)("Could not Fabricate an Object of ClassID '%d'\n", classID.id());
   return NULL;
 }
-
-
-/**
- * @brief Creates a new Object of type classID
- * @param classID the ClassID to match for the newly created Object
- * @returns a new Object of Type classID on match, NULL otherwise
- */
-BaseObject* Factory::fabricate(const NewClassID& classID)
-{
-  return Factory::fabricate(classID.id());
-}
Index: branches/new_class_id/src/lib/util/loading/factory.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/factory.h	(revision 9707)
+++ branches/new_class_id/src/lib/util/loading/factory.h	(revision 9709)
@@ -20,6 +20,6 @@
 
 
-#ifndef _FACTORY_H
-#define _FACTORY_H
+#ifndef __FACTORY_H
+#define __FACTORY_H
 
 class BaseObject;
@@ -27,5 +27,4 @@
 #include "parser/tinyxml/tinyxml.h"
 #include "base_object.h"
-#include <vector>
 #include <list>
 
@@ -34,6 +33,6 @@
  * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
  */
-#define CREATE_FACTORY(CLASS_NAME, CLASS_ID) \
-    tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
+#define CREATE_FACTORY(CLASS_NAME) \
+    tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(CLASS_NAME::classID())
 
 //! The Factory is a loadable object handler
@@ -48,19 +47,20 @@
   static  BaseObject* fabricate(const std::string& className);
   static  BaseObject* fabricate(const NewClassID& classID);
-  static  BaseObject* fabricate(int classID);
-  static  BaseObject* fabricate(const TiXmlElement* root = NULL);
+  static  BaseObject* fabricate(const TiXmlElement* root);
 
 
   bool operator==(int classID) const;
-  bool operator==(const char* className) const;
   bool operator==(const std::string& className) const;
+  bool operator==(const NewClassID& classID) const { return _classID == classID; };
 
 protected:
-  Factory (const std::string& factoryName, int classID);
+  Factory (const NewClassID& id);
   virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
 
+private:
+  Factory (const Factory&) {};
+
 protected:
-  const int                     _classID;              //!< The Class-Identifyer of the Factory.
-  const std::string             _className;            //!< The name of the Class.
+  const NewClassID              _classID;              //!< The Class-Identifyer of the Factory.
   static std::list<Factory*>*   _factoryList;          //!< List of Registered Factories
 };
@@ -78,9 +78,10 @@
    * @param classID the ID of the Class to be created.
    */
-  tFactory (const char* factoryName, int classID)
-      : Factory(factoryName, classID)
+  tFactory (const NewClassID& classID)
+      : Factory(classID)
   {  }
 
 private:
+  tFactory (const tFactory&) {};
   /**
    * @brief fabricates an Object of type T, with the constructor T::T(const TiXmlElemnt*)
Index: branches/new_class_id/src/lib/util/loading/fast_factory.cc
===================================================================
--- branches/new_class_id/src/lib/util/loading/fast_factory.cc	(revision 9709)
+++ branches/new_class_id/src/lib/util/loading/fast_factory.cc	(revision 9709)
@@ -0,0 +1,284 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Benjamin Grauer
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
+
+#include "fast_factory.h"
+
+#include "compiler.h"
+#include "debug.h"
+#include <string.h>
+
+
+NewObjectListDefinition(FastFactory);
+
+/**
+ * @brief Initializes a FastFactory
+ * @param classID the ClassID this Class belongs to (the top-most)
+ * @param fastFactoryName the Name of the ObjectClass-handled here
+ * @return a new FastFactory
+ */
+FastFactory::FastFactory (const NewClassID& classID, const std::string& fastFactoryName)
+{
+  this->registerObject(this, FastFactory::_objectList);
+  this->setName(fastFactoryName);
+
+  this->storedClassID = classID;
+  this->next = NULL;
+
+  this->deadList = NULL;
+  this->unusedContainers = NULL;
+
+  this->storedDeadObjects = 0;
+
+  FastFactory::registerFastFactory(this);
+}
+
+/** a reference to the First FastFactory */
+FastFactory* FastFactory::first = NULL;
+
+/**
+ *  destructor
+ * deletes all the Instances of the FastFactory.
+ */
+FastFactory::~FastFactory ()
+{
+  if (this == first)
+    this->first = NULL;
+  this->flush();
+
+  if (this->next)
+    delete this->next;
+}
+
+/**
+ * deletes all FastFactories
+ */
+void FastFactory::deleteAll()
+{
+  if (FastFactory::first)
+    delete FastFactory::first;
+}
+
+/**
+ * registers a Factory to the List of known factories.
+ * @param fastFactory The factory to add
+ *
+ * needed, to step through all the FastFactories.
+ */
+void FastFactory::registerFastFactory(FastFactory* fastFactory)
+{
+  PRINTF(4)("Registered FastFactory for '%s'\n", fastFactory->getCName());
+
+  if( FastFactory::first == NULL)
+    FastFactory::first = fastFactory;
+  else
+  {
+    FastFactory* tmpFac = FastFactory::first;
+    while( tmpFac->next != NULL)
+      tmpFac = tmpFac->next;
+    tmpFac->setNext(fastFactory);
+  }
+}
+
+/**
+ * searches for a FastFactory
+ * @param classID the ClassID of the FastFactory to search for
+ * @returns true if found, false otherwise.
+ */
+FastFactory* FastFactory::searchFastFactory(const NewClassID& classID)
+{
+  if (FastFactory::first == NULL)
+    return NULL;
+  else
+  {
+    FastFactory* tmpFac = FastFactory::first;
+    while (tmpFac != NULL)
+    {
+      if (tmpFac->storedClassID == classID)
+        return tmpFac;
+      tmpFac = tmpFac->next;
+    }
+  }
+  return NULL;
+}
+
+/**
+ * searches for a FastFactory
+ * @param classID the ClassID of the FastFactory to search for
+ * @returns true if found, false otherwise.
+ */
+FastFactory* FastFactory::searchFastFactory(const std::string& fastFactoryName)
+{
+  if (FastFactory::first == NULL)
+    return NULL;
+  else
+  {
+    FastFactory* tmpFac = FastFactory::first;
+    while (tmpFac != NULL)
+    {
+      if (fastFactoryName == tmpFac->getCName())
+        return tmpFac;
+      tmpFac = tmpFac->next;
+    }
+  }
+  return NULL;
+}
+
+/**
+ * Removes all the stored Containers, and sets the Lists back to emptienes.
+ * @param hardFLUSH if true the containing Objects will also be deleted !! THIS IS DANGEROUS !!
+ */
+void FastFactory::flushAll(bool hardFLUSH)
+{
+  FastFactory* tmpFac = FastFactory::first;
+  while (tmpFac != NULL)
+  {
+    PRINTF(4)("DELETEING ALL OF %s\n",tmpFac->getCName());
+    tmpFac->flush(hardFLUSH);
+    tmpFac = tmpFac->next;
+  }
+}
+
+/**
+ * ereases all the remaining containers, without deleting the stored Objects inside of them.
+ * @param hardFLUSH if the the containing Objects will also be deleted !! THIS IS DANGEROUS !!
+ */
+void FastFactory::flush(bool hardFLUSH)
+{
+  FastObjectMember* tmpMember = this->deadList, *delMember = NULL;
+  while (tmpMember != NULL)
+  {
+    delMember = tmpMember;
+    tmpMember = tmpMember->next;
+    if (hardFLUSH)
+    {
+      delete delMember->objectPointer;
+    }
+    delete delMember;
+  }
+  this->deadList = NULL;
+
+  tmpMember = this->unusedContainers;
+  while (tmpMember != NULL)
+  {
+    delMember = tmpMember;
+    tmpMember = tmpMember->next;
+    delete delMember;
+  }
+  this->unusedContainers = NULL;
+}
+
+/**
+ * generates count new Object of the Corresponding class. (precaching)
+ * @param count How many instances of the class should be generated.
+ */
+void FastFactory::prepare(unsigned int count)
+{
+/*  if (this->storedDeadObjects + this->storedLivingObjects >= count)
+  {
+  PRINTF(3)("not creating new Objects for class %s, because the requested count already exists\n", this->getClassCName());
+}*/
+  for (unsigned int i = this->storedDeadObjects; i < count; i++)
+  {
+    this->fabricate();
+  }
+}
+
+/**
+ * gives back live to one Object.
+ * @return the Object to resurrect.
+ */
+BaseObject* FastFactory::resurrect()
+{
+  PRINTF(4)("Resurecting Object of type %s\n", this->getCName());
+  if (unlikely(this->deadList == NULL))
+  {
+    PRINTF(3)("The deadList of Class %s is empty, this may be either because it has not been filled yet, or the cache is to small.\n" \
+        "  Developer: try increasing the count with FastFactory::prepare(contHigher than actual)\n" \
+        "    Fabricating a new %s\n", this->getCName(), this->getCName());
+    this->fabricate();
+    return this->resurrect();
+  }
+  else
+  {
+    FastObjectMember* tmpC = this->deadList;
+    this->deadList = this->deadList->next;
+
+    tmpC->next = this->unusedContainers;
+    this->unusedContainers = tmpC;
+
+    return tmpC->objectPointer;
+  }
+}
+
+/**
+ * gives back live to one Object.
+ * @param classID the class From which to resurrect an Object.
+ * @return the Object to resurrect, NULL if classID is not found.
+ */
+BaseObject* FastFactory::resurrect(const NewClassID& classID)
+{
+  FastFactory* tmpFac = FastFactory::getFirst();
+
+  while (tmpFac != NULL)
+  {
+    if (classID == tmpFac->storedClassID)
+      return tmpFac->resurrect();
+    tmpFac = tmpFac->next;
+  }
+  return NULL;
+}
+
+/**
+ * kills Object object, meaning, that it will be stored in the deadList of the FastFactory, and waiting for resurrection
+ * @param object the Object to kill.
+ *
+ * synony that would be really grate would be abolish, but this is more like exterminate than pause-mode.
+ */
+void FastFactory::kill(BaseObject* object)
+{
+  FastObjectMember* tmpC;
+  if (unlikely(this->unusedContainers == NULL))
+  {
+    tmpC = new FastObjectMember;
+  }
+  else
+  {
+    tmpC = this->unusedContainers;
+    this->unusedContainers = this->unusedContainers->next;
+  }
+
+  tmpC->next = this->deadList;
+  tmpC->objectPointer = object;
+  this->deadList = tmpC;
+}
+
+
+void FastFactory::kill(BaseObject* object, bool searchForFastFactory)
+{
+  if (likely(searchForFastFactory == true))
+  {
+    FastFactory* tmpFac = FastFactory::first;
+    while (tmpFac != NULL)
+    {
+      if (object->isA(tmpFac->storedClassID))
+      {
+        tmpFac->kill(object);
+        return;
+      }
+      tmpFac = tmpFac->next;
+    }
+  }
+}
Index: branches/new_class_id/src/lib/util/loading/fast_factory.h
===================================================================
--- branches/new_class_id/src/lib/util/loading/fast_factory.h	(revision 9709)
+++ branches/new_class_id/src/lib/util/loading/fast_factory.h	(revision 9709)
@@ -0,0 +1,176 @@
+/*!
+ * @file fast_factory.h
+ * The ObjectManager (FastFactory) is designed, to automatically generate and remove
+ * (without to much overhead) many instances of different classes.
+ *
+ * It is especially usefull for objects, that come only for a short time into existence,
+ * and get killed after a small amount of time (like shots).
+ *
+ * The Creation of an Object is usually done in the Weapon Class, where one subscribes
+ * a Projectile with:
+ * this->bulletFactory = tFastFactory<TestBullet>::getFastFactory(CL_TEST_BULLET, "TestBullet");
+ * (this might change over time).
+ * Then you can at loading time initialize an amount of the class with something like:
+ * this->bulletFactory->prepare(100); // creates 100 entities of TestBullet (dead ones)
+ * afterwards one can just retrieve an Object form the Class with
+ * this->bulletFactory->resurrect();  // this returns a BaseObject an Object of the class.
+ *
+ * The big difference to the FastFactory-class is, that this one is used more for the purpose
+ * of fast game-interaction than for loading. althought one can also load FastFactorized classes
+ * it is not the main topic.
+ */
+
+#ifndef _FAST_FACTORY_H
+#define _FAST_FACTORY_H
+
+#include "base_object.h"
+/**
+ * Creates a FastFactory to a Createable FastFactory.
+ */
+#define CREATE_FAST_FACTORY(CLASS_NAME, CLASS_ID) \
+  FastFactory* global_##CLASS_NAME##_FastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_ID, #CLASS_NAME)
+/**
+ * Creates a FastFactory for a Class' static function named ClassName::fastFactory.
+ * @param CLASS_NAME the name of the Class to create the fast-factory for.
+ * @param CLASS_ID the ID of the class to create the fast-factory for @see "class_id.h"
+ *
+ * notice, that the Class to be called, must implement:
+ * static FastFactory*         fastFactory;
+ */
+#define CREATE_FAST_FACTORY_STATIC(CLASS_NAME) \
+  FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::classID(), #CLASS_NAME)
+
+//! A struct, that holds Lists of Objects of a certain type.
+typedef struct FastObjectMember
+{
+  BaseObject*          objectPointer;      //!< Pointer to the Object Stored in this Class (if it is the DeadList, else it is bork)
+
+  FastObjectMember*    next;               //!< the next stored FastObjectMember. (or NULL if this is the last one stored in either the deadList or the unusedContainers)
+};
+
+//! The FastFactory is a fast loadable object creator, and Dynamic List of dead object handler.
+/**
+ * The ObjectManager (FastFactory) is designed, to automatically generate and remove
+ * (without to much overhead) many instances of different classes.
+ *
+ * FastFactory is needed to glue all the tFastFactories together.
+ * It is also the general class that implements the necessary functions
+ * to generate, resurrect kill and stuff...
+ */
+class FastFactory : public BaseObject
+{
+  NewObjectListDeclaration(FastFactory);
+
+public:
+  virtual ~FastFactory ();
+  static void deleteAll();
+
+  // functions to push and pop elements of this class
+  BaseObject* resurrect();
+  static BaseObject* resurrect(const NewClassID& classID);
+  void kill(BaseObject* object);
+  static void kill(BaseObject* object, bool searchForFastFactory);
+
+  void prepare(unsigned int count);
+
+  static void flushAll(bool hardFLUSH = false);
+  void flush(bool hardFLUSH = false);
+
+  /** @returns the first FastFactory */
+  inline static FastFactory* getFirst() { return FastFactory::first; };
+
+  static FastFactory* searchFastFactory(const NewClassID& classID);
+  static FastFactory* searchFastFactory(const std::string& fastFactoryName);
+
+  const NewClassID& getStoredID() const { return this->storedClassID; };
+
+protected:
+  FastFactory (const NewClassID& classID, const std::string& fastFactoryName = "");
+
+  /** sets the Next factory in the list @param nextFactory the next factory */
+  inline void setNext( FastFactory* nextFastFactory) { this->next = nextFastFactory; };
+  /** @returns the next FastFactory */
+  FastFactory* getNext() const { return this->next; };
+
+  /** generates a new Object of the Class T */
+  virtual void fabricate() = 0;
+
+private:
+  static void registerFastFactory(FastFactory* fastFactory);
+
+protected:
+  NewClassID            storedClassID;        //!< The classID of the specified class.
+  unsigned int          storedDeadObjects;    //!< How many dead objects are stored in this class
+
+  FastObjectMember*     deadList;             //!< A List of all stored dead Objects of this class.
+  FastObjectMember*     unusedContainers;     //!< This is a List of unused containers, that will be reused by kill.
+
+private:
+  static FastFactory*   first;                //!< A pointer to the first FastFactory.
+
+  FastFactory*          next;                 //!< pointer to the next FastFactory.
+};
+
+
+
+/**
+ *  a FastFactory that is able to load any kind of Object from a ClassID
+ * (this is a Functor)
+ */
+template<class T>
+class tFastFactory : public FastFactory
+{
+public:
+  static tFastFactory<T>* getFastFactory(const NewClassID& classID, const std::string& fastFactoryName);
+
+private:
+  tFastFactory(const NewClassID& classID, const std::string& fastFactoryName);
+
+  virtual void fabricate();
+};
+
+/**
+ * construnts a FastFactory with
+ * @param fastFactoryName the name of the FastFactory
+ * @param fastFactory the ID of the class
+ * @todo (can this be written in another form??)
+ */
+template<class T>
+tFastFactory<T>::tFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
+    : FastFactory(classID, fastFactoryName)
+{}
+
+/**
+ * creates (if not existent) a Factory of Class T, and assigns some values to it
+ * @param classID the ClassID to assign to this class
+ * @param fastFactoryName the name to assign
+ * @returns The FastFactory if existent a new Factory if not.
+ */
+template<class T>
+tFastFactory<T>* tFastFactory<T>::getFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
+{
+  tFastFactory<T>* tmpFac = NULL;
+  if (FastFactory::getFirst() != NULL)
+    tmpFac = static_cast<tFastFactory<T>*>(FastFactory::getFirst()->searchFastFactory(classID));
+
+  if (tmpFac != NULL)
+    return tmpFac;
+  else
+    return new tFastFactory<T>(classID, fastFactoryName);
+}
+
+/**
+ * fabricates an Object of Class T, that corresponds to classID.
+ */
+template<class T>
+void tFastFactory<T>::fabricate()
+{
+  FastObjectMember* tmpFirstDead = new FastObjectMember;
+  tmpFirstDead->objectPointer = new T();
+  tmpFirstDead->next = this->deadList;
+  ++this->storedDeadObjects;
+
+  this->deadList = tmpFirstDead;
+}
+
+#endif /* _FAST_FACTORY_H */
Index: branches/new_class_id/src/orxonox.cc
===================================================================
--- branches/new_class_id/src/orxonox.cc	(revision 9707)
+++ branches/new_class_id/src/orxonox.cc	(revision 9709)
@@ -46,9 +46,8 @@
 
 #include "util/loading/factory.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
 #include "benchmark.h"
 
-#include "class_list.h"
 #include "shell_command_class.h"
 #include "shell_command.h"
@@ -97,4 +96,5 @@
 REGISTER_ARG_ARG(  _, write_dict,  "compression", "writedict",    "write packets to DATA/dicts/newdict",               "numBytes" );
 
+NewObjectListDefinition(Orxonox);
 
 /**
@@ -105,5 +105,5 @@
 Orxonox::Orxonox ()
 {
-  this->setClassID(CL_ORXONOX, "Orxonox");
+  this->registerObject(this, Orxonox::_objectList);
   this->setName("orxonox-main");
 
@@ -146,5 +146,7 @@
 
   SDL_QuitSubSystem(SDL_INIT_TIMER);
-  ClassList::debug();
+
+
+  NewObjectListBase::debugAll(1);
 
   Preferences::getInstance()->save();
Index: branches/new_class_id/src/orxonox.h
===================================================================
--- branches/new_class_id/src/orxonox.h	(revision 9707)
+++ branches/new_class_id/src/orxonox.h	(revision 9709)
@@ -16,4 +16,5 @@
 */
 class Orxonox : public BaseObject {
+  NewObjectListDeclaration(Orxonox);
 
  public:
Index: branches/new_class_id/src/story_entities/campaign.cc
===================================================================
--- branches/new_class_id/src/story_entities/campaign.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/campaign.cc	(revision 9709)
@@ -27,4 +27,5 @@
 
 
+NewObjectListDefinition(Campaign);
 
 /**
@@ -36,5 +37,5 @@
 Campaign::Campaign ( TiXmlElement* root)
 {
-  this->setClassID(CL_CAMPAIGN, "Campaign");
+  this->registerObject(this, Campaign::_objectList);
 
   PRINTF(4)("Loading Campaign...\n");
Index: branches/new_class_id/src/story_entities/campaign.h
===================================================================
--- branches/new_class_id/src/story_entities/campaign.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/campaign.h	(revision 9709)
@@ -18,5 +18,5 @@
 class Campaign : public StoryEntity
 {
-
+  NewObjectListDeclaration(Campaign);
   public:
     Campaign( TiXmlElement* root);
Index: branches/new_class_id/src/story_entities/campaign_data.cc
===================================================================
--- branches/new_class_id/src/story_entities/campaign_data.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/campaign_data.cc	(revision 9709)
@@ -25,4 +25,5 @@
 
 
+NewObjectListDefinition(CampaignData);
 
 /**
@@ -31,5 +32,5 @@
 CampaignData::CampaignData(const TiXmlElement* root)
 {
-  this->setClassID(CL_CAMPAIGN_DATA, "CampaignData");
+  this->registerObject(this, CampaignData::_objectList);
 
   this->currentEntity = NULL;
Index: branches/new_class_id/src/story_entities/campaign_data.h
===================================================================
--- branches/new_class_id/src/story_entities/campaign_data.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/campaign_data.h	(revision 9709)
@@ -16,4 +16,5 @@
 class CampaignData : public DataTank
 {
+  NewObjectListDeclaration(CampaignData);
 
 public:
Index: branches/new_class_id/src/story_entities/dedicated_server_world.cc
===================================================================
--- branches/new_class_id/src/story_entities/dedicated_server_world.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/dedicated_server_world.cc	(revision 9709)
@@ -21,5 +21,5 @@
 
 #include "util/loading/load_param.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "util/loading/factory.h"
 
Index: branches/new_class_id/src/story_entities/game_world.cc
===================================================================
--- branches/new_class_id/src/story_entities/game_world.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/game_world.cc	(revision 9709)
@@ -22,5 +22,4 @@
 #include "util/loading/resource_manager.h"
 #include "state.h"
-#include "class_list.h"
 
 #include "util/loading/game_loader.h"
@@ -40,5 +39,5 @@
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "shell_command.h"
 
@@ -63,5 +62,6 @@
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(GameWorld, CL_GAME_WORLD,
+NewObjectListDefinition(GameWorld);
+CREATE_SCRIPTABLE_CLASS(GameWorld, GameWorld::classID(),
                         addMethod("setPlaymode", ExecutorLua1<GameWorld,const std::string&>(&GameWorld::setPlaymode))
                         ->addMethod("setSoundtrack", ExecutorLua1<GameWorld, const std::string&>(&GameWorld::setSoundtrack))
@@ -77,9 +77,8 @@
 
 
-
 GameWorld::GameWorld()
     : StoryEntity()
 {
-  this->setClassID(CL_GAME_WORLD, "GameWorld");
+  this->registerObject(this, GameWorld::_objectList);
   this->setName("Preloaded World - no name yet");
 
@@ -432,5 +431,5 @@
     // TICK everything
     for (i = 0; i < this->dataTank->tickLists.size(); ++i)
-      this->tick(this->dataTank->objectManager->getObjectList(this->dataTank->tickLists[i]), this->dtS);
+      this->tick(this->dataTank->objectManager->getEntityList(this->dataTank->tickLists[i]), this->dtS);
 
     /* update tick the rest */
@@ -471,25 +470,25 @@
 {
   // object-object collision detection
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-      this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-      this->dataTank->objectManager->getObjectList(OM_GROUP_00));
-
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-      this->dataTank->objectManager->getObjectList(OM_GROUP_02));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_02),
-      this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
-
-
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-      this->dataTank->objectManager->getObjectList(OM_COMMON));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-      this->dataTank->objectManager->getObjectList(OM_COMMON));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+      this->dataTank->objectManager->getEntityList(OM_GROUP_01_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+      this->dataTank->objectManager->getEntityList(OM_GROUP_00_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+      this->dataTank->objectManager->getEntityList(OM_GROUP_00));
+
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+      this->dataTank->objectManager->getEntityList(OM_GROUP_02));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_02),
+      this->dataTank->objectManager->getEntityList(OM_GROUP_01_PROJ));
+
+
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+      this->dataTank->objectManager->getEntityList(OM_COMMON));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+      this->dataTank->objectManager->getEntityList(OM_COMMON));
 
   // ground collision detection: BSP Model
-  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_00));
-  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_01));
+  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getEntityList(OM_GROUP_00));
+  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getEntityList(OM_GROUP_01));
 }
 
@@ -567,32 +566,29 @@
   //  glLoadIdentity();
 
-  const std::list<BaseObject*>* reflectedWaters;
   MappedWater* mw;
 
-  if( (reflectedWaters = ClassList::getList(CL_MAPPED_WATER)) != NULL)
-  {
-    std::list<BaseObject*>::const_iterator it;
-    for (it = reflectedWaters->begin(); it != reflectedWaters->end(); it++)
-    {
-      mw =  dynamic_cast<MappedWater*>(*it);
-
-      //camera and light
-      //this->dataTank->localCamera->apply ();
-      //this->dataTank->localCamera->project ();
-
-      LightManager::getInstance()->draw();
-
-
-      // prepare for reflection rendering
-      mw->activateReflection();
-
-      // draw everything to be included in the reflection
-      this->drawEntityList(State::getObjectManager()->getReflectionList());
-      //       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-      //         this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
-
-      // clean up from reflection rendering
-      mw->deactivateReflection();
-    }
+  for (NewObjectList<MappedWater>::const_iterator it = MappedWater::objectList().begin();
+       it != MappedWater::objectList().end();
+       ++it)
+  {
+    mw =  (*it);
+
+    //camera and light
+    //this->dataTank->localCamera->apply ();
+    //this->dataTank->localCamera->project ();
+
+    LightManager::getInstance()->draw();
+
+
+    // prepare for reflection rendering
+    mw->activateReflection();
+
+    // draw everything to be included in the reflection
+    this->drawEntityList(State::getObjectManager()->getReflectionList());
+    //       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
+    //         this->drawEntityList(State::getObjectManager()->getEntityList(this->dataTank->drawLists[i]));
+
+    // clean up from reflection rendering
+    mw->deactivateReflection();
   }
 
@@ -609,30 +605,27 @@
   //glLoadIdentity();
 
-  const std::list<BaseObject*>* reflectedWaters;
   MappedWater* mw;
 
-  if( (reflectedWaters = ClassList::getList(CL_MAPPED_WATER)) != NULL)
-  {
-    std::list<BaseObject*>::const_iterator it;
-    for (it = reflectedWaters->begin(); it != reflectedWaters->end(); it++)
-    {
-      mw =  dynamic_cast<MappedWater*>(*it);
-
-      //camera and light
-      //this->dataTank->localCamera->apply ();
-      //this->dataTank->localCamera->project ();
-      // prepare for reflection rendering
-      mw->activateRefraction();
-
-
-      LightManager::getInstance()->draw();
-      // draw everything to be included in the reflection
-      this->drawEntityList(State::getObjectManager()->getReflectionList());
-      //       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-      //         this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
-
-      // clean up from reflection rendering
-      mw->deactivateRefraction();
-    }
+  for (NewObjectList<MappedWater>::const_iterator it = MappedWater::objectList().begin();
+       it != MappedWater::objectList().end();
+       ++it)
+  {
+    mw =  dynamic_cast<MappedWater*>(*it);
+
+    //camera and light
+    //this->dataTank->localCamera->apply ();
+    //this->dataTank->localCamera->project ();
+    // prepare for reflection rendering
+    mw->activateRefraction();
+
+
+    LightManager::getInstance()->draw();
+    // draw everything to be included in the reflection
+    this->drawEntityList(State::getObjectManager()->getReflectionList());
+    //       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
+    //         this->drawEntityList(State::getObjectManager()->getEntityList(this->dataTank->drawLists[i]));
+
+    // clean up from reflection rendering
+    mw->deactivateRefraction();
   }
 }
@@ -659,10 +652,10 @@
   {
     /* Draw the BackGround */
-    this->drawEntityList(State::getObjectManager()->getObjectList(OM_BACKGROUND));
+    this->drawEntityList(State::getObjectManager()->getEntityList(OM_BACKGROUND));
     engine->drawBackgroundElements();
 
     /* draw all WorldEntiy groups */
     for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-      this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]));
+      this->drawEntityList(State::getObjectManager()->getEntityList(this->dataTank->drawLists[i]));
 
     AtmosphericEngine::getInstance()->draw();
@@ -672,5 +665,5 @@
       CDEngine* engine = CDEngine::getInstance();
       for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i)
-        engine->drawBV(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i]), this->showBVLevel);
+        engine->drawBV(State::getObjectManager()->getEntityList(this->dataTank->drawLists[i]), this->showBVLevel);
     }
 
Index: branches/new_class_id/src/story_entities/game_world.h
===================================================================
--- branches/new_class_id/src/story_entities/game_world.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/game_world.h	(revision 9709)
@@ -31,4 +31,6 @@
 class GameWorld : public StoryEntity
 {
+  NewObjectListDeclaration(GameWorld);
+
 public:
   GameWorld ();
Index: branches/new_class_id/src/story_entities/game_world_data.cc
===================================================================
--- branches/new_class_id/src/story_entities/game_world_data.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/game_world_data.cc	(revision 9709)
@@ -23,5 +23,4 @@
 #include "util/loading/resource_manager.h"
 #include "state.h"
-#include "class_list.h"
 #include "substring.h"
 
@@ -41,8 +40,9 @@
 
 #include "util/loading/factory.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "util/loading/load_param.h"
 
 #include "graphics_engine.h"
+#include "effects/graphics_effect.h"
 #include "effects/atmospheric_engine.h"
 #include "event_handler.h"
@@ -61,7 +61,5 @@
 
 
-
-
-
+NewObjectListDefinition(GameWorldData);
 /**
  * constructor of the GameWorldData
@@ -69,5 +67,5 @@
 GameWorldData::GameWorldData()
 {
-  this->setClassID(CL_GAME_WORLD_DATA, "GameWorldData");
+  this->registerObject(this, GameWorldData::_objectList);
 
   this->glmis = NULL;
@@ -215,10 +213,10 @@
 
       //todo do this more elegant
-      if( element->Value() == "SkyBox" && created->isA(CL_SKYBOX))
+      if( element->Value() == "SkyBox" && created->isA(SkyBox::classID()))
       {
         this->sky = dynamic_cast<WorldEntity*>(created);
         State::setSkyBox(dynamic_cast<SkyBox*>(this->sky));
       }
-      if( element->Value() == "Terrain" && created->isA(CL_TERRAIN))
+      if( element->Value() == "Terrain" && created->isA(Terrain::classID()))
       {
         this->terrain = dynamic_cast<Terrain*>(created);
@@ -236,10 +234,8 @@
 
   Playable* playable;
-  const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
-  if (playableList != NULL && !playableList->empty())
+  if (!Playable::objectList().empty())
   {
     /// TODO Make this also loadable
-    playable = dynamic_cast<Playable*>(playableList->front());
-    this->localPlayer->setPlayable(playable);
+    this->localPlayer->setPlayable(Playable::objectList().back());
   }
 
@@ -280,16 +276,8 @@
   GraphicsEngine::getInstance()->displayFPS(false);
   // erease everything that is left.
-  // delete PNode::getNullParent(); // not needed as this is also done in the next step (and also much cleaner)
-  const std::list<BaseObject*>* nodeList;
   //secondary cleanup of PNodes;
-  nodeList = ClassList::getList(CL_PARENT_NODE);
-  if (nodeList != NULL)
-    while (!nodeList->empty())
-    {
-      //    ClassList::debug( 3, CL_PARENT_NODE);
-      //    PNode::getNullParent()->debugNode(0);
-      //    printf("%s::%s\n", nodeList->front()->getClassCName(), nodeList->front()->getName());
-      delete nodeList->front();
-    }
+  while (!PNode::objectList().empty())
+    delete PNode::objectList().front();
+
   /* remove the player object */
   if( this->localPlayer)
@@ -302,14 +290,10 @@
   this->terrain = NULL;
 
-  nodeList = ClassList::getList(CL_GRAPHICS_EFFECT);
-  if (nodeList != NULL)
-    while (!nodeList->empty())
-      delete nodeList->front();
-
-
-  nodeList = ClassList::getList(CL_ELEMENT_2D);
-  if (nodeList != NULL)
-    while (!nodeList->empty())
-      delete nodeList->front();
+  while (!GraphicsEffect::objectList().empty())
+    delete GraphicsEffect::objectList().front();
+
+
+  while (!Element2D::objectList().empty())
+    delete Element2D::objectList().front();
 
   // At this Point all the WorldEntites should be unloaded.
@@ -414,5 +398,5 @@
     PRINTF(2)("creating %s\n", element->Value());
     BaseObject* created = Factory::fabricate(element);
-    if (created != NULL && created->isA(CL_GAME_RULES))
+    if (created != NULL && created->isA(GameRules::classID()))
     {
       this->gameRule = dynamic_cast<GameRules*>(created);
Index: branches/new_class_id/src/story_entities/game_world_data.h
===================================================================
--- branches/new_class_id/src/story_entities/game_world_data.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/game_world_data.h	(revision 9709)
@@ -30,4 +30,5 @@
 class GameWorldData : public DataTank
 {
+  NewObjectListDeclaration(GameWorldData);
   public:
     GameWorldData();
Index: branches/new_class_id/src/story_entities/menu/game_menu.cc
===================================================================
--- branches/new_class_id/src/story_entities/menu/game_menu.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/menu/game_menu.cc	(revision 9709)
@@ -22,5 +22,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "util/loading/load_param.h"
@@ -43,7 +42,8 @@
 #include "preferences.h"
 
+#include "class_id.h"
 //! This creates a Factory to fabricate a GameMenu
-CREATE_FACTORY(GameMenu, CL_GAME_MENU);
-
+NewObjectListDefinitionID(GameMenu, CL_GAME_MENU);
+CREATE_FACTORY(GameMenu);
 
 
@@ -51,5 +51,5 @@
     : GameWorld()
 {
-  this->setClassID(CL_GAME_MENU, "GameMenu");
+  this->registerObject(this, GameMenu::_objectList);
   this->setName("GameMenu uninitialized");
 
@@ -191,10 +191,10 @@
       image->setForegroundColor(Color( 1,1,1,.6));
 
-      const std::list<BaseObject*>* storyEntities = ClassList::getList(CL_STORY_ENTITY);
-      std::list<BaseObject*>::const_iterator it;
       bool first = true;
-      for( it = storyEntities->begin(); it != storyEntities->end(); it++)
+      for(NewObjectList<StoryEntity>::const_iterator it = StoryEntity::objectList().begin();
+	  it != StoryEntity::objectList().end();
+	  ++it)
       {
-        StoryEntity* se = dynamic_cast<StoryEntity*>(*it);
+        StoryEntity* se = *it;
         if( se->isContainedInMenu())
         {
Index: branches/new_class_id/src/story_entities/menu/game_menu.h
===================================================================
--- branches/new_class_id/src/story_entities/menu/game_menu.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/menu/game_menu.h	(revision 9709)
@@ -22,5 +22,5 @@
 class GameMenu : virtual public GameWorld, virtual public EventListener
 {
-
+  NewObjectListDeclaration(GameMenu);
   public:
     GameMenu(const TiXmlElement* root = NULL);
@@ -45,8 +45,8 @@
     void showMultiPlayer();
     void showOptionsMenu();
-    
+
     void showClientMenu();
     void connectToServer();
-    
+
     void showServerMenu();
     void createMasterServer();
@@ -69,5 +69,5 @@
     void setSelectorSound(const std::string& selectorSound);
 
-    
+
 
 
@@ -76,8 +76,8 @@
     OrxGui::GLGuiBox*                 levelsBox;
     OrxGui::GLGuiBox*                 networkBox;
-    
+
     OrxGui::GLGuiBox*                 clientNetworkBox;
     OrxGui::GLGuiInputLine*           ipInputLine;
-    
+
     OrxGui::GLGuiBox*                 serverNetworkBox;
 
Index: branches/new_class_id/src/story_entities/movie_loader.cc
===================================================================
--- branches/new_class_id/src/story_entities/movie_loader.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/movie_loader.cc	(revision 9709)
@@ -25,10 +25,11 @@
 
 
-
-CREATE_FACTORY(MovieLoader, CL_MOVIE_LOADER);
+#include "class_id.h"
+NewObjectListDefinitionID(MovieLoader, CL_MOVIE_LOADER);
+CREATE_FACTORY(MovieLoader);
 
 MovieLoader::MovieLoader(const TiXmlElement* root)
 {
-  this->setClassID(CL_MOVIE_LOADER, "MovieLoader");
+  this->registerObject(this, MovieLoader::_objectList);
 
   movie_player = new MoviePlayer();
Index: branches/new_class_id/src/story_entities/movie_loader.h
===================================================================
--- branches/new_class_id/src/story_entities/movie_loader.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/movie_loader.h	(revision 9709)
@@ -15,4 +15,5 @@
 class MovieLoader : public StoryEntity, virtual public EventListener
 {
+  NewObjectListDeclaration(MovieLoader);
   private:
     MoviePlayer* movie_player;
Index: branches/new_class_id/src/story_entities/multi_player_world.cc
===================================================================
--- branches/new_class_id/src/story_entities/multi_player_world.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/multi_player_world.cc	(revision 9709)
@@ -36,13 +36,13 @@
 SHELL_COMMAND(debug, MultiPlayerWorld, debug);
 
-
+#include "class_id.h"
 //! This creates a Factory to fabricate a MultiPlayerWorld
-CREATE_FACTORY(MultiPlayerWorld, CL_MULTI_PLAYER_WORLD);
-
+NewObjectListDefinitionID(MultiPlayerWorld, CL_MULTI_PLAYER_WORLD);
+CREATE_FACTORY(MultiPlayerWorld);
 
 MultiPlayerWorld::MultiPlayerWorld(const TiXmlElement* root)
   : GameWorld()
 {
-  this->setClassID(CL_MULTI_PLAYER_WORLD, "MultiPlayerWorld");
+  this->registerObject(this, MultiPlayerWorld::_objectList);
 
   this->dataTank = new MultiPlayerWorldData();
@@ -95,46 +95,46 @@
 void MultiPlayerWorld::collisionDetection()
 {
-  //CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS), this->dataTank->objectManager->getObjectList(OM_PLAYERS));
+  //CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_PLAYERS), this->dataTank->objectManager->getEntityList(OM_PLAYERS));
 
   PRINTF(5)("\n-----------------------------------------\nchecking OM_PLAYERS vs OM_GROUP_01_PROJ\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_PLAYERS),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_00_PROJ));
   PRINTF(5)("\n-----------------------------------------\nchecking OM_PLAYERS vs OM_GROUP_01_PROJ\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_PLAYERS),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_01_PROJ));
   PRINTF(5)("\n-----------------------------------------\nchecking OM_PLAYERS vs OM_PLAYERS_PROJ\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS),
-    this->dataTank->objectManager->getObjectList(OM_PLAYERS_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_PLAYERS),
+    this->dataTank->objectManager->getEntityList(OM_PLAYERS_PROJ));
 
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-  this->dataTank->objectManager->getObjectList(OM_PLAYERS));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-  this->dataTank->objectManager->getObjectList(OM_PLAYERS));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+  this->dataTank->objectManager->getEntityList(OM_PLAYERS));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+  this->dataTank->objectManager->getEntityList(OM_PLAYERS));
 
 
 
   PRINTF(5)("\n-----------------------------------------\nchecking OM_GROUP_00 vs OM_GROUP_01_PROJ\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_01_PROJ));
   PRINTF(5)("\n-----------------------------------------\nchecking OM_GROUP_00 vs OM_GROUP_01\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_01));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
-    this->dataTank->objectManager->getObjectList(OM_PLAYERS_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_01));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_00),
+    this->dataTank->objectManager->getEntityList(OM_PLAYERS_PROJ));
 
   PRINTF(5)("\n-----------------------------------------\nchecking OM_GROUP_01 vs OM_GROUP_00_PROJ\n\n");
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-    this->dataTank->objectManager->getObjectList(OM_GROUP_00));
-  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
-    this->dataTank->objectManager->getObjectList(OM_PLAYERS_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_00_PROJ));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+    this->dataTank->objectManager->getEntityList(OM_GROUP_00));
+  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getEntityList(OM_GROUP_01),
+    this->dataTank->objectManager->getEntityList(OM_PLAYERS_PROJ));
 
 
 
     // ground collision detection: BSP Model
-  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_00));
-  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_GROUP_01));
-  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getObjectList(OM_PLAYERS));
+  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getEntityList(OM_GROUP_00));
+  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getEntityList(OM_GROUP_01));
+  CDEngine::getInstance()->checkCollisionGround(this->dataTank->objectManager->getEntityList(OM_PLAYERS));
 }
 
Index: branches/new_class_id/src/story_entities/multi_player_world.h
===================================================================
--- branches/new_class_id/src/story_entities/multi_player_world.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/multi_player_world.h	(revision 9709)
@@ -20,5 +20,5 @@
  */
 class MultiPlayerWorld : public GameWorld {
-
+  NewObjectListDeclaration(MultiPlayerWorld);
  public:
   MultiPlayerWorld (const TiXmlElement* root = NULL);
@@ -26,5 +26,5 @@
 
   virtual void loadParams(const TiXmlElement* root);
-  
+
   virtual ErrorMessage unloadData();
 
Index: branches/new_class_id/src/story_entities/multi_player_world_data.cc
===================================================================
--- branches/new_class_id/src/story_entities/multi_player_world_data.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/multi_player_world_data.cc	(revision 9709)
@@ -20,5 +20,4 @@
 #include "util/loading/resource_manager.h"
 #include "state.h"
-#include "class_list.h"
 #include "substring.h"
 
@@ -40,5 +39,5 @@
 
 #include "util/loading/factory.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "util/loading/load_param.h"
 
@@ -50,8 +49,4 @@
 
 #include "glmenu_imagescreen.h"
-
-
-
-
 
 
@@ -313,14 +308,12 @@
 {
   PRINT(0)("==================================================\n");
+
   Playable* playable;
-  const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
-  assert(playableList != NULL);
-  std::list<BaseObject*>::const_iterator entity;
-
-
-
-  for (entity = playableList->begin(); entity != playableList->end(); entity++)
-  {
-    Playable* p = dynamic_cast<Playable*>(*entity);
+
+  for (NewObjectList<Playable>::const_iterator entity = Playable::objectList().begin();
+       entity != Playable::objectList().end();
+      ++entity)
+  {
+    Playable* p = *entity;
     PRINTF(0)("Got a playable, class: %s, name: %s, uid: %i\n", (*entity)->getClassCName(), (*entity)->getCName(), p->getUniqueID());
   }
@@ -329,5 +322,5 @@
   if( this->toggle)
   {
-    playable = dynamic_cast<Playable*>(playableList->front());
+    playable = Playable::objectList().front();
     this->localPlayer->setPlayable(playable);
     this->toggle = !this->toggle;
@@ -335,5 +328,5 @@
   else
   {
-    playable = dynamic_cast<Playable*>(playableList->back());
+    playable = Playable::objectList().back();
     this->localPlayer->setPlayable(playable);
     this->toggle = !this->toggle;
Index: branches/new_class_id/src/story_entities/single_player_world.cc
===================================================================
--- branches/new_class_id/src/story_entities/single_player_world.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/single_player_world.cc	(revision 9709)
@@ -20,8 +20,7 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "util/loading/load_param.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "util/loading/factory.h"
 
@@ -30,16 +29,13 @@
 
 
-
-
-
+#include "class_id.h"
 //! This creates a Factory to fabricate a SinglePlayerWorld
-CREATE_FACTORY(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);
-
-
+NewObjectListDefinitionID(SinglePlayerWorld, CL_SINGLE_PLAYER_WORLD);
+CREATE_FACTORY(SinglePlayerWorld);
 
 SinglePlayerWorld::SinglePlayerWorld(const TiXmlElement* root)
   : GameWorld()
 {
-  this->setClassID(CL_SINGLE_PLAYER_WORLD, "SinglePlayerWorld");
+  this->registerObject(this, SinglePlayerWorld::_objectList);
   this->setName("SinglePlayerWorld uninitialized");
 
Index: branches/new_class_id/src/story_entities/single_player_world.h
===================================================================
--- branches/new_class_id/src/story_entities/single_player_world.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/single_player_world.h	(revision 9709)
@@ -22,4 +22,5 @@
 class SinglePlayerWorld : public GameWorld
 {
+  NewObjectListDeclaration(SinglePlayerWorld);
 
   public:
Index: branches/new_class_id/src/story_entities/story_entity.cc
===================================================================
--- branches/new_class_id/src/story_entities/story_entity.cc	(revision 9707)
+++ branches/new_class_id/src/story_entities/story_entity.cc	(revision 9709)
@@ -27,5 +27,5 @@
 
 
-
+NewObjectListDefinition(StoryEntity);
 
 /**
@@ -34,5 +34,5 @@
 StoryEntity::StoryEntity ()
 {
-  this->setClassID(CL_STORY_ENTITY, "StoryEntity");
+  this->registerObject(this, StoryEntity::_objectList);
 
   this->bInit = false;
Index: branches/new_class_id/src/story_entities/story_entity.h
===================================================================
--- branches/new_class_id/src/story_entities/story_entity.h	(revision 9707)
+++ branches/new_class_id/src/story_entities/story_entity.h	(revision 9709)
@@ -26,4 +26,5 @@
 class StoryEntity : virtual public BaseObject
 {
+  NewObjectListDeclaration(StoryEntity);
 
 public:
Index: branches/new_class_id/src/subprojects/network/simple_sync.cc
===================================================================
--- branches/new_class_id/src/subprojects/network/simple_sync.cc	(revision 9707)
+++ branches/new_class_id/src/subprojects/network/simple_sync.cc	(revision 9709)
@@ -23,5 +23,5 @@
 
 #include "class_id.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "lib/util/loading/factory.h"
 
Index: branches/new_class_id/src/util/Makefile.am
===================================================================
--- branches/new_class_id/src/util/Makefile.am	(revision 9707)
+++ branches/new_class_id/src/util/Makefile.am	(revision 9709)
@@ -4,5 +4,5 @@
 noinst_LIBRARIES = libORXutils.a
 
-libORXutils_a_SOURCES = fast_factory.cc \
+libORXutils_a_SOURCES = \
 			object_manager.cc \
 			state.cc \
@@ -31,5 +31,5 @@
 			track/track_node.cc
 
-noinst_HEADERS =        fast_factory.h \
+noinst_HEADERS =        \
 			object_manager.h \
 			state.h \
Index: branches/new_class_id/src/util/fast_factory.cc
===================================================================
--- branches/new_class_id/src/util/fast_factory.cc	(revision 9707)
+++ 	(revision )
@@ -1,284 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 orx
-
-   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, or (at your option)
-   any later version.
-
-### File Specific:
-   main-programmer: Benjamin Grauer
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
-
-#include "fast_factory.h"
-
-#include "compiler.h"
-#include "debug.h"
-#include <string.h>
-
-
-NewObjectListDefinition(FastFactory);
-
-/**
- * @brief Initializes a FastFactory
- * @param classID the ClassID this Class belongs to (the top-most)
- * @param fastFactoryName the Name of the ObjectClass-handled here
- * @return a new FastFactory
- */
-FastFactory::FastFactory (const NewClassID& classID, const std::string& fastFactoryName)
-{
-  this->registerObject(this, FastFactory::_objectList);
-  this->setName(fastFactoryName);
-
-  this->storedClassID = classID;
-  this->next = NULL;
-
-  this->deadList = NULL;
-  this->unusedContainers = NULL;
-
-  this->storedDeadObjects = 0;
-
-  FastFactory::registerFastFactory(this);
-}
-
-/** a reference to the First FastFactory */
-FastFactory* FastFactory::first = NULL;
-
-/**
- *  destructor
- * deletes all the Instances of the FastFactory.
- */
-FastFactory::~FastFactory ()
-{
-  if (this == first)
-    this->first = NULL;
-  this->flush();
-
-  if (this->next)
-    delete this->next;
-}
-
-/**
- * deletes all FastFactories
- */
-void FastFactory::deleteAll()
-{
-  if (FastFactory::first)
-    delete FastFactory::first;
-}
-
-/**
- * registers a Factory to the List of known factories.
- * @param fastFactory The factory to add
- *
- * needed, to step through all the FastFactories.
- */
-void FastFactory::registerFastFactory(FastFactory* fastFactory)
-{
-  PRINTF(4)("Registered FastFactory for '%s'\n", fastFactory->getCName());
-
-  if( FastFactory::first == NULL)
-    FastFactory::first = fastFactory;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while( tmpFac->next != NULL)
-      tmpFac = tmpFac->next;
-    tmpFac->setNext(fastFactory);
-  }
-}
-
-/**
- * searches for a FastFactory
- * @param classID the ClassID of the FastFactory to search for
- * @returns true if found, false otherwise.
- */
-FastFactory* FastFactory::searchFastFactory(const NewClassID& classID)
-{
-  if (FastFactory::first == NULL)
-    return NULL;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (tmpFac->storedClassID == classID)
-        return tmpFac;
-      tmpFac = tmpFac->next;
-    }
-  }
-  return NULL;
-}
-
-/**
- * searches for a FastFactory
- * @param classID the ClassID of the FastFactory to search for
- * @returns true if found, false otherwise.
- */
-FastFactory* FastFactory::searchFastFactory(const std::string& fastFactoryName)
-{
-  if (FastFactory::first == NULL)
-    return NULL;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (fastFactoryName == tmpFac->getCName())
-        return tmpFac;
-      tmpFac = tmpFac->next;
-    }
-  }
-  return NULL;
-}
-
-/**
- * Removes all the stored Containers, and sets the Lists back to emptienes.
- * @param hardFLUSH if true the containing Objects will also be deleted !! THIS IS DANGEROUS !!
- */
-void FastFactory::flushAll(bool hardFLUSH)
-{
-  FastFactory* tmpFac = FastFactory::first;
-  while (tmpFac != NULL)
-  {
-    PRINTF(4)("DELETEING ALL OF %s\n",tmpFac->getCName());
-    tmpFac->flush(hardFLUSH);
-    tmpFac = tmpFac->next;
-  }
-}
-
-/**
- * ereases all the remaining containers, without deleting the stored Objects inside of them.
- * @param hardFLUSH if the the containing Objects will also be deleted !! THIS IS DANGEROUS !!
- */
-void FastFactory::flush(bool hardFLUSH)
-{
-  FastObjectMember* tmpMember = this->deadList, *delMember = NULL;
-  while (tmpMember != NULL)
-  {
-    delMember = tmpMember;
-    tmpMember = tmpMember->next;
-    if (hardFLUSH)
-    {
-      delete delMember->objectPointer;
-    }
-    delete delMember;
-  }
-  this->deadList = NULL;
-
-  tmpMember = this->unusedContainers;
-  while (tmpMember != NULL)
-  {
-    delMember = tmpMember;
-    tmpMember = tmpMember->next;
-    delete delMember;
-  }
-  this->unusedContainers = NULL;
-}
-
-/**
- * generates count new Object of the Corresponding class. (precaching)
- * @param count How many instances of the class should be generated.
- */
-void FastFactory::prepare(unsigned int count)
-{
-/*  if (this->storedDeadObjects + this->storedLivingObjects >= count)
-  {
-  PRINTF(3)("not creating new Objects for class %s, because the requested count already exists\n", this->getClassCName());
-}*/
-  for (unsigned int i = this->storedDeadObjects; i < count; i++)
-  {
-    this->fabricate();
-  }
-}
-
-/**
- * gives back live to one Object.
- * @return the Object to resurrect.
- */
-BaseObject* FastFactory::resurrect()
-{
-  PRINTF(4)("Resurecting Object of type %s\n", this->getCName());
-  if (unlikely(this->deadList == NULL))
-  {
-    PRINTF(3)("The deadList of Class %s is empty, this may be either because it has not been filled yet, or the cache is to small.\n" \
-        "  Developer: try increasing the count with FastFactory::prepare(contHigher than actual)\n" \
-        "    Fabricating a new %s\n", this->getCName(), this->getCName());
-    this->fabricate();
-    return this->resurrect();
-  }
-  else
-  {
-    FastObjectMember* tmpC = this->deadList;
-    this->deadList = this->deadList->next;
-
-    tmpC->next = this->unusedContainers;
-    this->unusedContainers = tmpC;
-
-    return tmpC->objectPointer;
-  }
-}
-
-/**
- * gives back live to one Object.
- * @param classID the class From which to resurrect an Object.
- * @return the Object to resurrect, NULL if classID is not found.
- */
-BaseObject* FastFactory::resurrect(const NewClassID& classID)
-{
-  FastFactory* tmpFac = FastFactory::getFirst();
-
-  while (tmpFac != NULL)
-  {
-    if (classID == tmpFac->storedClassID)
-      return tmpFac->resurrect();
-    tmpFac = tmpFac->next;
-  }
-  return NULL;
-}
-
-/**
- * kills Object object, meaning, that it will be stored in the deadList of the FastFactory, and waiting for resurrection
- * @param object the Object to kill.
- *
- * synony that would be really grate would be abolish, but this is more like exterminate than pause-mode.
- */
-void FastFactory::kill(BaseObject* object)
-{
-  FastObjectMember* tmpC;
-  if (unlikely(this->unusedContainers == NULL))
-  {
-    tmpC = new FastObjectMember;
-  }
-  else
-  {
-    tmpC = this->unusedContainers;
-    this->unusedContainers = this->unusedContainers->next;
-  }
-
-  tmpC->next = this->deadList;
-  tmpC->objectPointer = object;
-  this->deadList = tmpC;
-}
-
-
-void FastFactory::kill(BaseObject* object, bool searchForFastFactory)
-{
-  if (likely(searchForFastFactory == true))
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (object->isA(tmpFac->storedClassID))
-      {
-        tmpFac->kill(object);
-        return;
-      }
-      tmpFac = tmpFac->next;
-    }
-  }
-}
Index: branches/new_class_id/src/util/fast_factory.h
===================================================================
--- branches/new_class_id/src/util/fast_factory.h	(revision 9707)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/*!
- * @file fast_factory.h
- * The ObjectManager (FastFactory) is designed, to automatically generate and remove
- * (without to much overhead) many instances of different classes.
- *
- * It is especially usefull for objects, that come only for a short time into existence,
- * and get killed after a small amount of time (like shots).
- *
- * The Creation of an Object is usually done in the Weapon Class, where one subscribes
- * a Projectile with:
- * this->bulletFactory = tFastFactory<TestBullet>::getFastFactory(CL_TEST_BULLET, "TestBullet");
- * (this might change over time).
- * Then you can at loading time initialize an amount of the class with something like:
- * this->bulletFactory->prepare(100); // creates 100 entities of TestBullet (dead ones)
- * afterwards one can just retrieve an Object form the Class with
- * this->bulletFactory->resurrect();  // this returns a BaseObject an Object of the class.
- *
- * The big difference to the FastFactory-class is, that this one is used more for the purpose
- * of fast game-interaction than for loading. althought one can also load FastFactorized classes
- * it is not the main topic.
- */
-
-#ifndef _FAST_FACTORY_H
-#define _FAST_FACTORY_H
-
-#include "base_object.h"
-/**
- * Creates a FastFactory to a Createable FastFactory.
- */
-#define CREATE_FAST_FACTORY(CLASS_NAME, CLASS_ID) \
-  FastFactory* global_##CLASS_NAME##_FastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_ID, #CLASS_NAME)
-/**
- * Creates a FastFactory for a Class' static function named ClassName::fastFactory.
- * @param CLASS_NAME the name of the Class to create the fast-factory for.
- * @param CLASS_ID the ID of the class to create the fast-factory for @see "class_id.h"
- *
- * notice, that the Class to be called, must implement:
- * static FastFactory*         fastFactory;
- */
-#define CREATE_FAST_FACTORY_STATIC(CLASS_NAME) \
-  FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::classID(), #CLASS_NAME)
-
-//! A struct, that holds Lists of Objects of a certain type.
-typedef struct FastObjectMember
-{
-  BaseObject*          objectPointer;      //!< Pointer to the Object Stored in this Class (if it is the DeadList, else it is bork)
-
-  FastObjectMember*    next;               //!< the next stored FastObjectMember. (or NULL if this is the last one stored in either the deadList or the unusedContainers)
-};
-
-//! The FastFactory is a fast loadable object creator, and Dynamic List of dead object handler.
-/**
- * The ObjectManager (FastFactory) is designed, to automatically generate and remove
- * (without to much overhead) many instances of different classes.
- *
- * FastFactory is needed to glue all the tFastFactories together.
- * It is also the general class that implements the necessary functions
- * to generate, resurrect kill and stuff...
- */
-class FastFactory : public BaseObject
-{
-  NewObjectListDeclaration(FastFactory);
-
-public:
-  virtual ~FastFactory ();
-  static void deleteAll();
-
-  // functions to push and pop elements of this class
-  BaseObject* resurrect();
-  static BaseObject* resurrect(const NewClassID& classID);
-  void kill(BaseObject* object);
-  static void kill(BaseObject* object, bool searchForFastFactory);
-
-  void prepare(unsigned int count);
-
-  static void flushAll(bool hardFLUSH = false);
-  void flush(bool hardFLUSH = false);
-
-  /** @returns the first FastFactory */
-  inline static FastFactory* getFirst() { return FastFactory::first; };
-
-  static FastFactory* searchFastFactory(const NewClassID& classID);
-  static FastFactory* searchFastFactory(const std::string& fastFactoryName);
-
-  const NewClassID& getStoredID() const { return this->storedClassID; };
-
-protected:
-  FastFactory (const NewClassID& classID, const std::string& fastFactoryName = "");
-
-  /** sets the Next factory in the list @param nextFactory the next factory */
-  inline void setNext( FastFactory* nextFastFactory) { this->next = nextFastFactory; };
-  /** @returns the next FastFactory */
-  FastFactory* getNext() const { return this->next; };
-
-  /** generates a new Object of the Class T */
-  virtual void fabricate() = 0;
-
-private:
-  static void registerFastFactory(FastFactory* fastFactory);
-
-protected:
-  NewClassID            storedClassID;        //!< The classID of the specified class.
-  unsigned int          storedDeadObjects;    //!< How many dead objects are stored in this class
-
-  FastObjectMember*     deadList;             //!< A List of all stored dead Objects of this class.
-  FastObjectMember*     unusedContainers;     //!< This is a List of unused containers, that will be reused by kill.
-
-private:
-  static FastFactory*   first;                //!< A pointer to the first FastFactory.
-
-  FastFactory*          next;                 //!< pointer to the next FastFactory.
-};
-
-
-
-/**
- *  a FastFactory that is able to load any kind of Object from a ClassID
- * (this is a Functor)
- */
-template<class T>
-class tFastFactory : public FastFactory
-{
-public:
-  static tFastFactory<T>* getFastFactory(const NewClassID& classID, const std::string& fastFactoryName = NULL);
-
-private:
-  tFastFactory(const NewClassID& classID, const std::string& fastFactoryName);
-
-  virtual void fabricate();
-};
-
-/**
- * construnts a FastFactory with
- * @param fastFactoryName the name of the FastFactory
- * @param fastFactory the ID of the class
- * @todo (can this be written in another form??)
- */
-template<class T>
-tFastFactory<T>::tFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
-    : FastFactory(classID, fastFactoryName)
-{}
-
-/**
- * creates (if not existent) a Factory of Class T, and assigns some values to it
- * @param classID the ClassID to assign to this class
- * @param fastFactoryName the name to assign
- * @returns The FastFactory if existent a new Factory if not.
- */
-template<class T>
-tFastFactory<T>* tFastFactory<T>::getFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
-{
-  tFastFactory<T>* tmpFac = NULL;
-  if (FastFactory::getFirst() != NULL)
-    tmpFac = static_cast<tFastFactory<T>*>(FastFactory::getFirst()->searchFastFactory(classID));
-
-  if (tmpFac != NULL)
-    return tmpFac;
-  else
-    return new tFastFactory<T>(classID, fastFactoryName);
-}
-
-/**
- * fabricates an Object of Class T, that corresponds to classID.
- */
-template<class T>
-void tFastFactory<T>::fabricate()
-{
-  FastObjectMember* tmpFirstDead = new FastObjectMember;
-  tmpFirstDead->objectPointer = new T();
-  tmpFirstDead->next = this->deadList;
-  ++this->storedDeadObjects;
-
-  this->deadList = tmpFirstDead;
-}
-
-#endif /* _FAST_FACTORY_H */
Index: branches/new_class_id/src/util/kill_target.cc
===================================================================
--- branches/new_class_id/src/util/kill_target.cc	(revision 9707)
+++ branches/new_class_id/src/util/kill_target.cc	(revision 9709)
@@ -23,6 +23,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(KillTarget, CL_KILL_TARGET);
 NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
+CREATE_FACTORY(KillTarget);
 
 
Index: branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9707)
+++ branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9709)
@@ -50,6 +50,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
 NewObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
+CREATE_FACTORY(MultiplayerTeamDeathmatch);
 /**
  * constructor
Index: branches/new_class_id/src/util/singleplayer_shootemup.cc
===================================================================
--- branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9707)
+++ branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9709)
@@ -26,6 +26,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
 NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
+CREATE_FACTORY(SingleplayerShootemup);
 
 /**
Index: branches/new_class_id/src/world_entities/bsp_entity.cc
===================================================================
--- branches/new_class_id/src/world_entities/bsp_entity.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/bsp_entity.cc	(revision 9709)
@@ -18,5 +18,7 @@
 #include "util/loading/resource_manager.h"
 
-CREATE_FACTORY(BspEntity, CL_BSP_ENTITY);
+#include "class_id.h"
+NewObjectListDefinitionID(BspEntity, CL_BSP_ENTITY);
+CREATE_FACTORY(BspEntity);
 
 
@@ -51,4 +53,5 @@
 void BspEntity::init()
 {
+  this->registerObject(this, BspEntity::_objectList);
 
   this->bspManager = NULL;
@@ -69,5 +72,4 @@
   if ( File(ResourceManager::getFullName(name)).exists()  ) {
 
-    this->setClassID(CL_BSP_ENTITY, "BspEntity");
     this->bspManager = new BspManager(this);
 
Index: branches/new_class_id/src/world_entities/character_attributes.cc
===================================================================
--- branches/new_class_id/src/world_entities/character_attributes.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/character_attributes.cc	(revision 9709)
@@ -1,5 +1,5 @@
 
 
-/* 
+/*
    orxonox - the future of 3D-vertical-scrollers
 
@@ -18,7 +18,7 @@
 
 #include "character_attributes.h"
-#include "stdincl.h" 
-
-
+
+
+NewObjectListDefinition(CharacterAttributes);
 
 
@@ -27,7 +27,7 @@
    @todo this constructor is not jet implemented - do it
 */
-CharacterAttributes::CharacterAttributes () 
-{
-   this->setClassID(CL_CHARACTER_ATTRIBUTES, "CharacterAttributes");
+CharacterAttributes::CharacterAttributes ()
+{
+  this->registerObject(this, CharacterAttributes::_objectList);
 }
 
@@ -37,5 +37,5 @@
 
 */
-CharacterAttributes::~CharacterAttributes () 
+CharacterAttributes::~CharacterAttributes ()
 {
 }
@@ -97,5 +97,5 @@
 
 /**
- *  sets maximum health 
+ *  sets maximum health
  * @param health
 
@@ -130,5 +130,5 @@
  *  adds shield strength
  * @param strength
-   
+
    there is currently no limit to shieldstrength
  */
@@ -290,5 +290,5 @@
 /*=====================energy=====================*/
 /**
- *  sets the amount of energy 
+ *  sets the amount of energy
  * @param energy
  */
@@ -332,5 +332,5 @@
 
 /**
- *  gets the amount of energy 
+ *  gets the amount of energy
  * @returns energy
  */
@@ -358,5 +358,5 @@
   return this->energyConsumption;
 }
-  
+
 
 /**
Index: branches/new_class_id/src/world_entities/character_attributes.h
===================================================================
--- branches/new_class_id/src/world_entities/character_attributes.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/character_attributes.h	(revision 9709)
@@ -15,4 +15,5 @@
 */
 class CharacterAttributes : public BaseObject {
+    NewObjectListDeclaration(CharacterAttributes);
 
  public:
Index: branches/new_class_id/src/world_entities/creatures/fps_player.cc
===================================================================
--- branches/new_class_id/src/world_entities/creatures/fps_player.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/creatures/fps_player.cc	(revision 9709)
@@ -32,5 +32,5 @@
 
 #include "aabb.h"
-
+#include "bsp_entity.h"
 
 #include "key_mapper.h"
@@ -41,9 +41,10 @@
 
 
-
-CREATE_FACTORY(FPSPlayer, CL_FPS_PLAYER);
+#include "class_id.h"
+NewObjectListDefinitionID(FPSPlayer, CL_FPS_PLAYER);
+CREATE_FACTORY(FPSPlayer);
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(FPSPlayer, CL_FPS_PLAYER,
+CREATE_SCRIPTABLE_CLASS(FPSPlayer, FPSPlayer::classID(),
                         addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
@@ -85,5 +86,5 @@
 void FPSPlayer::init()
 {
-  this->setClassID(CL_FPS_PLAYER, "FPSPlayer");
+  this->registerObject(this, FPSPlayer::_objectList);
 
   this->bLeft = false;
@@ -166,5 +167,5 @@
 
     //subscribe to collision reaction
-  this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, CL_BSP_ENTITY);
+  this->subscribeReaction(CREngine::CR_PHYSICS_FULL_WALK, BspEntity::classID());
 
   this->initWeapon = false;
Index: branches/new_class_id/src/world_entities/creatures/fps_player.h
===================================================================
--- branches/new_class_id/src/world_entities/creatures/fps_player.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/creatures/fps_player.h	(revision 9709)
@@ -16,4 +16,5 @@
 class FPSPlayer : public Playable
 {
+  NewObjectListDeclaration(FPSPlayer);
 
   public:
Index: branches/new_class_id/src/world_entities/creatures/md2_creature.cc
===================================================================
--- branches/new_class_id/src/world_entities/creatures/md2_creature.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/creatures/md2_creature.cc	(revision 9709)
@@ -37,5 +37,7 @@
 #include "debug.h"
 
-CREATE_FACTORY(MD2Creature, CL_MD2_CREATURE);
+#include "class_id.h"
+NewObjectListDefinitionID(MD2Creature, CL_MD2_CREATURE);
+CREATE_FACTORY(MD2Creature);
 
 /**
@@ -86,5 +88,5 @@
   PRINTF(4)("MD2CREATURE INIT\n");
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_MD2_CREATURE, "MD2Creature");
+  this->registerObject(this, MD2Creature::_objectList);
 
   this->toList(OM_GROUP_01);
@@ -95,5 +97,5 @@
   Weapon* wpLeft = new TestGun(1);
   wpLeft->setName("testGun Left");
-  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
+  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Cannon"));
 
   cannon->setName("BFG");
@@ -112,5 +114,5 @@
   this->cameraConnNode.addChild(State::getCameraNode());
   State::getCameraTargetNode()->setRelCoor(10,0,0);
- 
+
 
 
Index: branches/new_class_id/src/world_entities/creatures/md2_creature.h
===================================================================
--- branches/new_class_id/src/world_entities/creatures/md2_creature.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/creatures/md2_creature.h	(revision 9709)
@@ -16,4 +16,5 @@
 class MD2Creature : public Playable
 {
+  NewObjectListDeclaration(MD2Creature);
 
   public:
Index: branches/new_class_id/src/world_entities/effects/billboard.cc
===================================================================
--- branches/new_class_id/src/world_entities/effects/billboard.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/effects/billboard.cc	(revision 9709)
@@ -27,6 +27,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(Billboard, CL_BILLBOARD);
 NewObjectListDefinitionID(Billboard, CL_BILLBOARD);
+CREATE_FACTORY(Billboard);
 
 /**
Index: branches/new_class_id/src/world_entities/effects/explosion.cc
===================================================================
--- branches/new_class_id/src/world_entities/effects/explosion.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/effects/explosion.cc	(revision 9709)
@@ -18,5 +18,5 @@
 #include "explosion.h"
 
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
 #include "state.h"
@@ -28,6 +28,6 @@
 
 #include "class_id.h"
+NewObjectListDefinitionID(Explosion, CL_EXPLOSION);
 CREATE_FAST_FACTORY_STATIC(Explosion);
-NewObjectListDefinitionID(Explosion, CL_EXPLOSION);
 
 /**
Index: branches/new_class_id/src/world_entities/effects/lightning_bolt.cc
===================================================================
--- branches/new_class_id/src/world_entities/effects/lightning_bolt.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/effects/lightning_bolt.cc	(revision 9709)
@@ -25,7 +25,7 @@
 
 
-
-CREATE_FACTORY(LightningBolt, CL_LIGHTNING_BOLT);
-
+#include "class_id.h"
+NewObjectListDefinitionID(LightningBolt, CL_LIGHTNING_BOLT);
+CREATE_FACTORY(LightningBolt);
 
 /**
@@ -34,5 +34,5 @@
 LightningBolt::LightningBolt (const TiXmlElement* root)
 {
-  this->setClassID(CL_LIGHTNING_BOLT, "LightningBolt");
+  this->registerObject(this, LightningBolt::_objectList);
 
   this->toList(OM_COMMON);
Index: branches/new_class_id/src/world_entities/effects/lightning_bolt.h
===================================================================
--- branches/new_class_id/src/world_entities/effects/lightning_bolt.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/effects/lightning_bolt.h	(revision 9709)
@@ -21,4 +21,5 @@
 class LightningBolt : public WorldEntity
 {
+  NewObjectListDeclaration(LightningBolt);
   public:
     LightningBolt(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/elements/image_entity.cc
===================================================================
--- branches/new_class_id/src/world_entities/elements/image_entity.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/elements/image_entity.cc	(revision 9709)
@@ -30,5 +30,7 @@
 
 
-CREATE_FACTORY(ImageEntity, CL_IMAGE_ENTITY);
+#include "class_id.h"
+NewObjectListDefinitionID(ImageEntity, CL_IMAGE_ENTITY);
+CREATE_FACTORY(ImageEntity);
 
 
@@ -59,5 +61,5 @@
 void ImageEntity::init()
 {
-  this->setClassID(CL_IMAGE_ENTITY, "ImageEntity");
+  this->registerObject(this, ImageEntity::_objectList);
   this->setName("ImageEntity");
 
Index: branches/new_class_id/src/world_entities/elements/image_entity.h
===================================================================
--- branches/new_class_id/src/world_entities/elements/image_entity.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/elements/image_entity.h	(revision 9709)
@@ -21,4 +21,5 @@
 //! A class that enables the
 class ImageEntity : public PNode, public Element2D {
+  NewObjectListDeclaration(ImageEntity);
 
  public:
Index: branches/new_class_id/src/world_entities/elements/text_element.cc
===================================================================
--- branches/new_class_id/src/world_entities/elements/text_element.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/elements/text_element.cc	(revision 9709)
@@ -27,6 +27,7 @@
 
 
-
-CREATE_FACTORY(TextElement, CL_TEXT_ELEMENT);
+#include "class_id.h"
+NewObjectListDefinitionID(TextElement, CL_TEXT_ELEMENT);
+CREATE_FACTORY(TextElement);
 
 
@@ -36,5 +37,5 @@
 TextElement::TextElement (const TiXmlElement* root)
 {
-  this->setClassID(CL_TEXT_ELEMENT, "TextElement");
+  this->registerObject(this, TextElement::_objectList);
   this->setName("TextElement");
 
Index: branches/new_class_id/src/world_entities/elements/text_element.h
===================================================================
--- branches/new_class_id/src/world_entities/elements/text_element.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/elements/text_element.h	(revision 9709)
@@ -21,4 +21,5 @@
 //! A class that enables the
 class TextElement : public Text {
+  NewObjectListDeclaration(TextElement);
 
  public:
Index: branches/new_class_id/src/world_entities/environment.cc
===================================================================
--- branches/new_class_id/src/world_entities/environment.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/environment.cc	(revision 9709)
@@ -22,11 +22,11 @@
 #include "util/loading/resource_manager.h"
 
-#include "vector.h"
 #include "objModel.h"
 #include "obb_tree.h"
 #include "util/loading/factory.h"
 
-
-CREATE_FACTORY(Environment, CL_ENVIRONMENT);
+#include "class_id.h"
+NewObjectListDefinitionID(Environment, CL_ENVIRONMENT);
+CREATE_FACTORY(Environment);
 
 /**
@@ -63,5 +63,5 @@
 void Environment::init()
 {
-  this->setClassID(CL_ENVIRONMENT, "Environment");
+  this->registerObject(this, Environment::_objectList);
   this->toList(OM_ENVIRON);
 }
Index: branches/new_class_id/src/world_entities/environment.h
===================================================================
--- branches/new_class_id/src/world_entities/environment.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/environment.h	(revision 9709)
@@ -16,5 +16,5 @@
 class Environment : public WorldEntity
 {
-  friend class World;
+  NewObjectListDeclaration(Environment);
 
  public:
Index: branches/new_class_id/src/world_entities/environments/building.cc
===================================================================
--- branches/new_class_id/src/world_entities/environments/building.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/building.cc	(revision 9709)
@@ -23,6 +23,7 @@
 
 
-
-CREATE_FACTORY(Building, CL_BUILDING);
+#include "class_id.h"
+NewObjectListDefinitionID(Building, CL_BUILDING);
+CREATE_FACTORY(Building);
 
 /**
@@ -31,5 +32,5 @@
 Building::Building(const TiXmlElement* root)
 {
-  this->setClassID(CL_BUILDING, "Building");
+  this->registerObject(this, Building::_objectList);
   this->toList(OM_ENVIRON_NOTICK);
 
Index: branches/new_class_id/src/world_entities/environments/building.h
===================================================================
--- branches/new_class_id/src/world_entities/environments/building.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/building.h	(revision 9709)
@@ -15,5 +15,6 @@
 class Building : public WorldEntity
 {
- public:
+  NewObjectListDeclaration(Building);
+  public:
   Building(const TiXmlElement* root);
 
Index: branches/new_class_id/src/world_entities/environments/mapped_water.cc
===================================================================
--- branches/new_class_id/src/world_entities/environments/mapped_water.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/mapped_water.cc	(revision 9709)
@@ -25,10 +25,12 @@
 #include "script_class.h"
 
-CREATE_FACTORY(MappedWater, CL_MAPPED_WATER);
+#include "class_id.h"
+NewObjectListDefinitionID(MappedWater, CL_MAPPED_WATER);
+CREATE_FACTORY(MappedWater);
 
 SHELL_COMMAND(gui, MappedWater, toggleGui);
 SHELL_COMMAND(output, MappedWater, saveParams);
 
-CREATE_SCRIPTABLE_CLASS(MappedWater, CL_MAPPED_WATER,
+CREATE_SCRIPTABLE_CLASS(MappedWater, MappedWater::classID(),
                         addMethod("waterUV", ExecutorLua2<MappedWater, float, float>(&MappedWater::fadeWaterUV))
                       ->addMethod("waterFlow", ExecutorLua2<MappedWater, float, float>(&MappedWater::fadeWaterFlow))
@@ -47,5 +49,5 @@
 MappedWater::MappedWater(const TiXmlElement* root)
 {
-  this->setClassID(CL_MAPPED_WATER, "MappedWater");
+  this->registerObject(this, MappedWater::_objectList);
   this->toList(OM_ENVIRON);
 
Index: branches/new_class_id/src/world_entities/environments/mapped_water.h
===================================================================
--- branches/new_class_id/src/world_entities/environments/mapped_water.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/mapped_water.h	(revision 9709)
@@ -35,4 +35,5 @@
 class MappedWater : public WorldEntity
 {
+  NewObjectListDeclaration(MappedWater);
 public:
   MappedWater(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/environments/model_entity.cc
===================================================================
--- branches/new_class_id/src/world_entities/environments/model_entity.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/model_entity.cc	(revision 9709)
@@ -23,6 +23,7 @@
 
 
-
-CREATE_FACTORY(ModelEntity, CL_MODEL_ENTITY);
+#include "class_id.h"
+NewObjectListDefinitionID(ModelEntity, CL_MODEL_ENTITY);
+CREATE_FACTORY(ModelEntity);
 
 /**
@@ -31,5 +32,5 @@
 ModelEntity::ModelEntity(const TiXmlElement* root)
 {
-  this->setClassID(CL_MODEL_ENTITY, "ModelEntity");
+  this->registerObject(this, ModelEntity::_objectList);
   this->toList(OM_ENVIRON);
 
Index: branches/new_class_id/src/world_entities/environments/model_entity.h
===================================================================
--- branches/new_class_id/src/world_entities/environments/model_entity.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/model_entity.h	(revision 9709)
@@ -15,4 +15,5 @@
 class ModelEntity : public WorldEntity
 {
+  NewObjectListDeclaration(ModelEntity);
  public:
   ModelEntity(const TiXmlElement* root);
Index: branches/new_class_id/src/world_entities/environments/water.cc
===================================================================
--- branches/new_class_id/src/world_entities/environments/water.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/water.cc	(revision 9709)
@@ -33,11 +33,12 @@
 
 
-
-CREATE_FACTORY(Water, CL_WATER);
+#include "class_id.h"
+NewObjectListDefinitionID(Water, CL_WATER);
+CREATE_FACTORY(Water);
 
 
 Water::Water(const TiXmlElement* root)
 {
-  this->setClassID(CL_WATER, "Water");
+  this->registerObject(this, Water::_objectList);
   this->toList(OM_ENVIRON);
 
@@ -217,5 +218,5 @@
 void Water::tick(float dt)
 {
-  ObjectManager::EntityList entityList = State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ);
+  ObjectManager::EntityList entityList = State::getObjectManager()->getEntityList(OM_GROUP_01_PROJ);
   ObjectManager::EntityList::iterator entity = entityList.begin();
   while (entity != entityList.end())
Index: branches/new_class_id/src/world_entities/environments/water.h
===================================================================
--- branches/new_class_id/src/world_entities/environments/water.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/environments/water.h	(revision 9709)
@@ -22,5 +22,6 @@
 class Water : public WorldEntity
 {
- public:
+  NewObjectListDeclaration(Water);
+  public:
    Water(const TiXmlElement* root = NULL);
    virtual ~Water();
@@ -38,5 +39,5 @@
    void draw() const;
    void tick(float dt);
-   
+
    virtual void varChangeHandler( std::list<int> & id );
 
@@ -52,5 +53,5 @@
     Material        waterMaterial;
     Shader*         waterShader;
-    
+
     float           height;          //!< The hight of the Water
     int             height_handle;   //!< Handle to notify about changes of height
Index: branches/new_class_id/src/world_entities/movie_entity.cc
===================================================================
--- branches/new_class_id/src/world_entities/movie_entity.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/movie_entity.cc	(revision 9709)
@@ -21,6 +21,7 @@
 
 
-
-CREATE_FACTORY(MovieEntity, CL_MOVIE_ENTITY);
+#include "class_id.h"
+NewObjectListDefinitionID(MovieEntity, CL_MOVIE_ENTITY);
+CREATE_FACTORY(MovieEntity);
 
 /**
@@ -29,5 +30,5 @@
 MovieEntity::MovieEntity (const TiXmlElement* root)
 {
-  this->setClassID(CL_MOVIE_ENTITY, "MovieEntity");
+  this->registerObject(this, MovieEntity::_objectList);
 
   media_container = new MediaContainer();
Index: branches/new_class_id/src/world_entities/movie_entity.h
===================================================================
--- branches/new_class_id/src/world_entities/movie_entity.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/movie_entity.h	(revision 9709)
@@ -14,4 +14,5 @@
 class MovieEntity : public WorldEntity
 {
+  NewObjectListDeclaration(MovieEntity);
   private:
     MediaContainer* media_container;
Index: branches/new_class_id/src/world_entities/npcs/attractor_mine.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/attractor_mine.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/attractor_mine.cc	(revision 9709)
@@ -33,7 +33,9 @@
 #include "effects/explosion.h"
 
-CREATE_FACTORY(AttractorMine, CL_ATTRACTOR_MINE);
+#include "class_id.h"
+NewObjectListDefinitionID(AttractorMine, CL_ATTRACTOR_MINE);
+CREATE_FACTORY(AttractorMine);
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(AttractorMine, CL_ATTRACTOR_MINE,
+CREATE_SCRIPTABLE_CLASS(AttractorMine, AttractorMine::classID(),
                         addMethod("setName", ExecutorLua1<BaseObject,const std::string&>(&BaseObject::setName))
                        //Coordinates
@@ -50,5 +52,5 @@
     : NPC(NULL)
 {
-  this->setClassID(CL_ATTRACTOR_MINE, "AttractorMine");
+  this->registerObject(this, AttractorMine::_objectList);
 
   this->toList(OM_GROUP_02);
Index: branches/new_class_id/src/world_entities/npcs/attractor_mine.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/attractor_mine.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/attractor_mine.h	(revision 9709)
@@ -9,4 +9,5 @@
 
 class AttractorMine : public NPC {
+  NewObjectListDeclaration(AttractorMine);
 
  public:
Index: branches/new_class_id/src/world_entities/npcs/door.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/door.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/door.cc	(revision 9709)
@@ -25,11 +25,8 @@
 
 #include "door.h"
-#include "class_list.h"
 
-
-
-
-
-CREATE_FACTORY(Door, CL_DOOR);
+#include "class_id.h"
+NewObjectListDefinitionID(Door, CL_DOOR);
+CREATE_FACTORY(Door);
 
 
@@ -47,6 +44,5 @@
 Door::Door(const TiXmlElement* root)
 {
-
-  this->setClassID(CL_DOOR, "Door");
+  this->registerObject(this, Door::_objectList);
   this->scale = 1.0f;
   this->actionRadius = 1.0;
@@ -152,5 +148,6 @@
 
 
-
+#include "playable.h"
+#include "generic_npc.h"
 /**
  * checks if the door is open
@@ -159,16 +156,13 @@
 {
 
-  std::list<BaseObject*>::const_iterator it;
-  const std::list<BaseObject*>* list = ClassList::getList(CL_PLAYABLE);
   WorldEntity* entity;
   float distance;
 
-  if( list == NULL)
-    return false;
-
+  for (NewObjectList<Playable>::const_iterator it = Playable::objectList().begin();
+       it != Playable::objectList().end();
+       ++it)
   // for all players
-  for( it = list->begin(); it != list->end(); it++)
   {
-    entity = dynamic_cast<WorldEntity*>(*it);
+    entity = (*it);
 
     distance = fabs((this->getAbsCoor() - entity->getAbsCoor()).len());
@@ -178,10 +172,10 @@
 
 
-  list = ClassList::getList(CL_GENERIC_NPC);
-  if( list == NULL)
-    return false;
-  for( it = list->begin(); it != list->end(); it++)
+
+  for (NewObjectList<GenericNPC>::const_iterator it = GenericNPC::objectList().begin();
+       it != GenericNPC::objectList().end();
+       ++it)
   {
-    entity = dynamic_cast<WorldEntity*>(*it);
+    entity = (*it);
 
     distance = fabs((this->getAbsCoor() - entity->getAbsCoor()).len());
Index: branches/new_class_id/src/world_entities/npcs/door.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/door.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/door.h	(revision 9709)
@@ -21,4 +21,6 @@
 class Door : public WorldEntity
 {
+  NewObjectListDeclaration(Door);
+
   public:
     Door(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/npcs/gate.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/gate.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/gate.cc	(revision 9709)
@@ -25,6 +25,4 @@
 
 #include "gate.h"
-#include "class_list.h"
-
 #include "effects/explosion.h"
 
@@ -33,13 +31,14 @@
 
 
-
-CREATE_FACTORY(Gate, CL_GATE);
+#include "class_id.h"
+NewObjectListDefinitionID(Gate, CL_GATE);
+CREATE_FACTORY(Gate);
 
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(Gate, CL_GATE,
+CREATE_SCRIPTABLE_CLASS(Gate, Gate::classID(),
                             addMethod("hide", ExecutorLua0<WorldEntity>(&WorldEntity::hide))
                             ->addMethod("unhide", ExecutorLua0<WorldEntity>(&WorldEntity::unhide))
-                            ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy))    
+                            ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy))
                             ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
@@ -49,4 +48,5 @@
 
 
+
 //! list of all different animations a std md2model supports
 sAnim Gate::animationList[3] =
@@ -62,6 +62,5 @@
 Gate::Gate(const TiXmlElement* root)
 {
-
-  this->setClassID(CL_GATE, "Gate");
+  this->registerObject(this, Gate::_objectList);
   this->scale = 1.0f;
   this->actionRadius = 1.0;
@@ -165,8 +164,8 @@
 void Gate::close()
 {
-  
+
   if( this->destroyed)
     return;
-  
+
   this->setAnimation(GATE_CLOSE, MD2_ANIM_ONCE);
   this->bOpen = false;
@@ -178,13 +177,15 @@
   if( this->destroyed)
     return;
-  
+
   this->setAnimation(GATE_DIE, MD2_ANIM_ONCE);
 
   Explosion::explode(this, Vector(this->getScaling()/160,this->getScaling()/160,this->getScaling()/160));
-  
-  
+
+
   this->destroyed = true;
 }
 
+#include "playable.h"
+#include "generic_npc.h"
 
 /**
@@ -195,15 +196,13 @@
 
   std::list<BaseObject*>::const_iterator it;
-  const std::list<BaseObject*>* list = ClassList::getList(CL_PLAYABLE);
   WorldEntity* entity;
   float distance;
 
-  if( list == NULL)
-    return false;
-
   // for all players
-  for( it = list->begin(); it != list->end(); it++)
-  {
-    entity = dynamic_cast<WorldEntity*>(*it);
+  for (NewObjectList<Playable>::const_iterator it = Playable::objectList().begin();
+       it != Playable::objectList().end();
+       ++it)
+  {
+    entity = (*it);
 
     distance = fabs((this->getAbsCoor() - entity->getAbsCoor()).len());
@@ -213,10 +212,9 @@
 
 
-  list = ClassList::getList(CL_GENERIC_NPC);
-  if( list == NULL)
-    return false;
-  for( it = list->begin(); it != list->end(); it++)
-  {
-    entity = dynamic_cast<WorldEntity*>(*it);
+  for (NewObjectList<GenericNPC>::const_iterator it = GenericNPC::objectList().begin();
+       it != GenericNPC::objectList().end();
+       ++it)
+  {
+    entity = (*it);
 
     distance = fabs((this->getAbsCoor() - entity->getAbsCoor()).len());
Index: branches/new_class_id/src/world_entities/npcs/gate.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/gate.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/gate.h	(revision 9709)
@@ -22,4 +22,6 @@
 class Gate : public WorldEntity
 {
+  NewObjectListDeclaration(Gate);
+
   public:
     Gate(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/npcs/generic_npc.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/generic_npc.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/generic_npc.cc	(revision 9709)
@@ -30,9 +30,12 @@
 #include "loading/resource_manager.h"
 
-
-CREATE_FACTORY(GenericNPC, CL_GENERIC_NPC);
+#include "bsp_entity.h"
+
+#include "class_id.h"
+NewObjectListDefinitionID(GenericNPC, CL_GENERIC_NPC);
+CREATE_FACTORY(GenericNPC);
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(GenericNPC, CL_GENERIC_NPC,
+CREATE_SCRIPTABLE_CLASS(GenericNPC, GenericNPC::classID(),
                         // Move
                         addMethod("walkTo", ExecutorLua3<GenericNPC,float,float,float>(&GenericNPC::walkTo))
@@ -81,5 +84,5 @@
 void GenericNPC::init()
 {
-  this->setClassID(CL_GENERIC_NPC, "GenericNPC");
+  this->registerObject(this, GenericNPC::_objectList);
 
   this->toList(OM_GROUP_00);
@@ -92,5 +95,5 @@
 
   // collision reaction registration
-   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
+  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, BspEntity::classID());
 }
 
Index: branches/new_class_id/src/world_entities/npcs/generic_npc.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/generic_npc.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/generic_npc.h	(revision 9709)
@@ -25,4 +25,5 @@
 class GenericNPC : public NPC
 {
+  NewObjectListDeclaration(GenericNPC);
 
 
Index: branches/new_class_id/src/world_entities/npcs/ground_turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/ground_turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/ground_turret.cc	(revision 9709)
@@ -29,8 +29,8 @@
 #include "effects/explosion.h"
 
+#include "class_id.h"
 
-CREATE_FACTORY(GroundTurret, CL_GROUND_TURRET);
-
-
+NewObjectListDefinitionID(GroundTurret, CL_GROUND_TURRET);
+CREATE_FACTORY(GroundTurret);
 
 
@@ -62,5 +62,5 @@
 void GroundTurret::init()
 {
-  this->setClassID(CL_GROUND_TURRET, "GroundTurret");
+  this->registerObject(this, GroundTurret::_objectList);
   this->loadModel("models/ground_turret_#.obj", 5);
   this->left = NULL;
Index: branches/new_class_id/src/world_entities/npcs/ground_turret.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/ground_turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/ground_turret.h	(revision 9709)
@@ -14,4 +14,5 @@
 class GroundTurret : public NPC
 {
+  NewObjectListDeclaration(GroundTurret);
 
 public:
Index: branches/new_class_id/src/world_entities/npcs/network_turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/network_turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/network_turret.cc	(revision 9709)
@@ -31,7 +31,7 @@
 #include "weapons/aiming_turret.h"
 
-CREATE_FACTORY(NetworkTurret, CL_NETWORK_TURRET);
-
-
+#include "class_id.h"
+NewObjectListDefinitionID(NetworkTurret, CL_NETWORK_TURRET);
+CREATE_FACTORY(NetworkTurret);
 
 
@@ -62,5 +62,5 @@
 void NetworkTurret::init()
 {
-  this->setClassID(CL_NETWORK_TURRET, "NetworkTurret");
+  this->registerObject(this, NetworkTurret::_objectList);
   this->loadModel("models/ground_turret_#.obj", 5);
 
@@ -111,6 +111,6 @@
   ObjectManager::EntityList::iterator entity;
   Vector diffVec;
-  for (entity = State::getObjectManager()->getObjectList((OM_LIST)this->targetGroup).begin();
-       entity != State::getObjectManager()->getObjectList((OM_LIST)this->targetGroup).end();
+  for (entity = State::getObjectManager()->getEntityList((OM_LIST)this->targetGroup).begin();
+       entity != State::getObjectManager()->getEntityList((OM_LIST)this->targetGroup).end();
        entity ++)
   {
Index: branches/new_class_id/src/world_entities/npcs/network_turret.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/network_turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/network_turret.h	(revision 9709)
@@ -14,5 +14,5 @@
 class NetworkTurret : public NPC
 {
-
+  NewObjectListDeclaration(NetworkTurret);
 public:
   NetworkTurret(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/npcs/npc_test.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/npc_test.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/npc_test.cc	(revision 9709)
@@ -31,6 +31,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(NPC2, CL_NPC_TEST2);
 NewObjectListDefinitionID(NPC2, CL_NPC_TEST2);
+CREATE_FACTORY(NPC2);
 
 NPC2::NPC2(const TiXmlElement* root)
Index: branches/new_class_id/src/world_entities/npcs/repair_station.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/repair_station.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/repair_station.cc	(revision 9709)
@@ -25,11 +25,8 @@
 
 #include "repair_station.h"
-#include "class_list.h"
 
-
-
-
-
-CREATE_FACTORY(RepairStation, CL_DOOR);
+#include "class_id.h"
+NewObjectListDefinitionID(RepairStation, CL_DOOR +1 );
+CREATE_FACTORY(RepairStation);
 
 
@@ -67,6 +64,5 @@
 RepairStation::RepairStation(const TiXmlElement* root)
 {
-
-  this->setClassID(CL_DOOR, "RepairStation");
+  this->registerObject(this, RepairStation::_objectList);
   this->scale = 1.0f;
 
Index: branches/new_class_id/src/world_entities/npcs/repair_station.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/repair_station.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/repair_station.h	(revision 9709)
@@ -27,4 +27,5 @@
 class RepairStation : public WorldEntity
 {
+  NewObjectListDeclaration(RepairStation);
   public:
     RepairStation ();
Index: branches/new_class_id/src/world_entities/npcs/space_turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/npcs/space_turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/space_turret.cc	(revision 9709)
@@ -29,5 +29,7 @@
 #include "effects/explosion.h"
 
-CREATE_FACTORY(SpaceTurret, CL_SPACE_TURRET);
+#include "class_id.h"
+NewObjectListDefinitionID(SpaceTurret, CL_SPACE_TURRET);
+CREATE_FACTORY(SpaceTurret);
 
 /**
@@ -59,5 +61,5 @@
 void SpaceTurret::init()
 {
-  this->setClassID(CL_SPACE_TURRET, "SpaceTurret");
+  this->registerObject(this, SpaceTurret::_objectList);
   this->loadModel("models/ground_turret_#.obj", 7.5);
   this->loadModel("models/comet.obj", 1.0f, 3);
Index: branches/new_class_id/src/world_entities/npcs/space_turret.h
===================================================================
--- branches/new_class_id/src/world_entities/npcs/space_turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/npcs/space_turret.h	(revision 9709)
@@ -18,4 +18,5 @@
 class SpaceTurret : public NPC
 {
+  NewObjectListDeclaration(SpaceTurret);
 
 public:
Index: branches/new_class_id/src/world_entities/planet.cc
===================================================================
--- branches/new_class_id/src/world_entities/planet.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/planet.cc	(revision 9709)
@@ -32,7 +32,7 @@
 
 
-
-CREATE_FACTORY(Planet, CL_PLANET);
-
+#include "class_id.h"
+NewObjectListDefinitionID(Planet, CL_PLANET);
+CREATE_FACTORY(Planet);
 
 
@@ -42,5 +42,5 @@
 Planet::Planet(const TiXmlElement* root)
 {
-  this->setClassID(CL_PLANET, "Planet");
+  this->registerObject(this, Planet::_objectList);
   this->toList(OM_GROUP_01);
 
Index: branches/new_class_id/src/world_entities/planet.h
===================================================================
--- branches/new_class_id/src/world_entities/planet.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/planet.h	(revision 9709)
@@ -16,4 +16,6 @@
 class Planet : public WorldEntity
 {
+  NewObjectListDeclaration(Planet);
+
  public:
   Planet(const TiXmlElement* root);
Index: branches/new_class_id/src/world_entities/power_ups/laser_power_up.cc
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/laser_power_up.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/laser_power_up.cc	(revision 9709)
@@ -24,6 +24,7 @@
 
 
-
-CREATE_FACTORY(LaserPowerUp, CL_LASER_POWER_UP);
+#include "class_id.h"
+NewObjectListDefinitionID(LaserPowerUp, CL_LASER_POWER_UP);
+CREATE_FACTORY(LaserPowerUp);
 
 LaserPowerUp::LaserPowerUp () : PowerUp(0.0, 1.0, 0.0)
@@ -49,5 +50,5 @@
 void LaserPowerUp::init()
 {
-  this->setClassID(CL_LASER_POWER_UP, "LaserPowerUp");
+  this->registerObject(this, LaserPowerUp::_objectList);
   this->loadModel("models/guns/test_gun.obj", 2.0);
 
Index: branches/new_class_id/src/world_entities/power_ups/laser_power_up.h
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/laser_power_up.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/laser_power_up.h	(revision 9709)
@@ -13,4 +13,5 @@
 
 class LaserPowerUp : public PowerUp {
+  NewObjectListDeclaration(LaserPowerUp);
 
  public:
Index: branches/new_class_id/src/world_entities/power_ups/param_power_up.cc
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/param_power_up.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/param_power_up.cc	(revision 9709)
@@ -28,6 +28,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(ParamPowerUp, CL_PARAM_POWER_UP);
 NewObjectListDefinitionID(ParamPowerUp, CL_PARAM_POWER_UP);
+CREATE_FACTORY(ParamPowerUp);
 
 const char* ParamPowerUp::paramTypes[] = {
Index: branches/new_class_id/src/world_entities/power_ups/turret_power_up.cc
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/turret_power_up.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/turret_power_up.cc	(revision 9709)
@@ -24,6 +24,7 @@
 
 
-
-CREATE_FACTORY(TurretPowerUp, CL_TURRET_POWER_UP);
+#include "class_id.h"
+NewObjectListDefinitionID(TurretPowerUp, CL_TURRET_POWER_UP);
+CREATE_FACTORY(TurretPowerUp);
 
 TurretPowerUp::TurretPowerUp(const TiXmlElement* root) : PowerUp(0.0, 1.0, 0.0)
@@ -45,5 +46,5 @@
 void TurretPowerUp::init()
 {
-  this->setClassID(CL_TURRET_POWER_UP, "TurretPowerUp");
+  this->registerObject(this, TurretPowerUp::_objectList);
   this->loadModel("models/guns/turret1.obj", 2.0);
 
Index: branches/new_class_id/src/world_entities/power_ups/turret_power_up.h
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/turret_power_up.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/turret_power_up.h	(revision 9709)
@@ -13,4 +13,5 @@
 
 class TurretPowerUp : public PowerUp {
+  NewObjectListDeclaration(TurretPowerUp);
 
  public:
Index: branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc
===================================================================
--- branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc	(revision 9709)
@@ -28,6 +28,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(WeaponPowerUp, CL_WEAPON_POWER_UP);
 NewObjectListDefinitionID(WeaponPowerUp, CL_WEAPON_POWER_UP);
+CREATE_FACTORY(WeaponPowerUp);
 
 WeaponPowerUp::WeaponPowerUp(const TiXmlElement* root) : PowerUp(1.0, 1.0, 0.0)
@@ -88,5 +88,5 @@
 {
   this->weapon = dynamic_cast<Weapon*>((weaponXML == NULL)
-      ? Factory::fabricate(static_cast<ClassID>(this->weapon->getLeafClassID()))
+      ? Factory::fabricate((this->weapon->getClassID()))
       : Factory::fabricate((const TiXmlElement*)this->getXmlElem()->FirstChildElement("weapon")));
   this->model = this->weapon->getModel(0);
Index: branches/new_class_id/src/world_entities/projectiles/bomb.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/bomb.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/bomb.cc	(revision 9709)
@@ -25,5 +25,7 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(Bomb, CL_BOMB);
+#include "class_id.h"
+NewObjectListDefinitionID(Bomb, CL_BOMB);
+CREATE_FAST_FACTORY_STATIC(Bomb);
 
 /**
@@ -67,5 +69,5 @@
 void Bomb::init()
 {
-  this->setClassID(CL_BOMB, "Bomb");
+  this->registerObject(this, Bomb::_objectList);
 
 
@@ -173,4 +175,5 @@
 }
 
+
 void Bomb::deactivate()
 {
@@ -182,10 +185,11 @@
 void Bomb::detonate(float size)
 {
-  ObjectManager::EntityList detonationList;
-  ObjectManager::distanceFromObject(detonationList, *this, size, CL_NPC);
+  /// FIXME
+/*  ObjectManager::EntityList detonationList;
+  ObjectManager::distanceFromObject(detonationList, *this, size, NPC::objectList());
     while( !detonationList.empty() )
     {
       detonationList.front()->collidesWith(this, Vector(0,0,0));
       detonationList.pop_front();
-    }
+    }*/
 }
Index: branches/new_class_id/src/world_entities/projectiles/bomb.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/bomb.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/bomb.h	(revision 9709)
@@ -17,5 +17,5 @@
 class Bomb : public Projectile
 {
-
+  NewObjectListDeclaration(Bomb);
  public:
   Bomb(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.cc	(revision 9709)
@@ -20,5 +20,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "dot_emitter.h"
@@ -27,5 +26,7 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);
+#include "class_id.h"
+NewObjectListDefinitionID(BoomerangProjectile, CL_BOOMERANG_PROJECTILE);
+CREATE_FAST_FACTORY_STATIC(BoomerangProjectile);
 
 /**
@@ -34,5 +35,5 @@
 BoomerangProjectile::BoomerangProjectile () : Projectile()
 {
-  this->setClassID(CL_BOOMERANG_PROJECTILE, "BoomerangProjectile");
+  this->registerObject(this, BoomerangProjectile::_objectList);
 
   this->loadModel("models/projectiles/orx-rocket.obj", 2.0);
@@ -60,13 +61,13 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (BoomerangProjectile::trailParticles != NULL && ClassList::getList(CL_BOOMERANG_PROJECTILE)->size() <= 1)
-  {
-    if (ClassList::exists(BoomerangProjectile::trailParticles, CL_PARTICLE_SYSTEM))
+  if (BoomerangProjectile::trailParticles != NULL && BoomerangProjectile::objectList().size() <= 1)
+  {
+    if (ParticleSystem::objectList().exists(BoomerangProjectile::trailParticles))
       delete BoomerangProjectile::trailParticles;
     BoomerangProjectile::trailParticles = NULL;
   }
-  if (BoomerangProjectile::explosionParticles != NULL && ClassList::getList(CL_BOOMERANG_PROJECTILE)->size() <= 1)
-  {
-    if (ClassList::exists(BoomerangProjectile::explosionParticles, CL_PARTICLE_SYSTEM))
+  if (BoomerangProjectile::explosionParticles != NULL && BoomerangProjectile::objectList().size() <= 1)
+  {
+    if (ParticleSystem::objectList().exists(BoomerangProjectile::explosionParticles))
       delete BoomerangProjectile::explosionParticles;
     BoomerangProjectile::explosionParticles = NULL;
Index: branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/boomerang_projectile.h	(revision 9709)
@@ -17,4 +17,5 @@
 class BoomerangProjectile : public Projectile
 {
+  NewObjectListDeclaration(BoomerangProjectile);
   public:
     BoomerangProjectile ();
Index: branches/new_class_id/src/world_entities/projectiles/guided_missile.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/guided_missile.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/guided_missile.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "dot_emitter.h"
@@ -26,5 +25,7 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(GuidedMissile, CL_GUIDED_MISSILE);
+#include "class_id.h"
+NewObjectListDefinitionID(GuidedMissile, CL_GUIDED_MISSILE);
+CREATE_FAST_FACTORY_STATIC(GuidedMissile);
 
 /**
@@ -33,5 +34,5 @@
 GuidedMissile::GuidedMissile () : Projectile()
 {
-  this->setClassID(CL_GUIDED_MISSILE, "GuidedMissile");
+  this->registerObject(this, GuidedMissile::_objectList);
 
   this->loadModel("models/projectiles/orx-rocket.obj", 2.0);
@@ -59,13 +60,13 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (GuidedMissile::trailParticles != NULL && ClassList::getList(CL_GUIDED_MISSILE)->size() <= 1)
-  {
-    if (ClassList::exists(GuidedMissile::trailParticles, CL_PARTICLE_SYSTEM))
+  if (GuidedMissile::trailParticles != NULL && GuidedMissile::objectList().size() <= 1)
+  {
+    if (ParticleSystem::objectList().exists(GuidedMissile::trailParticles))
       delete GuidedMissile::trailParticles;
     GuidedMissile::trailParticles = NULL;
   }
-  if (GuidedMissile::explosionParticles != NULL && ClassList::getList(CL_GUIDED_MISSILE)->size() <= 1)
-  {
-    if (ClassList::exists(GuidedMissile::explosionParticles, CL_PARTICLE_SYSTEM))
+  if (GuidedMissile::explosionParticles != NULL && GuidedMissile::objectList().size() <= 1)
+  {
+    if (ParticleSystem::objectList().exists(GuidedMissile::explosionParticles))
       delete GuidedMissile::explosionParticles;
     GuidedMissile::explosionParticles = NULL;
Index: branches/new_class_id/src/world_entities/projectiles/guided_missile.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/guided_missile.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/guided_missile.h	(revision 9709)
@@ -16,4 +16,5 @@
 class GuidedMissile : public Projectile
 {
+  NewObjectListDeclaration(GuidedMissile);
   public:
     GuidedMissile ();
Index: branches/new_class_id/src/world_entities/projectiles/hyperblast.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/hyperblast.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/hyperblast.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "box_emitter.h"
@@ -26,5 +25,8 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(Hyperblast, CL_HYPERBLAST);
+#include "class_id.h"
+NewObjectListDefinitionID(Hyperblast, CL_HYPERBLAST);
+CREATE_FAST_FACTORY_STATIC(Hyperblast);
+
 
 /**
@@ -33,5 +35,5 @@
 Hyperblast::Hyperblast () : Projectile()
 {
-  this->setClassID(CL_HYPERBLAST, "Hyperblast");
+  this->registerObject(this, Hyperblast::_objectList);
 
   this->loadModel("models/projectiles/hyperblast.obj", 5);
@@ -55,5 +57,5 @@
 {
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (Hyperblast::explosionParticles != NULL && ClassList::getList(CL_HYPERBLAST)->size() <= 1)
+  if (Hyperblast::explosionParticles != NULL && Hyperblast::objectList().size() <= 1)
   {
     Hyperblast::explosionParticles = NULL;
Index: branches/new_class_id/src/world_entities/projectiles/hyperblast.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/hyperblast.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/hyperblast.h	(revision 9709)
@@ -17,4 +17,5 @@
 class Hyperblast : public Projectile
 {
+  NewObjectListDeclaration(Hyperblast);
   public:
     Hyperblast ();
Index: branches/new_class_id/src/world_entities/projectiles/laser.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/laser.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/laser.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 #include "model.h"
 
@@ -29,6 +28,7 @@
 
 
-
-CREATE_FAST_FACTORY_STATIC(Laser, CL_LASER);
+#include "class_id.h"
+NewObjectListDefinition(Laser);
+CREATE_FAST_FACTORY_STATIC(Laser);
 
 /**
@@ -37,5 +37,5 @@
 Laser::Laser () : Projectile()
 {
-  this->setClassID(CL_LASER, "Laser");
+  this->registerObject(this, Laser::_objectList);
 
   this->loadModel("models/projectiles/laser.obj");
@@ -61,5 +61,5 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (Laser::explosionParticles != NULL && ClassList::getList(CL_LASER)->size() <= 1)
+  if (Laser::explosionParticles != NULL && Laser::objectList().size() <= 1)
   {
     //if (ClassList::exists(Laser::explosionParticles, CL_PARTICLE_SYSTEM))
Index: branches/new_class_id/src/world_entities/projectiles/laser.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/laser.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/laser.h	(revision 9709)
@@ -17,4 +17,5 @@
 class Laser : public Projectile
 {
+  NewObjectListDeclaration(Laser);
   public:
     Laser ();
Index: branches/new_class_id/src/world_entities/projectiles/projectile.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/projectile.h	(revision 9709)
@@ -11,5 +11,5 @@
 
 #include "world_entity.h"
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
 #include "sound_source.h"
Index: branches/new_class_id/src/world_entities/projectiles/rail_projectile.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/rail_projectile.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/rail_projectile.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 #include "model.h"
 
@@ -29,6 +28,7 @@
 
 
-
-CREATE_FAST_FACTORY_STATIC(RailProjectile, CL_RAIL_PROJECTILE);
+#include "class_id.h"
+NewObjectListDefinitionID(RailProjectile, CL_RAIL_PROJECTILE);
+CREATE_FAST_FACTORY_STATIC(RailProjectile);
 
 /**
@@ -37,5 +37,5 @@
 RailProjectile::RailProjectile () : Projectile()
 {
-  this->setClassID(CL_RAIL_PROJECTILE, "RailProjectile");
+  this->registerObject(this, RailProjectile::_objectList);
 
   this->loadModel("models/projectiles/laser_projectile.obj", 100);
@@ -61,5 +61,5 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (RailProjectile::explosionParticles != NULL && ClassList::getList(CL_RAIL_PROJECTILE)->size() <= 1)
+  if (RailProjectile::explosionParticles != NULL && RailProjectile::objectList().size() <= 1)
   {
     //if (ClassList::exists(RailProjectile::explosionParticles, CL_PARTICLE_SYSTEM))
Index: branches/new_class_id/src/world_entities/projectiles/rail_projectile.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/rail_projectile.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/rail_projectile.h	(revision 9709)
@@ -17,4 +17,5 @@
 class RailProjectile : public Projectile
 {
+  NewObjectListDeclaration(RailProjectile);
   public:
     RailProjectile ();
Index: branches/new_class_id/src/world_entities/projectiles/rocket.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/rocket.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/rocket.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "dot_emitter.h"
@@ -26,5 +25,7 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(Rocket, CL_ROCKET);
+#include "class_id.h"
+NewObjectListDefinitionID(Rocket, CL_ROCKET);
+CREATE_FAST_FACTORY_STATIC(Rocket);
 
 /**
@@ -33,5 +34,5 @@
 Rocket::Rocket () : Projectile()
 {
-  this->setClassID(CL_ROCKET, "Rocket");
+  this->registerObject(this, Rocket::_objectList);
 
   this->loadModel("models/projectiles/orx-rocket.obj", .3);
@@ -55,5 +56,5 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (Rocket::trailParticles != NULL && ClassList::getList(CL_ROCKET)->size() <= 1)
+  if (Rocket::trailParticles != NULL && Rocket::objectList().size() <= 1)
   {
 /*    if (ClassList::exists(Rocket::trailParticles, CL_PARTICLE_SYSTEM))
@@ -61,5 +62,5 @@
     Rocket::trailParticles = NULL;
   }
-  if (Rocket::explosionParticles != NULL && ClassList::getList(CL_ROCKET)->size() <= 1)
+  if (Rocket::explosionParticles != NULL && Rocket::objectList().size() <= 1)
   {
 /*    if (ClassList::exists(Rocket::explosionParticles, CL_PARTICLE_SYSTEM))
Index: branches/new_class_id/src/world_entities/projectiles/rocket.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/rocket.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/rocket.h	(revision 9709)
@@ -9,6 +9,4 @@
 #include "projectile.h"
 
-class Vector;
-class Weapon;
 class SpriteParticles;
 class ParticleEmitter;
@@ -17,29 +15,31 @@
 class Rocket : public Projectile
 {
-  public:
-    Rocket ();
-    virtual ~Rocket ();
+  NewObjectListDeclaration(Rocket);
+
+public:
+  Rocket ();
+  virtual ~Rocket ();
 
 
-    virtual void activate();
-    virtual void deactivate();
+  virtual void activate();
+  virtual void deactivate();
 
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
+  virtual void collidesWith(WorldEntity* entity, const Vector& location);
 
-    virtual void destroy (WorldEntity* killer);
+  virtual void destroy (WorldEntity* killer);
 
-    virtual void tick (float time);
-    virtual void draw () const;
+  virtual void tick (float time);
+  virtual void draw () const;
 
 
-  private:
-    static FastFactory*               fastFactory;
-    static SpriteParticles*           trailParticles;
-    static SpriteParticles*           explosionParticles;
+private:
+  static FastFactory*               fastFactory;
+  static SpriteParticles*           trailParticles;
+  static SpriteParticles*           explosionParticles;
 
-    ParticleEmitter*                  emitter;
+  ParticleEmitter*                  emitter;
 
 
-    WorldEntity* hitEntity; // FIXME TEMPORARY
+  WorldEntity* hitEntity; // FIXME TEMPORARY
 
 };
Index: branches/new_class_id/src/world_entities/projectiles/test_bullet.cc
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/test_bullet.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/test_bullet.cc	(revision 9709)
@@ -19,5 +19,4 @@
 
 #include "state.h"
-#include "class_list.h"
 
 #include "dot_emitter.h"
@@ -25,5 +24,7 @@
 #include "debug.h"
 
-CREATE_FAST_FACTORY_STATIC(TestBullet, CL_TEST_BULLET);
+#include "class_id.h"
+NewObjectListDefinitionID(TestBullet, CL_TEST_BULLET);
+CREATE_FAST_FACTORY_STATIC(TestBullet);
 
 /**
@@ -32,5 +33,5 @@
 TestBullet::TestBullet () : Projectile()
 {
-  this->setClassID(CL_TEST_BULLET, "TestBullet");
+  this->registerObject(this, TestBullet::_objectList);
 
   this->loadModel("models/projectiles/orx-rocket.obj", .3);
@@ -54,13 +55,13 @@
 
   /* this is normaly done by World.cc by deleting the ParticleEngine */
-  if (TestBullet::trailParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  if (TestBullet::trailParticles != NULL && TestBullet::objectList().size() <= 1)
   {
-    if (ClassList::exists(TestBullet::trailParticles, CL_PARTICLE_SYSTEM))
+    if (ParticleSystem::objectList().exists(TestBullet::trailParticles))
       delete TestBullet::trailParticles;
     TestBullet::trailParticles = NULL;
   }
-  if (TestBullet::explosionParticles != NULL && ClassList::getList(CL_TEST_BULLET)->size() <= 1)
+  if (TestBullet::explosionParticles != NULL && TestBullet::objectList().size() <= 1)
   {
-    if (ClassList::exists(TestBullet::explosionParticles, CL_PARTICLE_SYSTEM))
+    if (ParticleSystem::objectList().exists(TestBullet::explosionParticles))
       delete TestBullet::explosionParticles;
     TestBullet::explosionParticles = NULL;
Index: branches/new_class_id/src/world_entities/projectiles/test_bullet.h
===================================================================
--- branches/new_class_id/src/world_entities/projectiles/test_bullet.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/projectiles/test_bullet.h	(revision 9709)
@@ -17,4 +17,6 @@
 class TestBullet : public Projectile
 {
+  NewObjectListDeclaration(TestBullet);
+
   public:
     TestBullet ();
Index: branches/new_class_id/src/world_entities/recorder.cc
===================================================================
--- branches/new_class_id/src/world_entities/recorder.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/recorder.cc	(revision 9709)
@@ -22,11 +22,12 @@
 
 
-
-CREATE_FACTORY(Recorder, CL_RECORDER);
+#include "class_id.h"
+NewObjectListDefinitionID(Recorder, CL_RECORDER);
+CREATE_FACTORY(Recorder);
 
 
 Recorder::Recorder (const TiXmlElement* root)
 {
-  this->setClassID(CL_RECORDER, "Recorder");
+  this->registerObject(this, Recorder::_objectList);
 
   // initialize libavcodec, and register all codecs and formats
Index: branches/new_class_id/src/world_entities/recorder.h
===================================================================
--- branches/new_class_id/src/world_entities/recorder.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/recorder.h	(revision 9709)
@@ -20,4 +20,5 @@
 class Recorder : public WorldEntity
 {
+  NewObjectListDeclaration(Recorder);
   public:
     Recorder (const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/satellite.cc
===================================================================
--- branches/new_class_id/src/world_entities/satellite.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/satellite.cc	(revision 9709)
@@ -21,8 +21,9 @@
 
 #include "objModel.h"
-#include "vector.h"
 
 
 
+
+NewObjectListDefinition(Satellite);
 
 /**
@@ -31,5 +32,5 @@
 Satellite::Satellite (Vector axis, float speed)
 {
-  this->setClassID(CL_SATELLITE, "Satellite");
+  this->registerObject(this, Satellite::_objectList);
 
   this->loadModel("cube");
Index: branches/new_class_id/src/world_entities/satellite.h
===================================================================
--- branches/new_class_id/src/world_entities/satellite.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/satellite.h	(revision 9709)
@@ -19,5 +19,5 @@
 class Satellite : public WorldEntity
 {
-  friend class World;
+  NewObjectListDeclaration(Satellite);
 
  public:
Index: branches/new_class_id/src/world_entities/script_trigger.cc
===================================================================
--- branches/new_class_id/src/world_entities/script_trigger.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/script_trigger.cc	(revision 9709)
@@ -16,11 +16,11 @@
 
 #include "script_trigger.h"
-#include "class_list.h"
 #include "script.h"
 
 #include "state.h"
 
-
-CREATE_SCRIPTABLE_CLASS(ScriptTrigger, CL_SCRIPT_TRIGGER,
+NewObjectListDefinition(ScriptTrigger);
+
+CREATE_SCRIPTABLE_CLASS(ScriptTrigger, ScriptTrigger::classID(),
             // Coordinates
              addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
@@ -49,6 +49,6 @@
  */
 ScriptTrigger::ScriptTrigger(const TiXmlElement* root)
-{ 
-  this->setClassID(CL_SCRIPT_TRIGGER, "ScriptTrigger");
+{
+  this->registerObject(this, ScriptTrigger::_objectList);
   this->toList(OM_COMMON);
 
@@ -139,9 +139,9 @@
 void ScriptTrigger::setTarget(const std::string& target)
 {
-  BaseObject* targetEntity = ClassList::getObject(target, CL_WORLD_ENTITY);
-
+
+  WorldEntity* targetEntity = WorldEntity::objectList().getObject(target);
   if (targetEntity != NULL)
   {
-    this->setTarget(dynamic_cast<WorldEntity*>(targetEntity));
+    this->setTarget(targetEntity);
   }
   else
@@ -157,9 +157,9 @@
 void ScriptTrigger::setTriggerParent(const std::string& parent)
 {
-  BaseObject* parentEntity = ClassList::getObject(parent, CL_WORLD_ENTITY);
+  WorldEntity* parentEntity = WorldEntity::objectList().getObject(parent);
 
   if (parentEntity != NULL)
   {
-    this->setParent(dynamic_cast<WorldEntity*>(parentEntity));
+    this->setParent(parentEntity);
     this->setParentMode(PNODE_MOVEMENT);
   }
Index: branches/new_class_id/src/world_entities/script_trigger.h
===================================================================
--- branches/new_class_id/src/world_entities/script_trigger.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/script_trigger.h	(revision 9709)
@@ -18,4 +18,5 @@
 class ScriptTrigger : public WorldEntity
 {
+  NewObjectListDeclaration(ScriptTrigger);
   public:
     ScriptTrigger(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/skybox.cc
===================================================================
--- branches/new_class_id/src/world_entities/skybox.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/skybox.cc	(revision 9709)
@@ -31,6 +31,7 @@
 
 
-
-CREATE_FACTORY(SkyBox, CL_SKYBOX);
+#include "class_id.h"
+NewObjectListDefinitionID(SkyBox, CL_SKYBOX);
+CREATE_FACTORY(SkyBox);
 
 /**
@@ -72,5 +73,5 @@
 void SkyBox::preInit()
 {
-  this->setClassID(CL_SKYBOX, "SkyBox");
+  this->registerObject(this, SkyBox::_objectList);
   this->toList(OM_BACKGROUND);
   this->toReflectionList();
Index: branches/new_class_id/src/world_entities/skybox.h
===================================================================
--- branches/new_class_id/src/world_entities/skybox.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/skybox.h	(revision 9709)
@@ -27,5 +27,6 @@
 class SkyBox : public WorldEntity
 {
- public:
+  NewObjectListDeclaration(SkyBox);
+public:
   SkyBox(const std::string& fileName = "");
   SkyBox(const TiXmlElement* root);
Index: branches/new_class_id/src/world_entities/skydome.cc
===================================================================
--- branches/new_class_id/src/world_entities/skydome.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/skydome.cc	(revision 9709)
@@ -30,4 +30,5 @@
 
 
+NewObjectListDefinition(Skydome);
 
 /**
@@ -44,5 +45,5 @@
   PRINTF(0)("Skydome init\n");
 
-  this->setClassID(CL_SKYDOME, "Skydome");
+  this->registerObject(this, Skydome::_objectList);
   this->toList(OM_BACKGROUND);
   this->toReflectionList();
@@ -119,5 +120,5 @@
   glEnd();
 
-  WorldEntity::draw(); 
+  WorldEntity::draw();
 
   glPopMatrix();
Index: branches/new_class_id/src/world_entities/skydome.h
===================================================================
--- branches/new_class_id/src/world_entities/skydome.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/skydome.h	(revision 9709)
@@ -21,4 +21,5 @@
 class Skydome : public WorldEntity
 {
+  NewObjectListDeclaration(Skydome);
 public:
   Skydome();
@@ -31,13 +32,13 @@
   void generateSkyPlane(int divisions, float planetRadius, float atmosphereRadius,
                         float hTile, float vTile);
-  
+
   void setShader(Shader* shader);
   void setTexture(GLuint texture);
-  
+
   void activate();
   void deactivate();
 
 private:
-  
+
   typedef struct VertexInfo
   {
@@ -48,5 +49,5 @@
 
   bool activateDome;
-  
+
   VertexInfo *planeVertices;
   int numPlaneVertices;
@@ -59,5 +60,5 @@
   VertexInfo *vertices;
   int numVertices;
-  
+
   GLuint texture;
   Shader* shader;
Index: branches/new_class_id/src/world_entities/skysphere.cc
===================================================================
--- branches/new_class_id/src/world_entities/skysphere.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/skysphere.cc	(revision 9709)
@@ -27,5 +27,4 @@
 
 #include "skysphere.h"
-#include "stdincl.h"
 
 #include "material.h"
@@ -33,5 +32,5 @@
 
 
-
+NewObjectListDefinition(Skysphere);
 
 /**
@@ -41,5 +40,5 @@
 Skysphere::Skysphere(char* fileName)
 {
-  this->setClassID(CL_SKYSPHERE, "SkySphere");
+  this->registerObject(this, Skysphere::_objectList);
   this->toList(OM_BACKGROUND);
   if (fileName == NULL)
Index: branches/new_class_id/src/world_entities/skysphere.h
===================================================================
--- branches/new_class_id/src/world_entities/skysphere.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/skysphere.h	(revision 9709)
@@ -24,4 +24,5 @@
 class Skysphere : public WorldEntity
 {
+  NewObjectListDeclaration(Skysphere);
 
  public:
Index: branches/new_class_id/src/world_entities/space_ships/collision_probe.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/collision_probe.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/collision_probe.cc	(revision 9709)
@@ -24,7 +24,8 @@
 
 
+#include "class_id.h"
+NewObjectListDefinitionID(CollisionProbe, CL_COLLISION_PROBE);
 
-
-CREATE_FACTORY(CollisionProbe, CL_COLLISION_PROBE);
+CREATE_FACTORY(CollisionProbe);
 
 
@@ -56,5 +57,5 @@
 void CollisionProbe::init()
 {
-  this->setClassID(CL_COLLISION_PROBE, "CollisionProbe");
+  this->registerObject(this, CollisionProbe::_objectList);
 
   bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
Index: branches/new_class_id/src/world_entities/space_ships/collision_probe.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/collision_probe.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/collision_probe.h	(revision 9709)
@@ -13,4 +13,5 @@
 class CollisionProbe : public Playable
 {
+  NewObjectListDeclaration(CollisionProbe);
 
   public:
Index: branches/new_class_id/src/world_entities/space_ships/cruizer.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/cruizer.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/cruizer.cc	(revision 9709)
@@ -34,5 +34,7 @@
 #include "debug.h"
 
-CREATE_FACTORY(Cruizer, CL_CRUIZER);
+#include "class_id.h"
+NewObjectListDefinitionID(Cruizer, CL_CRUIZER);
+CREATE_FACTORY(Cruizer);
 
 /**
@@ -89,5 +91,5 @@
 {
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_CRUIZER, "Cruizer");
+  this->registerObject(this, Cruizer::_objectList);
 
   this->setSupportedPlaymodes(Playable::Full3D);
Index: branches/new_class_id/src/world_entities/space_ships/cruizer.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/cruizer.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/cruizer.h	(revision 9709)
@@ -16,4 +16,5 @@
 class Cruizer : public Playable
 {
+  NewObjectListDeclaration(Cruizer);
   public:
     Cruizer(const std::string& fileName);
Index: branches/new_class_id/src/world_entities/space_ships/helicopter.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/helicopter.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/helicopter.cc	(revision 9709)
@@ -34,7 +34,9 @@
 #include "debug.h"
 
-CREATE_FACTORY(Helicopter, CL_HELICOPTER);
+#include "class_id.h"
+NewObjectListDefinitionID(Helicopter, CL_HELICOPTER);
+CREATE_FACTORY(Helicopter);
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(Helicopter, CL_HELICOPTER,
+CREATE_SCRIPTABLE_CLASS(Helicopter, Helicopter::classID(),
                         addMethod("moveUp", ExecutorLua1<Helicopter,bool>(&Helicopter::moveUp))
                             ->addMethod("moveDown", ExecutorLua1<Helicopter,bool>(&Helicopter::moveDown))
@@ -46,4 +48,5 @@
                        );
 
+
 /**
  *  creates the controlable Helicopter
@@ -100,5 +103,5 @@
   Weapon* wpLeft = new TestGun(1);
   wpLeft->setName("testGun Left");
-  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
+  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Cannon"));
 
   cannon->setName("BFG");
@@ -126,5 +129,5 @@
   this->chopperBuffer = NULL;
 
-  this->setClassID(CL_HELICOPTER, "Helicopter");
+  this->registerObject(this, Helicopter::_objectList);
   PRINTF(4)("HELICOPTER INIT\n");
 
Index: branches/new_class_id/src/world_entities/space_ships/helicopter.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/helicopter.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/helicopter.h	(revision 9709)
@@ -17,4 +17,5 @@
 class Helicopter : public Playable
 {
+  NewObjectListDeclaration(Helicopter);
 
   public:
Index: branches/new_class_id/src/world_entities/space_ships/hover.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/hover.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/hover.cc	(revision 9709)
@@ -34,8 +34,10 @@
 #include "debug.h"
 
-CREATE_FACTORY(Hover, CL_HOVER);
+#include "class_id.h"
+NewObjectListDefinitionID(Hover, CL_HOVER);
+CREATE_FACTORY(Hover);
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(Hover, CL_HOVER,
+CREATE_SCRIPTABLE_CLASS(Hover, Hover::classID(),
                         addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer))
                         //Coordinates
@@ -98,5 +100,5 @@
   Weapon* wpLeft = new TestGun(1);
   wpLeft->setName("testGun Left");
-  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));
+  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate("Hyperblaster"));
 
   cannon->setName("BFG");
@@ -123,5 +125,5 @@
 
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_HOVER, "Hover");
+  this->registerObject(this, Hover::_objectList);
   this->toReflectionList();
 
Index: branches/new_class_id/src/world_entities/space_ships/hover.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/hover.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/hover.h	(revision 9709)
@@ -15,4 +15,5 @@
 class Hover : public Playable
 {
+  NewObjectListDeclaration(Hover);
   public:
 
Index: branches/new_class_id/src/world_entities/space_ships/space_ship.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/space_ship.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/space_ship.cc	(revision 9709)
@@ -53,8 +53,10 @@
 
 
-
-CREATE_FACTORY(SpaceShip, CL_SPACE_SHIP);
+#include "class_id.h"
+NewObjectListDefinitionID(SpaceShip, CL_SPACE_SHIP);
+CREATE_FACTORY(SpaceShip);
+
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(SpaceShip, CL_SPACE_SHIP,
+CREATE_SCRIPTABLE_CLASS(SpaceShip, SpaceShip::classID(),
                         addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer))
                         ->addMethod("fire", ExecutorLua1<Playable, bool>(&Playable::fire))
@@ -117,5 +119,5 @@
 {
 //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_SPACE_SHIP, "SpaceShip");
+  this->registerObject(this, SpaceShip::_objectList);
 
   PRINTF(4)("SPACESHIP INIT\n");
Index: branches/new_class_id/src/world_entities/space_ships/space_ship.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/space_ship.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/space_ship.h	(revision 9709)
@@ -19,4 +19,5 @@
 class SpaceShip : public Playable
 {
+  NewObjectListDeclaration(SpaceShip);
 
   public:
@@ -36,5 +37,5 @@
     virtual void postSpawn();
     virtual void leftWorld();
-    
+
     virtual void destroy(WorldEntity* killer);
     virtual void respawn();
Index: branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.cc	(revision 9709)
@@ -38,8 +38,9 @@
 
 
-CREATE_FACTORY(Spacecraft2D, CL_SPACECRAFT_2D);
-
-
-CREATE_SCRIPTABLE_CLASS(Spacecraft2D, CL_SPACECRAFT_2D,
+#include "class_id.h"
+NewObjectListDefinitionID(Spacecraft2D, CL_SPACECRAFT_2D);
+CREATE_FACTORY(Spacecraft2D);
+
+CREATE_SCRIPTABLE_CLASS(Spacecraft2D, Spacecraft2D::classID(),
                         addMethod("hasPlayer", ExecutorLua0ret<Playable,bool>(&Playable::hasPlayer))
                         //Coordinates
@@ -52,4 +53,5 @@
 
 
+
 /**
  * @brief loads a Spacecraft2D information from a specified file.
@@ -85,12 +87,12 @@
 
   //weapons:
-  Weapon* wpRight = dynamic_cast<Weapon*>(Factory::fabricate(CL_LASER_CANNON));
+  Weapon* wpRight = dynamic_cast<Weapon*>(Factory::fabricate("LaserCannon"));
   wpRight->setName("Cannon_Right");
-  Weapon* wpLeft = dynamic_cast<Weapon*>(Factory::fabricate(CL_LASER_CANNON));
+  Weapon* wpLeft = dynamic_cast<Weapon*>(Factory::fabricate("LaserCannon"));
   wpLeft->setName("Cannon_Left");
 
-  Weapon* turretLeft = dynamic_cast<Weapon*>(Factory::fabricate(CL_BOOMERANG_GUN));
+  Weapon* turretLeft = dynamic_cast<Weapon*>(Factory::fabricate("BoomerangGun"));
   wpRight->setName("Turret_Left");
-  Weapon* turretRight = dynamic_cast<Weapon*>(Factory::fabricate(CL_BOOMERANG_GUN));
+  Weapon* turretRight = dynamic_cast<Weapon*>(Factory::fabricate("BoomerangGun"));
   wpLeft->setName("Turret_Right");
 
@@ -125,5 +127,5 @@
 {
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_SPACECRAFT_2D, "Spacecraft2D");
+  this->registerObject(this, Spacecraft2D::_objectList);
 
   this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal );
Index: branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/spacecraft_2d.h	(revision 9709)
@@ -16,4 +16,5 @@
 class Spacecraft2D : public Playable
 {
+  NewObjectListDeclaration(Spacecraft2D);
   public:
     Spacecraft2D(const std::string& fileName);
Index: branches/new_class_id/src/world_entities/space_ships/turbine_hover.cc
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/turbine_hover.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/turbine_hover.cc	(revision 9709)
@@ -34,5 +34,7 @@
 #include "debug.h"
 
-CREATE_FACTORY(TurbineHover, CL_TURBINE_HOVER);
+#include "class_id.h"
+NewObjectListDefinitionID(TurbineHover, CL_TURBINE_HOVER);
+CREATE_FACTORY(TurbineHover);
 
 /**
@@ -101,5 +103,5 @@
 {
   //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_TURBINE_HOVER, "TurbineHover");
+  this->registerObject(this, TurbineHover::_objectList);
 
   this->setSupportedPlaymodes(Playable::Full3D | Playable::Horizontal | Playable::Vertical);
Index: branches/new_class_id/src/world_entities/space_ships/turbine_hover.h
===================================================================
--- branches/new_class_id/src/world_entities/space_ships/turbine_hover.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/space_ships/turbine_hover.h	(revision 9709)
@@ -18,65 +18,66 @@
 class TurbineHover : public Playable
 {
-  public:
-    TurbineHover(const std::string& fileName);
-    TurbineHover(const TiXmlElement* root = NULL);
-    virtual ~TurbineHover();
+  NewObjectListDeclaration(TurbineHover);
+public:
+  TurbineHover(const std::string& fileName);
+  TurbineHover(const TiXmlElement* root = NULL);
+  virtual ~TurbineHover();
 
-    void setBoostColor(const Color& color);
+  void setBoostColor(const Color& color);
 
-    virtual void loadParams(const TiXmlElement* root);
-    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
-    virtual void enter();
-    virtual void leave();
+  virtual void loadParams(const TiXmlElement* root);
+  virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
+  virtual void enter();
+  virtual void leave();
 
-    virtual void setTeam(int teamID);
+  virtual void setTeam(int teamID);
 
-    virtual void postSpawn();
-    virtual void leftWorld();
-    virtual void respawn();
+  virtual void postSpawn();
+  virtual void leftWorld();
+  virtual void respawn();
 
-    virtual void collidesWith(WorldEntity* entity, const Vector& location);
-    virtual void tick(float dt);
-    virtual void draw() const;
+  virtual void collidesWith(WorldEntity* entity, const Vector& location);
+  virtual void tick(float dt);
+  virtual void draw() const;
 
-    virtual void process(const Event &event);
+  virtual void process(const Event &event);
 
-  private:
-    void init();
-    void movement(float dt);
+private:
+  void init();
+  void movement(float dt);
 
-  private:
-    bool                  bForward;           //!< forward button pressed.
-    bool                  bBackward;          //!< backward button pressed.
-    bool                  bLeft;              //!< left button pressed.
-    bool                  bRight;             //!< right button pressed.
-    bool                  bAscend;            //!< ascend button pressed.
-    bool                  bDescend;           //!< descend button presses.
+private:
+  bool                  bForward;           //!< forward button pressed.
+  bool                  bBackward;          //!< backward button pressed.
+  bool                  bLeft;              //!< left button pressed.
+  bool                  bRight;             //!< right button pressed.
+  bool                  bAscend;            //!< ascend button pressed.
+  bool                  bDescend;           //!< descend button presses.
 
-    int                   yInvert;
-    float                 mouseSensitivity;   //!< the mouse sensitivity
+  int                   yInvert;
+  float                 mouseSensitivity;   //!< the mouse sensitivity
 
-    PNode                 wingNodeLeft;
-    PNode                 wingNodeRight;
-    PNode                 rotorNodeLeft;
-    PNode                 rotorNodeRight;
+  PNode                 wingNodeLeft;
+  PNode                 wingNodeRight;
+  PNode                 rotorNodeLeft;
+  PNode                 rotorNodeRight;
 
-    PNode                 cameraNode;
-    float                 cameraLook;
-    float                 rotation;
+  PNode                 cameraNode;
+  float                 cameraLook;
+  float                 rotation;
 
-   // Vector                velocity;           //!< the velocity of the TurbineHover.
-    Quaternion            direction;          //!< the direction of the TurbineHover.
-    float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
-    float                 acceleration;       //!< the acceleration of the TurbineHover.
-    float                 airFriction;        //!< AirFriction.
+  // Vector                velocity;           //!< the velocity of the TurbineHover.
+  Quaternion            direction;          //!< the direction of the TurbineHover.
+  float                 travelSpeed;        //!< the current speed of the Hove (to make soft movement)
+  float                 acceleration;       //!< the acceleration of the TurbineHover.
+  float                 airFriction;        //!< AirFriction.
 
-    float                 rotorSpeed;         //!< the speed of the rotor.
-    float                 rotorCycle;         //!< The Cycle the rotor is in.
+  float                 rotorSpeed;         //!< the speed of the rotor.
+  float                 rotorCycle;         //!< The Cycle the rotor is in.
 
-    float                 airViscosity;
+  float                 airViscosity;
 
-    ParticleEmitter*      burstEmitter[2];
-    ParticleSystem*       burstSystem;
+  ParticleEmitter*      burstEmitter[2];
+  ParticleSystem*       burstSystem;
 };
 
Index: branches/new_class_id/src/world_entities/spawning_point.cc
===================================================================
--- branches/new_class_id/src/world_entities/spawning_point.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/spawning_point.cc	(revision 9709)
@@ -34,6 +34,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY( SpawningPoint, CL_SPAWNING_POINT );
 NewObjectListDefinitionID(SpawningPoint, CL_SPAWNING_POINT);
+CREATE_FACTORY( SpawningPoint);
 /**
  *  constructor
Index: branches/new_class_id/src/world_entities/spectator.cc
===================================================================
--- branches/new_class_id/src/world_entities/spectator.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/spectator.cc	(revision 9709)
@@ -22,8 +22,7 @@
 #include "shared_network_data.h"
 
-CREATE_FACTORY(Spectator, CL_SPECTATOR);
-
-
-
+#include "class_id.h"
+NewObjectListDefinitionID(Spectator, CL_SPECTATOR);
+CREATE_FACTORY(Spectator);
 
 
@@ -58,5 +57,5 @@
 {
 //  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
-  this->setClassID(CL_SPECTATOR, "Spectator");
+  this->registerObject(this, Spectator::_objectList);
 
   this->getWeaponManager().changeWeaponConfig(1);
@@ -89,5 +88,5 @@
   dynamic_cast<Element2D*>(this->getWeaponManager().getFixedTarget())->setVisibility( false);
 
- 
+
   registerVar( new SynchronizeableBool( &bLeft, &bLeft, "bLeft", PERMISSION_OWNER ) );
   registerVar( new SynchronizeableBool( &bRight, &bRight, "bRight", PERMISSION_OWNER ) );
@@ -161,50 +160,50 @@
 {
   Playable::tick( time );
-  
+
   if( ( xMouse != 0 || yMouse != 0 ) && this->getOwner() == SharedNetworkData::getInstance()->getHostID() )
   {
     xMouse *= time / 10;
     yMouse *= time / 10;
-    
+
     angleX -= xMouse;
     angleY -= yMouse;
-    
+
     if ( angleY > 2.05 )
       angleY = 2.05;
-    
+
     if ( angleY < -1.15 )
       angleY = -1.15;
-    
+
     this->mouseDir = Quaternion( angleX, Vector( 0, 1, 0 ) ) * Quaternion( angleY, Vector( 0, 0, 1 ) );
-    
+
     xMouse = yMouse = 0;
   }
-  
+
   this->setAbsDir( this->mouseDir );
-  
+
   Vector velocity;
-  
+
   if ( this->bForward )
   {
     velocity += this->getAbsDirX();
   }
-  
+
   if ( this->bBackward )
   {
     velocity -= this->getAbsDirX();
   }
-  
+
   if ( this->bRight )
   {
     velocity += this->getAbsDirZ();
   }
-  
+
   if ( this->bLeft )
   {
     velocity -= this->getAbsDirZ();
   }
-  
+
   velocity *= 100;
-  
+
   this->shiftCoor( velocity*time );
 }
Index: branches/new_class_id/src/world_entities/spectator.h
===================================================================
--- branches/new_class_id/src/world_entities/spectator.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/spectator.h	(revision 9709)
@@ -11,4 +11,5 @@
 class Spectator : public Playable
 {
+  NewObjectListDeclaration(Spectator);
 
   public:
@@ -37,5 +38,5 @@
     bool                  bForward;
     bool                  bBackward;
-    
+
     float                 xMouse;             //!< mouse moved in x-Direction
     float                 yMouse;             //!< mouse moved in y-Direction
Index: branches/new_class_id/src/world_entities/terrain.cc
===================================================================
--- branches/new_class_id/src/world_entities/terrain.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/terrain.cc	(revision 9709)
@@ -34,6 +34,7 @@
 
 
-
-CREATE_FACTORY(Terrain, CL_TERRAIN);
+#include "class_id.h"
+NewObjectListDefinitionID(Terrain, CL_TERRAIN);
+CREATE_FACTORY(Terrain);
 
 /**
@@ -89,5 +90,5 @@
 {
   if (objectList)
-    glDeleteLists(this->objectList, 1);
+    glDeleteLists(this->modelList, 1);
   if( this->ssp)
     delete ssp;
@@ -104,9 +105,9 @@
 void Terrain::init()
 {
-  this->setClassID(CL_TERRAIN, "Terrain");
+  this->registerObject(this, Terrain::_objectList);
   this->toList(OM_ENVIRON_NOTICK);
   this->toReflectionList();
 
-  this->objectList = 0;
+  this->modelList = 0;
   this->ssp = NULL;
   this->vegetation = NULL;
@@ -207,5 +208,5 @@
 
   if (this->objectList)
-    glCallList(this->objectList);
+    glCallList(this->modelList);
   else if (this->getModel())
     this->getModel()->draw();
@@ -256,6 +257,6 @@
   if (debugTerrain == TERRAIN_DAVE)
   {
-    objectList = glGenLists(1);
-    glNewList (objectList, GL_COMPILE);
+    modelList = glGenLists(1);
+    glNewList (modelList, GL_COMPILE);
 
     glColor3f(1.0,0,0);
Index: branches/new_class_id/src/world_entities/terrain.h
===================================================================
--- branches/new_class_id/src/world_entities/terrain.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/terrain.h	(revision 9709)
@@ -12,5 +12,4 @@
 
 #include "world_entity.h"
-#include "vector.h"
 
 // FORWARD DECLARATION
@@ -26,4 +25,5 @@
 class Terrain : public WorldEntity
 {
+  NewObjectListDeclaration(Terrain);
 
  public:
@@ -52,5 +52,5 @@
  private:
    Model*              vegetation;
-   int                 objectList;
+   int                 modelList;
 
    HeightMap*          heightMap;
Index: branches/new_class_id/src/world_entities/test_entity.cc
===================================================================
--- branches/new_class_id/src/world_entities/test_entity.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/test_entity.cc	(revision 9709)
@@ -35,14 +35,15 @@
 
 
-
-CREATE_FACTORY(TestEntity, CL_TEST_ENTITY);
+#include "class_id.h"
+NewObjectListDefinition(TestEntity);
+CREATE_FACTORY(TestEntity);
 
 #include "script_class.h"
-CREATE_SCRIPTABLE_CLASS(TestEntity, CL_TEST_ENTITY,
+CREATE_SCRIPTABLE_CLASS(TestEntity, TestEntity::classID(),
                             addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
                             ->addMethod("getAbsCoorY", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorY))
                             ->addMethod("getAbsCoorZ", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorZ))
-                            
+
                        );
 
@@ -75,5 +76,5 @@
 void TestEntity::init()
 {
-  this->setClassID(CL_TEST_ENTITY, "TestEntity");
+  this->registerObject(this, TestEntity::_objectList);
   this->toList(OM_GROUP_00);
 
Index: branches/new_class_id/src/world_entities/test_entity.h
===================================================================
--- branches/new_class_id/src/world_entities/test_entity.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/test_entity.h	(revision 9709)
@@ -15,4 +15,5 @@
 class TestEntity : public WorldEntity, public PhysicsInterface
 {
+  NewObjectListDeclaration(TestEntity);
  public:
   TestEntity ();
Index: branches/new_class_id/src/world_entities/weapons/aim.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aim.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aim.cc	(revision 9709)
@@ -29,4 +29,5 @@
 
 
+NewObjectListDefinition(Aim);
 
 /**
@@ -59,5 +60,5 @@
 void Aim::init()
 {
-  this->setClassID(CL_CROSSHAIR, "Aim");
+  this->registerObject(this, Aim::_objectList);
   this->setName("Aim");
 
@@ -107,6 +108,6 @@
   ObjectManager::EntityList::iterator entity;
   //printf("%d\n", this->targetGroup);
-  for (entity = State::getObjectManager()->getObjectList(this->targetGroup).begin();
-       entity != State::getObjectManager()->getObjectList(this->targetGroup).end();
+  for (entity = State::getObjectManager()->getEntityList(this->targetGroup).begin();
+       entity != State::getObjectManager()->getEntityList(this->targetGroup).end();
        entity ++)
   {
Index: branches/new_class_id/src/world_entities/weapons/aim.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aim.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aim.h	(revision 9709)
@@ -19,4 +19,5 @@
 template<class T> class tAnimation;
 
+
 //! An Aim for zooming in on Targets.
 /**
@@ -28,4 +29,5 @@
 class Aim : public PNode, public Element2D
 {
+  NewObjectListDeclaration(Aim);
 
 public:
Index: branches/new_class_id/src/world_entities/weapons/aiming_system.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aiming_system.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aiming_system.cc	(revision 9709)
@@ -30,4 +30,5 @@
 
 
+NewObjectListDefinition(AimingSystem);
 
 /**
@@ -55,5 +56,5 @@
 void AimingSystem::init()
 {
-  this->setClassID(CL_AIMING_SYSTEM, "AimingSystem");
+  this->registerObject(this, AimingSystem::_objectList);
   this->setName("AimingSystem");
 
@@ -63,5 +64,5 @@
   // registering default reactions:
   this->unsubscribeReaction(CREngine::CR_OBJECT_DAMAGE);
-  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY);
+  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity::classID());
 
   this->range = 1000.0f;
Index: branches/new_class_id/src/world_entities/weapons/aiming_system.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aiming_system.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aiming_system.h	(revision 9709)
@@ -21,4 +21,5 @@
 class AimingSystem : public WorldEntity
 {
+  NewObjectListDeclaration(AimingSystem);
 
  public:
Index: branches/new_class_id/src/world_entities/weapons/aiming_turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aiming_turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aiming_turret.cc	(revision 9709)
@@ -27,6 +27,7 @@
 #include "util/loading/factory.h"
 
-CREATE_FACTORY(AimingTurret, CL_AIMING_TURRET);
-
+#include "class_id.h"
+NewObjectListDefinitionID(AimingTurret, CL_AIMING_TURRET);
+CREATE_FACTORY(AimingTurret);
 
 
@@ -64,5 +65,5 @@
 void AimingTurret::init()
 {
-  this->setClassID(CL_AIMING_TURRET, "AimingTurret");
+  this->registerObject(this, AimingTurret::_objectList);
 
   Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
@@ -86,5 +87,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
-  this->setProjectileType(CL_GUIDED_MISSILE);
+  this->setProjectileTypeC("GuidedMissile");
 
 
Index: branches/new_class_id/src/world_entities/weapons/aiming_turret.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/aiming_turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/aiming_turret.h	(revision 9709)
@@ -13,4 +13,6 @@
 class AimingTurret : public Weapon
 {
+  NewObjectListDeclaration(AimingTurret);
+
 public:
   AimingTurret ();
Index: branches/new_class_id/src/world_entities/weapons/boomerang_gun.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/boomerang_gun.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/boomerang_gun.cc	(revision 9709)
@@ -27,5 +27,7 @@
 #include "util/loading/factory.h"
 
-CREATE_FACTORY(BoomerangGun, CL_BOOMERANG_GUN);
+#include "class_id.h"
+NewObjectListDefinitionID(BoomerangGun, CL_BOOMERANG_GUN);
+CREATE_FACTORY(BoomerangGun);
 
 
@@ -61,5 +63,5 @@
 void BoomerangGun::init()
 {
-  this->setClassID(CL_BOOMERANG_GUN, "BoomerangGun");
+  this->registerObject(this, BoomerangGun::_objectList);
 
 
@@ -85,5 +87,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
-  this->setProjectileType(CL_BOOMERANG_PROJECTILE);
+  this->setProjectileTypeC("BoomerangProjectile");
 
   this->loadModel("models/guns/turret1.obj", 5.0);
Index: branches/new_class_id/src/world_entities/weapons/boomerang_gun.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/boomerang_gun.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/boomerang_gun.h	(revision 9709)
@@ -11,4 +11,5 @@
 class BoomerangGun : public Weapon
   {
+    NewObjectListDeclaration(BoomerangGun);
   public:
     BoomerangGun ();
Index: branches/new_class_id/src/world_entities/weapons/cannon.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/cannon.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/cannon.cc	(revision 9709)
@@ -32,10 +32,11 @@
 #include "animation3d.h"
 
-#include "fast_factory.h"
-
-
-
-
-CREATE_FACTORY(Cannon, CL_CANNON);
+#include "loading/fast_factory.h"
+
+
+
+#include "class_id.h"
+NewObjectListDefinitionID(Cannon, CL_CANNON);
+CREATE_FACTORY(Cannon);
 
 /**
@@ -69,5 +70,5 @@
 void Cannon::init()
 {
-  this->setClassID(CL_CANNON, "Cannon");
+  this->registerObject(this, Cannon::_objectList);
 
 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
@@ -88,5 +89,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_HEAVY);
-  this->setProjectileType(CL_BOMB);
+  this->setProjectileTypeC("Bomb");
   this->prepareProjectiles(5);
 
Index: branches/new_class_id/src/world_entities/weapons/cannon.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/cannon.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/cannon.h	(revision 9709)
@@ -12,4 +12,5 @@
 class Cannon : public Weapon
   {
+    NewObjectListDeclaration(Cannon);
   public:
     Cannon ();
Index: branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.cc	(revision 9709)
@@ -29,5 +29,5 @@
 
 
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
 #include "fps_sniper_rifle.h"
@@ -39,5 +39,7 @@
 
 
-CREATE_FACTORY(FPSSniperRifle, CL_FPS_SNIPER_RIFLE);
+#include "class_id.h"
+NewObjectListDefinitionID(FPSSniperRifle, CL_FPS_SNIPER_RIFLE);
+CREATE_FACTORY(FPSSniperRifle);
 
 /**
@@ -76,5 +78,5 @@
 void FPSSniperRifle::init()
 {
-  this->setClassID(CL_FPS_SNIPER_RIFLE, "FPSSniperRifle");
+  this->registerObject(this, FPSSniperRifle::_objectList);
 
   this->loadModel("models/guns/fps_sniper_rifle.obj", 0.2);
@@ -98,5 +100,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->setProjectileType(CL_LASER);
+  this->setProjectileTypeC("Laser");
   this->prepareProjectiles(20);
 
Index: branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.h	(revision 9709)
@@ -39,4 +39,6 @@
 class FPSSniperRifle : public Weapon
   {
+    NewObjectListDeclaration(FPSSniperRifle);
+
   public:
     FPSSniperRifle (int leftRight);
Index: branches/new_class_id/src/world_entities/weapons/hyperblaster.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/hyperblaster.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/hyperblaster.cc	(revision 9709)
@@ -31,10 +31,11 @@
 #include "animation3d.h"
 
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
 
 
-
-CREATE_FACTORY(Hyperblaster, CL_HYPERBLASTER);
+#include "class_id.h"
+NewObjectListDefinitionID(Hyperblaster, CL_HYPERBLASTER);
+CREATE_FACTORY(Hyperblaster);
 
 Hyperblaster::Hyperblaster(const TiXmlElement* root)
@@ -56,5 +57,5 @@
 void Hyperblaster::init()
 {
-  this->setClassID(CL_HYPERBLASTER, "Hyperblaster");
+  this->registerObject(this, Hyperblaster::_objectList);
 
 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
@@ -76,5 +77,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_HEAVY);
-  this->setProjectileType(CL_HYPERBLAST);
+  this->setProjectileTypeC("Hyperblast");
   this->prepareProjectiles(2);
 
Index: branches/new_class_id/src/world_entities/weapons/hyperblaster.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/hyperblaster.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/hyperblaster.h	(revision 9709)
@@ -12,5 +12,6 @@
 class Hyperblaster : public Weapon
   {
-  public:
+    NewObjectListDeclaration(Hyperblaster);
+    public:
     Hyperblaster (const TiXmlElement* root = NULL);
     virtual ~Hyperblaster ();
Index: branches/new_class_id/src/world_entities/weapons/laser_cannon.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/laser_cannon.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/laser_cannon.cc	(revision 9709)
@@ -29,8 +29,9 @@
 #include "animation3d.h"
 
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 
-CREATE_FACTORY(LaserCannon, CL_LASER_CANNON);
-
+#include "class_id.h"
+NewObjectListDefinitionID(LaserCannon, CL_LASER_CANNON);
+CREATE_FACTORY(LaserCannon);
 
 LaserCannon::LaserCannon(const TiXmlElement* root)
@@ -52,5 +53,5 @@
 void LaserCannon::init()
 {
-  this->setClassID(CL_LASER_CANNON, "LaserCannon");
+  this->registerObject(this, LaserCannon::_objectList);
 
 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/laser_cannon.obj", OBJ, RP_CAMPAIGN);
@@ -72,5 +73,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->setProjectileType(CL_RAIL_PROJECTILE);
+  this->setProjectileTypeC("RailProjectile");
   this->prepareProjectiles(100);
   this->setEmissionPoint(Vector(2.8,0,0) * 5.0);
Index: branches/new_class_id/src/world_entities/weapons/laser_cannon.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/laser_cannon.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/laser_cannon.h	(revision 9709)
@@ -29,5 +29,6 @@
 class LaserCannon : public Weapon
   {
-  public:
+    NewObjectListDeclaration(LaserCannon);
+    public:
     LaserCannon (const TiXmlElement* root = NULL);
     virtual ~LaserCannon ();
Index: branches/new_class_id/src/world_entities/weapons/targeting_turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/targeting_turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/targeting_turret.cc	(revision 9709)
@@ -26,5 +26,7 @@
 #include "util/loading/factory.h"
 
-CREATE_FACTORY(TargetingTurret, CL_TARGETING_TURRET);
+#include "class_id.h"
+NewObjectListDefinitionID(TargetingTurret, CL_TARGETING_TURRET);
+CREATE_FACTORY(TargetingTurret);
 
 
@@ -48,5 +50,5 @@
 void TargetingTurret::init()
 {
-  this->setClassID(CL_TARGETING_TURRET, "TargetingTurret");
+  this->registerObject(this, TargetingTurret::_objectList);
 
   Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
@@ -70,5 +72,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
-  this->setProjectileType(CL_GUIDED_MISSILE);
+  this->setProjectileTypeC("GuidedMissile");
 
 
Index: branches/new_class_id/src/world_entities/weapons/targeting_turret.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/targeting_turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/targeting_turret.h	(revision 9709)
@@ -12,4 +12,5 @@
 class TargetingTurret : public Weapon
 {
+  NewObjectListDeclaration(TargetingTurret);
 public:
   TargetingTurret(const TiXmlElement* root = NULL);
Index: branches/new_class_id/src/world_entities/weapons/test_gun.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/test_gun.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/test_gun.cc	(revision 9709)
@@ -31,8 +31,9 @@
 #include "animation3d.h"
 
-#include "fast_factory.h"
-
-CREATE_FACTORY(TestGun, CL_TEST_GUN);
-
+#include "loading/fast_factory.h"
+
+#include "class_id.h"
+NewObjectListDefinitionID(TestGun, CL_TEST_GUN);
+CREATE_FACTORY(TestGun);
 /**
  *  standard constructor
@@ -109,6 +110,5 @@
 void TestGun::init()
 {
-  this->setClassID(CL_TEST_GUN, "TestGun");
-
+  this->registerObject(this, TestGun::_objectList);
 //  this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN);
 
@@ -129,5 +129,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
-  this->setProjectileType(CL_LASER);
+  this->setProjectileTypeC("Laser");
   this->prepareProjectiles(100);
 
Index: branches/new_class_id/src/world_entities/weapons/test_gun.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/test_gun.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/test_gun.h	(revision 9709)
@@ -37,4 +37,5 @@
 class TestGun : public Weapon
   {
+    NewObjectListDeclaration(TestGun);
   public:
     TestGun (int leftRight);
Index: branches/new_class_id/src/world_entities/weapons/turret.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/turret.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/turret.cc	(revision 9709)
@@ -27,7 +27,7 @@
 #include "util/loading/factory.h"
 
-CREATE_FACTORY(Turret, CL_TURRET);
-
-
+#include "class_id.h"
+NewObjectListDefinitionID(Turret, CL_TURRET);
+CREATE_FACTORY(Turret);
 
 /**
@@ -62,5 +62,5 @@
 void Turret::init()
 {
-  this->setClassID(CL_TURRET, "Turret");
+  this->registerObject(this, Turret::_objectList);
 
 
@@ -86,5 +86,5 @@
 
   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET);
-  this->setProjectileType(CL_ROCKET);
+  this->setProjectileTypeC("Rocket");
 
   this->loadModel("models/guns/turret1.obj");
Index: branches/new_class_id/src/world_entities/weapons/turret.h
===================================================================
--- branches/new_class_id/src/world_entities/weapons/turret.h	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/turret.h	(revision 9709)
@@ -11,4 +11,5 @@
 class Turret : public Weapon
   {
+    NewObjectListDeclaration(Turret);
   public:
     Turret ();
Index: branches/new_class_id/src/world_entities/weapons/weapon.cc
===================================================================
--- branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9707)
+++ branches/new_class_id/src/world_entities/weapons/weapon.cc	(revision 9709)
@@ -21,5 +21,5 @@
 #include "weapon.h"
 
-#include "fast_factory.h"
+#include "loading/fast_factory.h"
 #include "world_entities/projectiles/projectile.h"
 
