Index: branches/new_class_id/src/lib/script_engine/script.cc
===================================================================
--- branches/new_class_id/src/lib/script_engine/script.cc	(revision 9692)
+++ branches/new_class_id/src/lib/script_engine/script.cc	(revision 9699)
@@ -23,5 +23,4 @@
 #include "parser/tinyxml/tinyxml.h"
 
-#include "class_list.h"
 CREATE_SCRIPTABLE_CLASS(Script, Script::classID(),
                     addMethod("addObject", ExecutorLua2<Script,const std::string&, const std::string& >(&Script::addObject))
@@ -54,5 +53,5 @@
 Script::Script(const std::string& filename)
 {
-  this->setClassID(CL_SCRIPT, "Script");
+  this->registerObject(this, Script::_objectList);
 
   returnCount = argumentCount = 0;
@@ -144,5 +143,5 @@
    //printf(("Script %s: I am about to add %s of class %s\n",this->getName(),objectName.c_str(),className.c_str());
 
-   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
+   ScriptClass* scriptClass = ScriptClass::objectList().getObject(className);
   // printf(("The script class for %s is at %p \n",className.c_str(),scriptClass);
    WorldObject tmpObj;
@@ -152,12 +151,12 @@
      if( !classIsRegistered(className) )
      {
-     static_cast<ScriptClass*>(scriptClass)->registerClass(this);
-     }
-
-     BaseObject* object = ClassList::getObject(objectName, className);
+       scriptClass->registerClass(this);
+     }
+
+     BaseObject* object = NewObjectListBase::getBaseObject(objectName, className);
     // printf(("%s is at %p \n",objectName.c_str(),object);
      if (object != NULL && !objectIsAdded(objectName))
      {
-        static_cast<ScriptClass*>(scriptClass)->insertObject(this, object, false);
+        scriptClass->insertObject(this, object, false);
         tmpObj.name = objectName;
         registeredObjects.push_back(tmpObj);
@@ -354,9 +353,10 @@
 void Script::addThisScript()
 {
-  BaseObject* scriptClass = ClassList::getObject("Script", CL_SCRIPT_CLASS);
-   if (scriptClass != NULL)
-   {
-     static_cast<ScriptClass*>(scriptClass)->registerClass(this);
-     static_cast<ScriptClass*>(scriptClass)->insertObject(this, this,"thisscript", false);
+  ScriptClass* scriptClass = ScriptClass::objectList().getObject("Script");
+
+  if (scriptClass != NULL)
+   {
+     scriptClass->registerClass(this);
+     scriptClass->insertObject(this, this,"thisscript", false);
    }
 }
@@ -388,6 +388,7 @@
  void Script::registerClass( const std::string& className)
  {
-   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
+   ScriptClass* scriptClass = ScriptClass::objectList().getObject(className);
    //printf(("The script class for %s is at %p \n",className.c_str(),scriptClass);
+
    WorldObject tmpObj;
    if (scriptClass != NULL)
Index: branches/new_class_id/src/lib/script_engine/script_class.cc
===================================================================
--- branches/new_class_id/src/lib/script_engine/script_class.cc	(revision 9692)
+++ branches/new_class_id/src/lib/script_engine/script_class.cc	(revision 9699)
@@ -24,9 +24,9 @@
  * @todo this constructor is not jet implemented - do it
 */
-ScriptClass::ScriptClass(const std::string& name, ClassID classID, ScriptMethod* scriptMethods)
-    : BaseObject(name)
+ScriptClass::ScriptClass(const std::string& name, const NewClassID& classID, ScriptMethod* scriptMethods)
+    : BaseObject(name), _classID(classID)
 {
   assert(scriptMethods != NULL);
-  this->registerObject(this, Shell::_objectList);
+  this->registerObject(this, ScriptClass::_objectList);
 
   this->_classID = classID;
Index: branches/new_class_id/src/lib/script_engine/script_class.h
===================================================================
--- branches/new_class_id/src/lib/script_engine/script_class.h	(revision 9692)
+++ branches/new_class_id/src/lib/script_engine/script_class.h	(revision 9699)
@@ -23,12 +23,14 @@
 
 //! A class for ...
-class ScriptClass : protected BaseObject
+class ScriptClass : public BaseObject
 {
+  NewObjectListDeclaration(ScriptClass);
 
 public:
   virtual ~ScriptClass();
 
-  bool operator==(const std::string& name) { return (this->getName() == name); }
-  bool operator==(NewClassID classID) { return (this->_classID == classID); }
+  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;
@@ -39,8 +41,8 @@
 
 protected:
-  ScriptClass(const std::string& name, NewClassID classID, ScriptMethod* scriptMethods);
+  ScriptClass(const std::string& name, const NewClassID& classID, ScriptMethod* scriptMethods);
 
 private:
-  const NewClassID&   _classID;
+  NewClassID          _classID;
   ScriptMethod*       _scriptMethods;
 };
Index: branches/new_class_id/src/lib/script_engine/script_manager.cc
===================================================================
--- branches/new_class_id/src/lib/script_engine/script_manager.cc	(revision 9692)
+++ branches/new_class_id/src/lib/script_engine/script_manager.cc	(revision 9699)
@@ -24,6 +24,4 @@
 #include "lunar.h"
 
-#include "class_list.h"
-
 #include "script.h"
 #include "script_trigger.h"
@@ -37,6 +35,4 @@
 {
   this->setName("ScriptManager");
-  this->scripts = NULL;
-  this->triggers = NULL;
 
   if (root != NULL)
@@ -62,6 +58,4 @@
 
   // fill the scripts and triggers (doing that on runtime is very slow!)
-  getTriggers();
-  getScripts();
 }
 
@@ -71,12 +65,10 @@
 {
   //Delete all scripts as they aren't deleted automatically
-  if(this->getScripts())
-    while(!scripts->empty())
-      delete scripts->front();
+  while(!Script::objectList().empty())
+    delete Script::objectList().front();
   //Delete all triggers
-  if(this->getTriggers())
-    while(!triggers->empty())
-      delete triggers->front();
-  
+  while(!ScriptTrigger::objectList().empty())
+    delete ScriptTrigger::objectList().front();
+
 }
 
@@ -105,28 +97,11 @@
 Script* ScriptManager::getScriptByFile(const std::string& file)
 {
-  if(getScripts())
-    for(std::list<BaseObject*>::const_iterator it = scripts->begin(); it != scripts->end(); it++ )
-    {
-      if( (dynamic_cast<Script*>(*it))->getFileName().compare(file) == 0)
-      {
-        return dynamic_cast<Script*>(*it);
-      }
-    }
+  for (NewObjectList<Script>::const_iterator it = Script::objectList().begin();
+       it != Script::objectList().end();
+       ++it)
+    if( ((*it))->getFileName().compare(file) == 0)
+      return (*it);
 
   return NULL;
 
 }
-
-
-bool ScriptManager::getScripts()
-{
-  return (this->scripts != NULL || (this->scripts = ClassList::getList(CL_SCRIPT)) != NULL);
-}
-
-bool ScriptManager::getTriggers()
-{
-  return (this->triggers != NULL || (this->triggers = ClassList::getList(CL_SCRIPT_TRIGGER)) != NULL);
-}
-
-
-
Index: branches/new_class_id/src/lib/script_engine/script_manager.h
===================================================================
--- branches/new_class_id/src/lib/script_engine/script_manager.h	(revision 9692)
+++ branches/new_class_id/src/lib/script_engine/script_manager.h	(revision 9699)
@@ -34,14 +34,5 @@
    void  createTriggers(const TiXmlElement* triggers);
 
-   bool getTriggers();
-   bool getScripts();
-
    static ScriptManager*             singletonRef;   //!< Reference to this class
-
-   const std::list<BaseObject*>*     triggers;       //!< A list of all the triggers in the world
-
-   const std::list<BaseObject*>*     scripts;        //!< A list of all the scripts in the world
-
-
 };
 #endif
