Index: trunk/src/lib/lang/Makefile.am
===================================================================
--- trunk/src/lib/lang/Makefile.am	(revision 9673)
+++ trunk/src/lib/lang/Makefile.am	(revision 9674)
@@ -1,4 +1,7 @@
 MAINSRCDIR=../..
 include $(MAINSRCDIR)/defs/include_paths.am
+
+LIB_PREFIX=$(MAINSRCDIR)/lib
+include $(MAINSRCDIR)/lib/BuildLibs.am
 
 noinst_LIBRARIES = libORXlang.a
@@ -19,5 +22,7 @@
 
 
-bin_PROGRAMS = test_object_list
+
+## THIS ALL IS JUST FOR TESTING!!
+check_PROGRAMS = test_object_list
 
 test_object_list_SOURCES = \
@@ -25,3 +30,10 @@
 
 test_object_list_LDADD = \
+		$(MAINSRCDIR)/util/libORXutils.a \
+		$(libORXlibs_a_LIBRARIES_) \
+		$(MAINSRCDIR)/world_entities/libORXwe.a \
+		$(libORXlibs_a_LIBRARIES_) \
+		$(MAINSRCDIR)/util/libORXutils.a
+
+#test_object_list_LDADD = \
 		libORXlang.a
Index: trunk/src/lib/lang/new_class_id.cc
===================================================================
--- trunk/src/lib/lang/new_class_id.cc	(revision 9673)
+++ trunk/src/lib/lang/new_class_id.cc	(revision 9674)
@@ -37,5 +37,8 @@
   ClassList::iterator it;
   for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+  {
     (*it)._objectList->unregisterObject((*it)._iterator);
+    delete (*it)._iterator;
+  }
   //_objectList->unregisterObject(this->_iterators);
 }
Index: trunk/src/lib/lang/new_object_list.h
===================================================================
--- trunk/src/lib/lang/new_object_list.h	(revision 9673)
+++ trunk/src/lib/lang/new_object_list.h	(revision 9674)
@@ -177,5 +177,5 @@
   for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
   {
-    std::cout << (*it)->name() << std::endl;
+    std::cout << (*it)->getName() << std::endl;
   }
 }
Index: trunk/src/lib/lang/test_object_list.cc
===================================================================
--- trunk/src/lib/lang/test_object_list.cc	(revision 9673)
+++ trunk/src/lib/lang/test_object_list.cc	(revision 9674)
@@ -3,16 +3,20 @@
 #include <iostream>
 
-class BaseObject
+#include <base_object.h>
+
+class NewBaseObject
 {
 public:
   void setName(const std::string& name) { this->_objectName = name; };
-  const std::string& name() const { return _objectName; };
+  const std::string& getName() const { return _objectName; };
   bool operator==(const std::string& name) const { return _objectName == name; };
 
-  NewObjectListDeclaration(BaseObject);
-
+  NewObjectListDeclaration(NewBaseObject);
 
 protected:
-  BaseObject(const std::string& objectName = "") : _objectName(objectName) { this->registerObject(this, objectList); };
+  NewBaseObject(const std::string& objectName = "") : _objectName(objectName)
+  {
+    this->registerObject(this, objectList);
+  };
   template<class T>
   inline void registerObject(T* object, NewObjectList<T>& objectList) { _id.registerObject(object, objectList); };
@@ -23,8 +27,8 @@
 
 };
-NewObjectListDefinition(BaseObject);
+NewObjectListDefinition(NewBaseObject);
 
 
-class Test : public BaseObject
+class Test : public NewBaseObject
 {
 public:
@@ -40,10 +44,11 @@
 Test::Test()
 {
+//  this->setClassID(CL_PARENT_NODE, "Test");
   this->registerObject(this, Test::objectList);
- // std::cout << "Test()\n";
+  // std::cout << "Test()\n";
 };
 Test::~Test()
 {
-//  std::cout << "~Test()\n";
+  //  std::cout << "~Test()\n";
 }
 
@@ -53,9 +58,10 @@
   Bone()
   {
-    this->registerObject(this, Bone::objectList);
+//    this->registerObject(this, Bone::objectList);
     //std::cout << "Bone()\n";
   };
-  ~Bone() {
-  //  std::cout << "~Bone()\n";
+  ~Bone()
+  {
+    //  std::cout << "~Bone()\n";
   };
   NewObjectListDeclaration(Bone);
@@ -65,19 +71,26 @@
 int main()
 {
+  for (unsigned int i = 0; i < 20; ++i)
+  {
+    std::cout<< i << std::endl;
+    Test* test = new Test[10000];
+    delete[]test;
+  }
+  //   char tmp[100];
+  //   for (unsigned int i = 0 ; i < 100; ++i)
+  //   {
+  //     sprintf(tmp, "Tmp_%d", i);
+  //     test[i].setName(tmp);
+  //   }
+  //   Test::objectList.debug();
+  //   //test->setName("Test-object");
+  //
+  //   std::cout << "Here is debug of all BaseObject\n";
+  //   BaseObject::objectList.debug();
+  // //   delete bone;
+  //   delete []test;
+  //   std::cout << "Again\n";
+  //   BaseObject::objectList.debug();
 
-
-
-  Test* test = new Test[1000000];
-  //test->setName("Test-object");
-
-//  Test::objectList.debug();
-/*
-  Bone* bone = new Bone();
-  bone->setName("Bone-object");*/
-
-  //std::cout << "Here is debug of all Classes\n";
-  //BaseObject::objectList.debug();
-//   delete bone;
-  delete []test;
 }
 
