Index: /branches/new_class_id/src/lib/graphics/effects/atmospheric_engine.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/effects/atmospheric_engine.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/effects/atmospheric_engine.cc	(revision 9727)
@@ -20,5 +20,5 @@
 #include "effects/fog_effect.h"
 
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "util/loading/factory.h"
 
Index: /branches/new_class_id/src/lib/graphics/effects/lense_flare.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/effects/lense_flare.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/effects/lense_flare.cc	(revision 9727)
@@ -27,4 +27,5 @@
 #include "light.h"
 #include "state.h"
+#include "debug.h"
 
 #include "render2D/image_plane.h"
Index: /branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/effects/volfog_effect.cc	(revision 9727)
@@ -23,4 +23,6 @@
 #include "glincl.h"
 //#include "shell_command.h"
+#include "debug.h"
+
 
 #define GLX_GLXEXT_PROTOTYPES
Index: /branches/new_class_id/src/lib/graphics/graphics_engine.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/graphics_engine.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/graphics_engine.cc	(revision 9727)
@@ -40,5 +40,5 @@
 
 #include "shell_command.h"
-
+#include "loading/load_param_xml.h"
 
 #include "parser/tinyxml/tinyxml.h"
@@ -118,5 +118,5 @@
 {
   LoadParamXML(root, "GraphicsEffect", this, GraphicsEngine, loadGraphicsEffects)
-  .describe("loads a graphics effect");
+   .describe("loads a graphics effect");
 }
 
Index: /branches/new_class_id/src/lib/graphics/light.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/light.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/light.cc	(revision 9727)
@@ -22,6 +22,5 @@
 #include "glincl.h"
 #include "vector.h"
-#include "parser/tinyxml/tinyxml.h"
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "util/loading/factory.h"
 #include "debug.h"
@@ -265,4 +264,5 @@
 void LightManager::loadParams(const TiXmlElement* root)
 {
+  printf("Loading Lights\n");
   LoadParamXML(root, "Lights", this, LightManager, loadLights)
   .describe("an XML-Element to load lights from.");
@@ -277,4 +277,6 @@
 void LightManager::loadLights(const TiXmlElement* root)
 {
+  printf("Loading single Lights\n");
+
   const TiXmlElement* element = root->FirstChildElement();
 
Index: /branches/new_class_id/src/lib/graphics/render2D/element_2d.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/render2D/element_2d.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/graphics/render2D/element_2d.cc	(revision 9727)
@@ -31,6 +31,7 @@
 
 #include "color.h"
-
+#include "debug.h"
 #include "shell_command.h"
+
 SHELL_COMMAND(debug, Element2D, debug2D);
 
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 9726)
+++ /branches/new_class_id/src/lib/gui/gl/glmenu/glmenu_imagescreen.cc	(revision 9727)
@@ -24,4 +24,5 @@
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/lib/lang/base_object.cc
===================================================================
--- /branches/new_class_id/src/lib/lang/base_object.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/lang/base_object.cc	(revision 9727)
@@ -19,4 +19,5 @@
 #include "base_object.h"
 
+#include "debug.h"
 #include "util/loading/load_param.h"
 
Index: /branches/new_class_id/src/lib/particles/model_particles.cc
===================================================================
--- /branches/new_class_id/src/lib/particles/model_particles.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/particles/model_particles.cc	(revision 9727)
@@ -23,4 +23,5 @@
 #include "state.h"
 #include "shell_command.h"
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/lib/particles/particle_system.cc
===================================================================
--- /branches/new_class_id/src/lib/particles/particle_system.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/particles/particle_system.cc	(revision 9727)
@@ -23,5 +23,5 @@
 #include "model.h"
 
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "util/loading/factory.h"
 #include "material.h"
@@ -29,5 +29,4 @@
 #include "shell_command.h"
 
-#include "parser/tinyxml/tinyxml.h"
 #include <algorithm>
 
Index: /branches/new_class_id/src/lib/physics/physics_connection.cc
===================================================================
--- /branches/new_class_id/src/lib/physics/physics_connection.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/physics/physics_connection.cc	(revision 9727)
@@ -19,4 +19,5 @@
 
 #include "physics_engine.h"
+#include "debug.h"
 
 #include "field.h"
Index: /branches/new_class_id/src/lib/physics/physics_engine.cc
===================================================================
--- /branches/new_class_id/src/lib/physics/physics_engine.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/physics/physics_engine.cc	(revision 9727)
@@ -18,7 +18,6 @@
 #include "physics_engine.h"
 
-#include "parser/tinyxml/tinyxml.h"
 #include "util/loading/factory.h"
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 
 
Index: /branches/new_class_id/src/lib/script_engine/lunar.h
===================================================================
--- /branches/new_class_id/src/lib/script_engine/lunar.h	(revision 9726)
+++ /branches/new_class_id/src/lib/script_engine/lunar.h	(revision 9727)
@@ -16,5 +16,5 @@
   userdataType;
 public:
-  typedef Executor* mfp;
+  typedef Executor<lua_State*>* mfp;
   typedef struct { const char *name; mfp mfunc; }
   RegType;
@@ -184,8 +184,7 @@
     lua_remove(L, 1);  // remove self so member function args start at index 1
     // get member function from upvalue
-    Executor *l = static_cast<Executor*>(lua_touserdata(L, lua_upvalueindex(1)));
-    int value;
-    (*l)(obj, value, L);  // call member function
-    return value;
+    mfp l = static_cast<mfp>(lua_touserdata(L, lua_upvalueindex(1)));
+    (*l)(obj, L);  // call member function
+    return l->hasRetVal()? 1 : 0;
   }
 
Index: /branches/new_class_id/src/lib/script_engine/script_manager.cc
===================================================================
--- /branches/new_class_id/src/lib/script_engine/script_manager.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/script_engine/script_manager.cc	(revision 9727)
@@ -27,6 +27,5 @@
 #include "script_trigger.h"
 #include "luaincl.h"
-#include "loading/load_param.h"
-#include "parser/tinyxml/tinyxml.h"
+#include "loading/load_param_xml.h"
 
 
Index: /branches/new_class_id/src/lib/script_engine/script_method.cc
===================================================================
--- /branches/new_class_id/src/lib/script_engine/script_method.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/script_engine/script_method.cc	(revision 9727)
@@ -25,5 +25,5 @@
 { }
 
-ScriptMethod* ScriptMethod::addMethod(const std::string& methodName, const Executor& executor)
+ScriptMethod* ScriptMethod::addMethod(const std::string& methodName, const Executor<lua_State*>& executor)
 {
   this->methods.push_back(ScriptMethod::Method(methodName, executor));
@@ -32,5 +32,5 @@
 }
 
-ScriptMethod::Method::Method(const std::string& name, const Executor& executor)
+ScriptMethod::Method::Method(const std::string& name, const Executor<lua_State*>& executor)
 {
   this->name = name;
Index: /branches/new_class_id/src/lib/script_engine/script_method.h
===================================================================
--- /branches/new_class_id/src/lib/script_engine/script_method.h	(revision 9726)
+++ /branches/new_class_id/src/lib/script_engine/script_method.h	(revision 9727)
@@ -18,10 +18,10 @@
   ~ScriptMethod();
 
-  ScriptMethod* addMethod(const std::string& methodName, const Executor& executor);
+  ScriptMethod* addMethod(const std::string& methodName, const Executor<lua_State*>& executor);
 
   unsigned int size() const { return methods.size(); };
 
   const std::string& name(unsigned int methodNumber) const { return methods[methodNumber].name; };
-  const Executor* executor(unsigned int methodNumber) const { return methods[methodNumber].executor; };
+  const Executor<lua_State*>* executor(unsigned int methodNumber) const { return methods[methodNumber].executor; };
 
 
@@ -29,7 +29,7 @@
   struct Method
   {
-    Method(const std::string& name, const Executor& executor);
-    std::string    name;
-    Executor*      executor;
+    Method(const std::string& name, const Executor<lua_State*>& executor);
+    std::string             name;
+    Executor<lua_State*>*   executor;
   };
 
Index: /branches/new_class_id/src/lib/shell/shell_command.cc
===================================================================
--- /branches/new_class_id/src/lib/shell/shell_command.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/shell/shell_command.cc	(revision 9727)
@@ -36,5 +36,5 @@
    * @param paramCount the count of parameters this command takes
    */
-  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor* executor)
+  ShellCommand::ShellCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor)
   {
     this->registerObject(this, ShellCommand::_objectList);
@@ -75,5 +75,5 @@
    * @brief registers a new ShellCommand
    */
-  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, Executor* executor)
+  ShellCommand* ShellCommand::registerCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor)
   {
     if (ShellCommand::exists(commandName, className))
Index: /branches/new_class_id/src/lib/shell/shell_command.h
===================================================================
--- /branches/new_class_id/src/lib/shell/shell_command.h	(revision 9726)
+++ /branches/new_class_id/src/lib/shell/shell_command.h	(revision 9727)
@@ -71,5 +71,5 @@
     ShellCommand* completionPlugin(unsigned int parameter, const CompletorPlugin& completorPlugin);
 
-    static ShellCommand* registerCommand(const std::string& commandName, const std::string& className, Executor* executor);
+    static ShellCommand* registerCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor);
     static void unregisterCommand(const std::string& commandName, const std::string& className);
     static const ShellCommand* const getCommand(const std::string& commandName, const std::string& className);
@@ -87,5 +87,5 @@
 
   protected:
-    ShellCommand(const std::string& commandName, const std::string& className, Executor* executor);
+    ShellCommand(const std::string& commandName, const std::string& className, Executor<const SubString>* executor);
     virtual ~ShellCommand();
 
@@ -99,5 +99,5 @@
     std::string                      description;           //!< A description for this commnand. (initially ""). Assigned with (create)->describe("blablabla");
     std::vector<CompletorPlugin*>    completors;            //!< Completors for the Parameters
-    Executor*                        executor;              //!< The Executor, that really executes the Function.
+    Executor<const SubString>*       executor;              //!< The Executor, that really executes the Function.
   };
 
Index: /branches/new_class_id/src/lib/util/Makefile.am
===================================================================
--- /branches/new_class_id/src/lib/util/Makefile.am	(revision 9726)
+++ /branches/new_class_id/src/lib/util/Makefile.am	(revision 9727)
@@ -21,4 +21,5 @@
 		loading/game_loader.cc \
 		loading/load_param.cc \
+		loading/load_param_xml.cc \
 		loading/load_param_description.cc \
 		loading/factory.cc \
@@ -59,4 +60,5 @@
 		loading/game_loader.h \
 		loading/load_param.h \
+		loading/load_param_xml.h \
 		loading/load_param_description.h \
 		loading/factory.h \
Index: /branches/new_class_id/src/lib/util/executor/executor.cc
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/util/executor/executor.cc	(revision 9727)
@@ -19,5 +19,5 @@
 
 
-ObjectListDefinition(Executor);
+ObjectListDefinition(ExecutorBase);
 
 /**
@@ -27,13 +27,15 @@
  * @param paramCount the count of parameters this command takes
  */
-Executor::Executor(const MultiType& param0,
-                   const MultiType& param1,
-                   const MultiType& param2,
-                   const MultiType& param3,
-                   const MultiType& param4,
-                   const MultiType& param5,
-                   const MultiType& param6)
+ExecutorBase::ExecutorBase(bool hasRetVal,
+                           const MultiType& param0,
+                           const MultiType& param1,
+                           const MultiType& param2,
+                           const MultiType& param3,
+                           const MultiType& param4,
+                           const MultiType& param5,
+                           const MultiType& param6)
+  : bRetVal(hasRetVal)
 {
-  this->registerObject(this, Executor::_objectList);
+  this->registerObject(this, ExecutorBase::_objectList);
 
   // What Parameters have we got
@@ -58,13 +60,8 @@
 
 /**
- * deconstructs a Executor
+ * clones this element into executor.
+ * @param executor the Executor to clone
  */
-Executor::~Executor()
-{}
-
-/**
- * clones this element into executor.
- */
-void Executor::cloning(Executor* executor) const
+void ExecutorBase::cloning(ExecutorBase* executor) const
 {
   executor->functorType  = this->functorType;
@@ -83,5 +80,5 @@
  * @returns itself
  */
-Executor* Executor::defaultValues(const MultiType& value0,
+void ExecutorBase::defaultValues(const MultiType& value0,
                                   const MultiType& value1,
                                   const MultiType& value2,
@@ -91,7 +88,4 @@
                                   const MultiType& value6)
 {
-  if (this == NULL)
-    return NULL;
-
   const MultiType* value[5];
   value[0] = &value0;
@@ -109,5 +103,4 @@
     }
   }
-  return this;
 }
 
@@ -115,6 +108,5 @@
  * @brief prints out nice information about the Executor
  */
-void Executor::debug()
+void ExecutorBase::debug()
 {
-
 }
Index: /branches/new_class_id/src/lib/util/executor/executor.h
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/executor/executor.h	(revision 9727)
@@ -18,6 +18,4 @@
   Executor_Objective         = 1,
   Executor_Static            = 2,
-
-  Executor_NoLoadString      = 8,
 } Executor_Type;
 
@@ -36,48 +34,92 @@
  *  Functions with many types (@see functor_list.h)
  */
-class Executor : public BaseObject
+class ExecutorBase : public BaseObject
 {
-  ObjectListDeclaration(Executor);
-  public:
-    virtual ~Executor();
+  ObjectListDeclaration(ExecutorBase);
+public:
+  //    virtual bool operator==(const Executor* executor) const = 0;
 
-    virtual Executor* clone () const = 0;
-//    virtual bool operator==(const Executor* executor) const = 0;
+  /** @param i the i'th defaultValue, @returns reference to the MultiType */
+  inline MultiType& getDefaultValue(unsigned int i) { return defaultValue[i]; };
 
-    // SETTING up the EXECUTOR
-    Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
-                            const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
-                            const MultiType& value4 = MT_NULL, const MultiType& param5 = MT_NULL,
-                            const MultiType& param6 = MT_NULL);
-    /** @param i the i'th defaultValue, @returns reference to the MultiType */
-    inline MultiType& getDefaultValue(unsigned int i) { return defaultValue[i]; };
+  // EXECUTE
+  /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
+  //     virtual void operator()(BaseObject* object, int& count, void* values) const = 0;
+  /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
+  //     virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
 
-    // EXECUTE
-    /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-    virtual void operator()(BaseObject* object, int& count, void* values) const = 0;
-    /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
-    virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
+  // RETRIEVE INFORMATION
+  /** @returns the Type of this Function (either static or objective) */
+  inline long getType() const { return this->functorType; };
+  /** @returns the Count of Parameters this Executor takes */
+  inline unsigned int getParamCount() const { return this->paramCount; };
+  /** @returns true if the Executor has a return Value. */
+  inline bool hasRetVal() const { return bRetVal; };
 
-    // RETRIEVE INFORMATION
-    /** @returns the Type of this Function (either static or objective) */
-    inline long getType() const { return this->functorType; };
-    /** @returns the Count of Parameters this Executor takes */
-    inline unsigned int getParamCount() const { return this->paramCount; };
+  static void debug();
 
-    static void debug();
+protected:
+  ExecutorBase(bool hasRetVal = false,
+               const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
+               const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
+               const MultiType& param4 = MT_NULL, const MultiType& param5 = MT_NULL,
+               const MultiType& param6 = MT_NULL);
 
-  protected:
-    Executor(const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
-             const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
-             const MultiType& param4 = MT_NULL, const MultiType& param5 = MT_NULL,
-             const MultiType& param6 = MT_NULL);
+  // SETTING up the EXECUTOR
+  void defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
+                     const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
+                     const MultiType& value4 = MT_NULL, const MultiType& param5 = MT_NULL,
+                     const MultiType& param6 = MT_NULL);
 
-    void cloning(Executor* executor) const;
+  void cloning(ExecutorBase* executor) const;
 
-  protected:
-    short                       functorType;      //!< The type of Function we've got (either static or objective).
-    unsigned int                paramCount;       //!< the count of parameters.
-    MultiType                   defaultValue[7];  //!< Default Values.
+protected:
+  short                       functorType;      //!< The type of Function we've got (either static or objective).
+  unsigned int                paramCount;       //!< the count of parameters.
+  MultiType                   defaultValue[7];  //!< Default Values.
+
+  bool                        bRetVal;          //!< True if the Executor has a return Value.
 };
+
+template <typename CallType> class Executor : public ExecutorBase
+{
+public:
+  virtual Executor<CallType>* clone () const = 0;
+
+  /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
+  virtual void operator()(BaseObject* object, CallType& values) const = 0;
+
+  /**
+   * @brief set the default values of the executor
+   * @param value0 the first default value
+   * @param value1 the second default value
+   * @param value2 the third default value
+   * @param value3 the fourth default value
+   * @param value4 the fifth default value
+   * @returns itself
+   * @note: THIS FUNCTION WILL BE REPLACED BY A CONFIGURATOR (most probably).
+  */
+  Executor* defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
+                          const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
+                          const MultiType& value4 = MT_NULL, const MultiType& value5 = MT_NULL,
+                          const MultiType& value6 = MT_NULL)
+  {
+    this->ExecutorBase::defaultValues(value0, value1, value2, value3, value4, value5, value6);
+    return this;
+  }
+
+
+
+protected:
+  Executor(bool hasRetVal,
+	   const MultiType& param0 = MT_NULL, const MultiType& param1 = MT_NULL,
+           const MultiType& param2 = MT_NULL, const MultiType& param3 = MT_NULL,
+           const MultiType& param4 = MT_NULL, const MultiType& param5 = MT_NULL,
+           const MultiType& param6 = MT_NULL)
+      : ExecutorBase(hasRetVal, param0, param1, param2, param3, param4, param5, param6)
+  {}
+};
+
+
 
 #include "executor/executor_functional.h"
Index: /branches/new_class_id/src/lib/util/executor/executor_functional.h
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor_functional.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/executor/executor_functional.h	(revision 9727)
@@ -94,5 +94,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions without any parameters.
-template<class T> class __EXECUTOR_FUNCTIONAL_NAME(0) : public Executor
+template<class T> class __EXECUTOR_FUNCTIONAL_NAME(0) : public Executor<const SubString>
 {
 private:
@@ -106,5 +106,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(0) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST )
-      : Executor()
+      : Executor<const SubString>(false)
   {
     this->functorType = Executor_Objective;
@@ -132,5 +132,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(this->functionPointer);
@@ -144,5 +144,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with one parameter.
-template<class T, typename type0> class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor
+template<class T, typename type0> class __EXECUTOR_FUNCTIONAL_NAME(1) : public Executor<const SubString>
 {
 private:
@@ -156,5 +156,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(1) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor(ExecutorParamType<type0>())
+      : Executor<const SubString>(false, ExecutorParamType<type0>())
   {
     this->functorType = Executor_Objective;
@@ -186,5 +186,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return  new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0>(this->functionPointer);
@@ -196,5 +196,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with two parameters.
-template<class T, typename type0, typename type1> class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor
+template<class T, typename type0, typename type1> class __EXECUTOR_FUNCTIONAL_NAME(2) : public Executor<const SubString>
 {
 private:
@@ -208,5 +208,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(2) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
+      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>())
   {
     this->functorType = Executor_Objective;
@@ -239,5 +239,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0, type1>(this->functionPointer);
@@ -250,5 +250,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with three parameters.
-template<class T, typename type0, typename type1, typename type2> class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor
+template<class T, typename type0, typename type1, typename type2> class __EXECUTOR_FUNCTIONAL_NAME(3) : public Executor<const SubString>
 {
 private:
@@ -262,5 +262,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(3) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
   {
     this->functorType = Executor_Objective;
@@ -295,5 +295,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0, type1, type2>(this->functionPointer);
@@ -307,5 +307,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with four parameters.
-template<class T, typename type0, typename type1, typename type2, typename type3> class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor
+template<class T, typename type0, typename type1, typename type2, typename type3> class __EXECUTOR_FUNCTIONAL_NAME(4) : public Executor<const SubString>
 {
 private:
@@ -319,5 +319,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(4) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
   {
     this->functorType = Executor_Objective;
@@ -354,5 +354,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0, type1, type2, type3>(this->functionPointer);
@@ -366,5 +366,5 @@
 ///////////
 //! @brief ExecutorClass, that can execute Functions with five parameters.
-template<class T, typename type0, typename type1, typename type2, typename type3, typename type4> class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor
+template<class T, typename type0, typename type1, typename type2, typename type3, typename type4> class __EXECUTOR_FUNCTIONAL_NAME(5) : public Executor<const SubString>
 {
 private:
@@ -378,5 +378,5 @@
    */
   __EXECUTOR_FUNCTIONAL_NAME(5) (void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0, type1, type2, type3, type4) __EXECUTOR_FUNCTIONAL_CONST)
-      : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
+      : Executor<const SubString>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
   {
     this->functorType = Executor_Objective;
@@ -415,5 +415,5 @@
    * @returns a new Executor that's a copy of this one.
    */
-  virtual Executor* clone() const
+  virtual Executor<const SubString>* clone() const
   {
     return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0, type1, type2, type3, type4>(this->functionPointer);
@@ -427,5 +427,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR0() \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)() __EXECUTOR_FUNCTIONAL_CONST) \
 { \
   return new __EXECUTOR_FUNCTIONAL_NAME(0)<T>(functionPointer); \
@@ -437,5 +437,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR1(type0) \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
   return new __EXECUTOR_FUNCTIONAL_NAME(1)<T, type0##_TYPE>(functionPointer); \
@@ -448,5 +448,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR2(type0, type1) \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
   return new __EXECUTOR_FUNCTIONAL_NAME(2)<T, type0##_TYPE, type1##_TYPE>(functionPointer); \
@@ -460,5 +460,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR3(type0, type1, type2) \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
   return new __EXECUTOR_FUNCTIONAL_NAME(3)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE>(functionPointer); \
@@ -473,5 +473,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR4(type0, type1, type2, type3) \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
   return new __EXECUTOR_FUNCTIONAL_NAME(4)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE>(functionPointer); \
@@ -487,5 +487,5 @@
  */
 #define EXECUTOR_FUNCTIONAL_CREATOR5(type0, type1, type2, type3, type4) \
-template<class T> Executor* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
+template<class T> Executor<const SubString>* createExecutor(void (__EXECUTOR_FUNCTIONAL_FUNCTION_POINTER)(type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE) __EXECUTOR_FUNCTIONAL_CONST) \
 { \
     return new __EXECUTOR_FUNCTIONAL_NAME(5)<T, type0##_TYPE, type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE>(functionPointer); \
Index: /branches/new_class_id/src/lib/util/executor/executor_lua.h
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor_lua.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/executor/executor_lua.h	(revision 9727)
@@ -40,43 +40,33 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T> class ExecutorLua0 : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua0(void(T::*function)())
-  : Executor()
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      (dynamic_cast<T*>(object)->*(functionPointer))();
-      count = 0;
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
-    }
-  private:
-    void          (T::*functionPointer)();
+template<class T> class ExecutorLua0 : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua0(void(T::*function)())
+      : Executor<lua_State*>(false)
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    (dynamic_cast<T*>(object)->*(functionPointer))();
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
+  }
+private:
+  void          (T::*functionPointer)();
 };
 
@@ -87,45 +77,32 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename type0> class ExecutorLua1 : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua1(void(T::*function)(type0))
-  : Executor(ExecutorParamType<type0>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 0;
-
-      (dynamic_cast<T*>(object)->*(functionPointer))(fromLua<type0>(state, 1));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua1<T, type0>((this->functionPointer));
-    }
-  private:
-    void          (T::*functionPointer)(type0);
+template<class T, typename type0> class ExecutorLua1 : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua1(void(T::*function)(type0))
+      : Executor<lua_State*>(false, ExecutorParamType<type0>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    (dynamic_cast<T*>(object)->*(functionPointer))(fromLua<type0>(state, 1));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua1<T, type0>((this->functionPointer));
+  }
+private:
+  void          (T::*functionPointer)(type0);
 };
 
@@ -136,47 +113,44 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename type0, typename type1> class ExecutorLua2 : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua2(void(T::*function)(type0, type1))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 0;
-
-      (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
+template<class T, typename type0, typename type1> class ExecutorLua2 : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua2(void(T::*function)(type0, type1))
+      : Executor<lua_State*>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  /**
+   * @brief executes the Command on BaseObject
+   * @param object the BaseObject to execute this Executor on
+   * @param loadString ignored in this case
+   */
+  virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+  {
+    PRINTF(1)("no usefull executor\n");
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    (dynamic_cast<T*>(object)->*(functionPointer))(
+      fromLua<type0>(state, 1),
       fromLua<type1>(state, 2) );
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua2<T, type0, type1>(this->functionPointer);
-    }
-  private:
-    void          (T::*functionPointer)(type0, type1);
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua2<T, type0, type1>(this->functionPointer);
+  }
+private:
+  void          (T::*functionPointer)(type0, type1);
 };
 
@@ -186,48 +160,45 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename type0, typename type1, typename type2> class ExecutorLua3 : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua3(void(T::*function)(type0, type1, type2))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 0;
-
-      (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
+template<class T, typename type0, typename type1, typename type2> class ExecutorLua3 : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua3(void(T::*function)(type0, type1, type2))
+      : Executor<lua_State*>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  /**
+   * @brief executes the Command on BaseObject
+   * @param object the BaseObject to execute this Executor on
+   * @param loadString ignored in this case
+   */
+  virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+  {
+    PRINTF(1)("no usefull executor\n");
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    (dynamic_cast<T*>(object)->*(functionPointer))(
+      fromLua<type0>(state, 1),
       fromLua<type1>(state, 2),
       fromLua<type2>(state, 3) );
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua3<T, type0, type1, type2>(this->functionPointer);
-    }
-  private:
-    void          (T::*functionPointer)(type0, type1, type2);
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua3<T, type0, type1, type2>(this->functionPointer);
+  }
+private:
+  void          (T::*functionPointer)(type0, type1, type2);
 };
 
@@ -237,49 +208,36 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4 : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua4(void(T::*function)(type0, type1, type2, type3))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 0;
-
-      (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
+template<class T, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4 : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua4(void(T::*function)(type0, type1, type2, type3))
+      : Executor<lua_State*>(false, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    (dynamic_cast<T*>(object)->*(functionPointer))(
+      fromLua<type0>(state, 1),
       fromLua<type1>(state, 2),
       fromLua<type2>(state, 3),
       fromLua<type3>(state, 4) );
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua4<T, type0, type1, type2, type3>(this->functionPointer);
-    }
-  private:
-    void          (T::*functionPointer)(type0, type1, type2, type3);
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua4<T, type0, type1, type2, type3>(this->functionPointer);
+  }
+private:
+  void          (T::*functionPointer)(type0, type1, type2, type3);
 };
 
@@ -296,45 +254,32 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret> class ExecutorLua0ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua0ret(ret (T::*function)())
-  : Executor()
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-    
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))());
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua0ret<T, ret>(this->functionPointer);
-    }
-  private:
-    ret           (T::*functionPointer)();
+template<class T, typename ret> class ExecutorLua0ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua0ret(ret (T::*function)())
+      : Executor<lua_State*>(true)
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))());
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua0ret<T, ret>(this->functionPointer);
+  }
+private:
+  ret           (T::*functionPointer)();
 };
 
@@ -345,46 +290,33 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0> class ExecutorLua1ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua1ret(ret (T::*function)(type0))
-  : Executor(ExecutorParamType<type0>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1)));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua1ret<T, ret, type0>(this->functionPointer);
-    }
-  private:
-    ret           (T::*functionPointer)(type0);
+template<class T, typename ret, typename type0> class ExecutorLua1ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua1ret(ret (T::*function)(type0))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1)));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua1ret<T, ret, type0>(this->functionPointer);
+  }
+private:
+  ret           (T::*functionPointer)(type0);
 };
 
@@ -393,47 +325,34 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1> class ExecutorLua2ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua2ret(ret (T::*function)(type0, type1))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
-          fromLua<type1>(state, 2) ));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua2ret<T, ret, type0, type1>(this->functionPointer);
-    }
-  private:
-    ret           (T::*functionPointer)(type0, type1);
+template<class T, typename ret, typename type0, typename type1> class ExecutorLua2ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua2ret(ret (T::*function)(type0, type1))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2) ));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua2ret<T, ret, type0, type1>(this->functionPointer);
+  }
+private:
+  ret           (T::*functionPointer)(type0, type1);
 };
 
@@ -443,48 +362,45 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1, typename type2> class ExecutorLua3ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua3ret(ret (T::*function)(type0, type1, type2))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
-          fromLua<type1>(state, 2),
-          fromLua<type2>(state, 3) ));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua3ret<T, ret, type0, type1, type2>(this->functionPointer);
-    }
-  private:
-    ret          (T::*functionPointer)(type0, type1, type2);
+template<class T, typename ret, typename type0, typename type1, typename type2> class ExecutorLua3ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua3ret(ret (T::*function)(type0, type1, type2))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  /**
+   * @brief executes the Command on BaseObject
+   * @param object the BaseObject to execute this Executor on
+   * @param loadString ignored in this case
+   */
+  virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+  {
+    PRINTF(1)("no usefull executor\n");
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2),
+                 fromLua<type2>(state, 3) ));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua3ret<T, ret, type0, type1, type2>(this->functionPointer);
+  }
+private:
+  ret          (T::*functionPointer)(type0, type1, type2);
 };
 
@@ -494,49 +410,36 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua4ret(ret (T::*function)(type0, type1, type2, type3))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
-          fromLua<type1>(state, 2),
-          fromLua<type2>(state, 3),
-          fromLua<type3>(state, 4) ));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua4ret<T, ret, type0, type1, type2, type3>(this->functionPointer);
-    }
-  private:
-    ret          (T::*functionPointer)(type0, type1, type2, type3);
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3> class ExecutorLua4ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua4ret(ret (T::*function)(type0, type1, type2, type3))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2),
+                 fromLua<type2>(state, 3),
+                 fromLua<type3>(state, 4) ));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua4ret<T, ret, type0, type1, type2, type3>(this->functionPointer);
+  }
+private:
+  ret          (T::*functionPointer)(type0, type1, type2, type3);
 };
 
@@ -545,50 +448,37 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4> class ExecutorLua5ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua5ret(ret (T::*function)(type0, type1, type2, type3, type4))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
-    {
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
-
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      PRINTF(1)("no usefull executor\n");
-    }
-
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      lua_State* state = (lua_State*)values;
-      count = 1;
-
-      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-          fromLua<type0>(state, 1),
-          fromLua<type1>(state, 2),
-          fromLua<type2>(state, 3),
-          fromLua<type3>(state, 4),
-          fromLua<type4>(state, 5) ));
-    }
-
-    /**
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      return new ExecutorLua5ret<T, ret, type0, type1, type2, type3, type4>(this->functionPointer);
-    }
-  private:
-    ret          (T::*functionPointer)(type0, type1, type2, type3, type4);
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4> class ExecutorLua5ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua5ret(ret (T::*function)(type0, type1, type2, type3, type4))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>(), ExecutorParamType<type2>(), ExecutorParamType<type3>(), ExecutorParamType<type4>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2),
+                 fromLua<type2>(state, 3),
+                 fromLua<type3>(state, 4),
+                 fromLua<type4>(state, 5) ));
+  }
+
+  /**
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua5ret<T, ret, type0, type1, type2, type3, type4>(this->functionPointer);
+  }
+private:
+  ret          (T::*functionPointer)(type0, type1, type2, type3, type4);
 };
 
@@ -597,53 +487,40 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5> class ExecutorLua6ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua6ret(ret (T::*function)(type0, type1, type2, type3, type4, type5))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(),
-             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
-             ExecutorParamType<type4>(), ExecutorParamType<type5>())
-             {
-               this->functionPointer = function;
-               this->functorType = Executor_Objective | Executor_NoLoadString;
-             }
-
-    /**
-              * @brief executes the Command on BaseObject
-              * @param object the BaseObject to execute this Executor on
-              * @param loadString ignored in this case
-     */
-             virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-             {
-               PRINTF(1)("no usefull executor\n");
-             }
-
-             virtual void operator()(BaseObject* object, int& count, void* values) const
-             {
-               lua_State* state = (lua_State*)values;
-               count = 1;
-
-               toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-                   fromLua<type0>(state, 1),
-                   fromLua<type1>(state, 2),
-                   fromLua<type2>(state, 3),
-                   fromLua<type3>(state, 4),
-                   fromLua<type4>(state, 5),
-                   fromLua<type5>(state, 6) ));
-             }
-
-    /**
-              * @returns a _new_ Copy of this Executor
-     */
-             virtual Executor* clone () const
-             {
-               return new ExecutorLua6ret<T, ret, type0, type1, type2, type3, type4, type5>(this->functionPointer);
-             }
-  private:
-    ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5);
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5> class ExecutorLua6ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua6ret(ret (T::*function)(type0, type1, type2, type3, type4, type5))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>(),
+                             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
+                             ExecutorParamType<type4>(), ExecutorParamType<type5>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2),
+                 fromLua<type2>(state, 3),
+                 fromLua<type3>(state, 4),
+                 fromLua<type4>(state, 5),
+                 fromLua<type5>(state, 6) ));
+  }
+
+  /**
+            * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua6ret<T, ret, type0, type1, type2, type3, type4, type5>(this->functionPointer);
+  }
+private:
+  ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5);
 };
 
@@ -652,55 +529,42 @@
 ///////////
 //! Executes a Function with a lua_State* parameter.
-template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5, typename type6> class ExecutorLua7ret : public Executor
-{
-  public:
-    /**
-   * @brief Constructor of a ExecutorXML
-   * @param function a Function to call
-     */
-    ExecutorLua7ret(ret (T::*function)(type0, type1, type2, type3, type4, type5, type6))
-  : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>(),
-             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
-             ExecutorParamType<type4>(), ExecutorParamType<type5>(),
-             ExecutorParamType<type6>())
-             {
-               this->functionPointer = function;
-               this->functorType = Executor_Objective | Executor_NoLoadString;
-             }
-
-    /**
-              * @brief executes the Command on BaseObject
-              * @param object the BaseObject to execute this Executor on
-              * @param loadString ignored in this case
-     */
-             virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-             {
-               PRINTF(1)("no usefull executor\n");
-             }
-
-             virtual void operator()(BaseObject* object, int& count, void* values) const
-             {
-               lua_State* state = (lua_State*)values;
-               count = 1;
-
-               toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
-                   fromLua<type0>(state, 1),
-                   fromLua<type1>(state, 2),
-                   fromLua<type2>(state, 3),
-                   fromLua<type3>(state, 4),
-                   fromLua<type4>(state, 5),
-                   fromLua<type5>(state, 6),
-                   fromLua<type6>(state, 7) ));
-             }
-
-    /**
-              * @returns a _new_ Copy of this Executor
-     */
-             virtual Executor* clone () const
-             {
-               return new ExecutorLua7ret<T, ret, type0, type1, type2, type3, type4, type5, type6>(this->functionPointer);
-             }
-  private:
-    ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5, type6);
+template<class T, typename ret, typename type0, typename type1, typename type2, typename type3, typename type4, typename type5, typename type6> class ExecutorLua7ret : public Executor<lua_State*>
+{
+public:
+  /**
+  * @brief Constructor of a ExecutorXML
+  * @param function a Function to call
+   */
+  ExecutorLua7ret(ret (T::*function)(type0, type1, type2, type3, type4, type5, type6))
+      : Executor<lua_State*>(true, ExecutorParamType<type0>(), ExecutorParamType<type1>(),
+                             ExecutorParamType<type2>(), ExecutorParamType<type3>(),
+                             ExecutorParamType<type4>(), ExecutorParamType<type5>(),
+                             ExecutorParamType<type6>())
+  {
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
+
+  virtual void operator()(BaseObject* object, lua_State*& state) const
+  {
+    toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+                 fromLua<type0>(state, 1),
+                 fromLua<type1>(state, 2),
+                 fromLua<type2>(state, 3),
+                 fromLua<type3>(state, 4),
+                 fromLua<type4>(state, 5),
+                 fromLua<type5>(state, 6),
+                 fromLua<type6>(state, 7) ));
+  }
+
+  /**
+            * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<lua_State*>* clone () const
+  {
+    return new ExecutorLua7ret<T, ret, type0, type1, type2, type3, type4, type5, type6>(this->functionPointer);
+  }
+private:
+  ret           (T::*functionPointer)(type0, type1, type2, type3, type4, type5, type6);
 };
 
Index: /branches/new_class_id/src/lib/util/executor/executor_xml.h
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor_xml.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/executor/executor_xml.h	(revision 9727)
@@ -19,66 +19,53 @@
  * What must be defined is a XML-root to search the ParameterName under an  a Function to call.
  */
-template<class T> class ExecutorXML : public Executor
+template<class T> class ExecutorXML : public Executor<const TiXmlElement*>
 {
-  public:
-    /**
+public:
+  /**
    * @brief Constructor of a ExecutorXML
-     * @param function a Function to call
-     * @param root The XML root to search paramName under
-     * @param paramName the ParameterName the search in root, and lookup the TiXmlElement from
-     */
-    ExecutorXML(void(T::*function)(const TiXmlElement*), const TiXmlElement* root, const char* paramName)
-      : Executor(MT_EXT1)
-    {
-      PRINTF(4)("Loading %s from XML-element %p\n", paramName, root);
+   * @param function a Function to call
+   * @param root The XML root to search paramName under
+   * @param paramName the ParameterName the search in root, and lookup the TiXmlElement from
+   */
+  ExecutorXML(void(T::*function)(const TiXmlElement*), const TiXmlElement* root, const std::string& paramName)
+      : Executor<const TiXmlElement*>(false, MT_EXT1)
+  {
+    PRINTF(4)("Loading %s from XML-element %p\n", paramName.c_str(), root);
 
-      if (likely(root != NULL && paramName != NULL))
-        this->element = root->FirstChildElement(paramName);
-      else
-        this->element = NULL;
+    if (likely(root != NULL))
+      this->element = root->FirstChildElement(paramName);
+    else
+      this->element = NULL;
 
-      this->functionPointer = function;
-      this->functorType = Executor_Objective | Executor_NoLoadString;
-    }
+    this->paramName = paramName;
+    this->functionPointer = function;
+    this->functorType = Executor_Objective;
+  }
 
-    /**
-     * @brief clones an ExecutorXML, used to copy this Element.
-     * @returns a _new_ Copy of this Executor
-     */
-    virtual Executor* clone () const
-    {
-      ExecutorXML<T>* executor = new ExecutorXML<T>();
-      this->cloning(executor);
-      executor->functionPointer = this->functionPointer;
-      executor->element = this->element;
-      return executor;
-    }
+  /**
+   * @brief clones an ExecutorXML, used to copy this Element.
+   * @returns a _new_ Copy of this Executor
+   */
+  virtual Executor<const TiXmlElement*>* clone () const
+  {
+    return new ExecutorXML<T>(functionPointer, element, paramName);
+  }
 
-    /**
-     * @brief executes the Command on BaseObject
-     * @param object the BaseObject to execute this Executor on
-     * @param loadString ignored in this case
-     */
-    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
-    {
-      if (object != NULL && this->element != NULL)
-        (dynamic_cast<T*>(object)->*(functionPointer))(this->element);
-    }
+  /**
+   * @brief executes the Command on BaseObject
+   * @param object the BaseObject to execute this Executor on
+   * @param root ignored in this case
+   */
+  virtual void operator()(BaseObject* object, const TiXmlElement*& element) const
+  {
+    assert (object != NULL);
+    if (this->element != NULL)
+      (dynamic_cast<T*>(object)->*(functionPointer))(this->element);
+  }
 
-    virtual void operator()(BaseObject* object, int& count, void* values) const
-    {
-      PRINTF(1)("missuse of XML-operator, OR IMPLEMENT.\n");
-    }
-
-  private:
-    /**
-   * @brief used for the copy-(Clone)-constructor
-     */
-    ExecutorXML() : Executor() { };
-
-
-  private:
-    void    (T::*functionPointer)(const TiXmlElement*);  //!< The functionPointer to the function to be called
-    const   TiXmlElement* element;                       //!< The XML-element to call.
+private:
+  void    (T::*functionPointer)(const TiXmlElement*);  //!< The functionPointer to the function to be called
+  const   TiXmlElement* element;                       //!< The XML-element to call.
+  std::string           paramName;
 };
 
Index: /branches/new_class_id/src/lib/util/loading/game_loader.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/game_loader.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/util/loading/game_loader.cc	(revision 9727)
@@ -21,4 +21,5 @@
 #include "util/loading/load_param.h"
 
+#include "debug.h"
 #include "shell_command.h"
 #include "campaign.h"
Index: /branches/new_class_id/src/lib/util/loading/load_param.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/load_param.cc	(revision 9726)
+++ /branches/new_class_id/src/lib/util/loading/load_param.cc	(revision 9727)
@@ -18,7 +18,6 @@
 #include "util/loading/load_param.h"
 #include "load_param_description.h"
-
-#include <stdarg.h>
-
+#include "compiler.h"
+#include "debug.h"
 /**
  * Constructs a new LoadParameter
@@ -28,9 +27,7 @@
  * @param executor the Executor, that executes the loading procedure.
  */
-CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor* executor, bool inLoadCycle)
-  :  object(object), paramName(paramName)
-{
-  this->inLoadCycle = inLoadCycle;
-
+LoadParamBase::LoadParamBase(const TiXmlElement* root, const std::string& paramName, BaseObject* object, bool inLoadCycle)
+    :  object(object), paramName(paramName), inLoadCycle(inLoadCycle)
+{
   // determin the LoadString.
   if (likely(!inLoadCycle))
@@ -40,8 +37,28 @@
   else
     this->loadElem = NULL;
-
+}
+
+
+/**
+ * @param descriptionText The text to set as a description for this Parameter
+ * @returns a pointer to itself.
+ */
+void LoadParamBase::describe(const std::string& descriptionText)
+{
+  if (LoadClassDescription::parametersDescription && this->paramDesc && this->paramDesc->getDescription().empty())
+  {
+    this->paramDesc->setDescription(descriptionText);
+  }
+}
+
+
+
+
+CLoadParam::CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const SubString>* executor, bool inLoadCycle)
+    : LoadParamBase(root, paramName, object, inLoadCycle)
+{
+  assert (executor != NULL);
   // set the Executor.
   this->executor = executor;
-
   //if (this->executor)
   //  this->executor->setName(paramName);
@@ -56,18 +73,18 @@
 CLoadParam::~CLoadParam()
 {
-  if (likely(this->executor != NULL))
-  {
-    std::string loadString = "";
-    if (this->loadElem != NULL &&  this->loadElem->ToText())
-      loadString = this->loadElem->Value();
-    if (likely(this->object != NULL) &&
-        ( !loadString.empty() ||
-          ((this->executor->getType() & Executor_NoLoadString) == Executor_NoLoadString)))
+  assert(this->object != NULL);
+
+  std::string loadString;
+  if (this->loadElem != NULL &&  this->loadElem->ToText())
+  {
+    loadString = this->loadElem->Value();
+    if (!loadString.empty())
     {
-      PRINTF(4)("Loading value '%s' with Parameters '%s' onto: %s::%s\n", this->paramName.c_str(), loadString.c_str(), this->object->getClassCName(), this->object->getCName());
+      PRINTF(0)("Loading value '%s' with Parameters '%s' onto: %s::%s\n",
+                this->paramName.c_str(), loadString.c_str(), this->object->getClassCName(), this->object->getCName());
       (*this->executor)(this->object, SubString(loadString, ",", SubString::WhiteSpaces, false, '\\'));
     }
-    delete this->executor;
-  }
+  }
+  delete this->executor;
 }
 
@@ -90,18 +107,4 @@
 }
 
-
-
-/**
- * @param descriptionText The text to set as a description for this Parameter
- * @returns a pointer to itself.
-*/
-CLoadParam& CLoadParam::describe(const std::string& descriptionText)
-{
-  if (LoadClassDescription::parametersDescription && this->paramDesc && this->paramDesc->getDescription().empty())
-  {
-    this->paramDesc->setDescription(descriptionText);
-  }
-  return *this;
-}
 
 // const LoadParamDescription* LoadParamDescription::getClass(const char* className)
Index: /branches/new_class_id/src/lib/util/loading/load_param.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/load_param.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/loading/load_param.h	(revision 9727)
@@ -25,11 +25,9 @@
 
 #include "executor/executor.h"
-#include "executor/executor_xml.h"
+#include "parser/tinyxml/tinyxml.h"
 
 // Forward Declaration //
 class LoadClassDescription;
 class LoadParamDescription;
-class MultiType;
-
 
 /**
@@ -47,11 +45,4 @@
 #define LoadParam_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
          CLoadParam(ROOT, PARAMETER_NAME, OBJECT, createExecutor<CLASS>(&CLASS::FUNCTION), true)
-
-#define LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
-         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), false)
-
-#define LoadParamXML_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
-         CLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), true)
-
 
 /**
@@ -78,33 +69,43 @@
 }
 
+
 /**************************
 **** REAL DECLARATIONS ****
 **************************/
-//! abstract Base class for a Loadable parameter
-class CLoadParam : public BaseObject
+class LoadParamBase : public BaseObject
 {
-  public:
-    CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor* executor, bool inLoadCycle = false);
-    virtual ~CLoadParam();
+protected:
+  LoadParamBase(const TiXmlElement* root, const std::string& paramName, BaseObject* object, bool inLoadCycle = false);
 
-    CLoadParam& describe(const std::string& descriptionText);
-    CLoadParam& defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
-                              const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
-                              const MultiType& value4 = MT_NULL);
-    CLoadParam& attribute(const std::string& attributeName, const Executor& executor);
+protected:
+  void describe(const std::string& descriptionText);
+
+protected:
+  BaseObject*              object;
+  const std::string        paramName;
+  bool                     inLoadCycle;
+
+  LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this CLoadParameter
+  LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
+  const TiXmlElement*      loadElem;             //!< The Element to load.
+};
 
 
-  private:
-    bool                     inLoadCycle;
-    Executor*                executor;
-    BaseObject*              object;
-    const std::string        paramName;
+//! abstract Base class for a Loadable parameter
+class CLoadParam : public LoadParamBase
+{
+public:
+  CLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const SubString>* executor, bool inLoadCycle = false);
+  virtual ~CLoadParam();
 
-    LoadClassDescription*    classDesc;            //!< The LoadClassDescription of this CLoadParameter
-    LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
-    const TiXmlElement*      loadElem;             //!< The Element to load.
-    const void*              pointerToParam;       //!< A Pointer to a Parameter.
+  CLoadParam& defaultValues(const MultiType& value0 = MT_NULL, const MultiType& value1 = MT_NULL,
+                            const MultiType& value2 = MT_NULL, const MultiType& value3 = MT_NULL,
+                            const MultiType& value4 = MT_NULL);
+  CLoadParam& describe(const std::string& descriptionText) { LoadParamBase::describe(descriptionText); return *this; };
+  //     CLoadParam& attribute(const std::string& attributeName, const Executor<SubString>& executor);
 
-    MultiType*               defaultValue;
+
+private:
+  Executor<const SubString>*         executor;
 };
 
Index: /branches/new_class_id/src/lib/util/loading/load_param_description.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/load_param_description.h	(revision 9726)
+++ /branches/new_class_id/src/lib/util/loading/load_param_description.h	(revision 9727)
@@ -57,5 +57,5 @@
 class LoadClassDescription
 {
-  friend class CLoadParam;
+  friend class LoadParamBase;
 public:
   LoadClassDescription(const std::string& className);
Index: /branches/new_class_id/src/lib/util/loading/load_param_xml.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/load_param_xml.cc	(revision 9727)
+++ /branches/new_class_id/src/lib/util/loading/load_param_xml.cc	(revision 9727)
@@ -0,0 +1,35 @@
+/*
+   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
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING
+
+#include "util/loading/load_param_xml.h"
+#include "load_param_description.h"
+
+XmlLoadParam::XmlLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const TiXmlElement*>* executor, bool inLoadCycle )
+    : LoadParamBase(root, paramName, object, inLoadCycle)
+{
+  this->executor = executor;
+}
+
+
+XmlLoadParam::~XmlLoadParam()
+{
+  assert(this->object != NULL);
+
+  (*this->executor)(this->object, this->loadElem);
+
+  delete this->executor;
+}
Index: /branches/new_class_id/src/lib/util/loading/load_param_xml.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/load_param_xml.h	(revision 9727)
+++ /branches/new_class_id/src/lib/util/loading/load_param_xml.h	(revision 9727)
@@ -0,0 +1,45 @@
+/*
+   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
+   co-programmer: ...
+*/
+
+/*!
+ * @file load_param_xml.h
+ * A Class and macro-functions, that makes our lives easy to load-in parameters from XML
+ */
+
+#ifndef _LOAD_PARAM_XML_H
+#define _LOAD_PARAM_XML_H
+
+#include "load_param.h"
+#include "executor/executor_xml.h"
+
+#define LoadParamXML(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
+         XmlLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), false)
+
+#define LoadParamXML_CYCLE(ROOT, PARAMETER_NAME, OBJECT, CLASS, FUNCTION) \
+         XmlLoadParam(ROOT, PARAMETER_NAME, OBJECT, new ExecutorXML<CLASS>(&CLASS::FUNCTION, ROOT, PARAMETER_NAME), true)
+
+class XmlLoadParam : public LoadParamBase
+{
+  public:
+    XmlLoadParam(const TiXmlElement* root, const std::string& paramName, BaseObject* object, Executor<const TiXmlElement*>* executor, bool inLoadCycle = false);
+    virtual ~XmlLoadParam();
+
+    XmlLoadParam& describe(const std::string& descriptionText) { LoadParamBase::describe(descriptionText); return *this; };
+
+  private:
+    Executor<const TiXmlElement*>*    executor;
+};
+
+#endif /* _LOAD_PARAM_XML_H */
Index: /branches/new_class_id/src/story_entities/campaign.cc
===================================================================
--- /branches/new_class_id/src/story_entities/campaign.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/campaign.cc	(revision 9727)
@@ -24,4 +24,5 @@
 
 #include "campaign_data.h"
+#include "debug.h"
 
 
Index: /branches/new_class_id/src/story_entities/campaign_data.cc
===================================================================
--- /branches/new_class_id/src/story_entities/campaign_data.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/campaign_data.cc	(revision 9727)
@@ -18,8 +18,9 @@
 
 #include "util/loading/factory.h"
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 
 #include "story_entity.h"
 
+#include "debug.h"
 
 
Index: /branches/new_class_id/src/story_entities/game_world.cc
===================================================================
--- /branches/new_class_id/src/story_entities/game_world.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/game_world.cc	(revision 9727)
@@ -38,5 +38,5 @@
 
 #include "util/loading/factory.h"
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "loading/fast_factory.h"
 #include "shell_command.h"
@@ -415,5 +415,5 @@
     if (currentFrame - this->lastFrame < .01)
     {
-      SDL_Delay((int)1000.0 * (0.01 - (currentFrame - lastFrame)));
+      SDL_Delay((int)(1000.0 * (0.01 - (currentFrame - lastFrame))));
       currentFrame = Timer::getNow();
     }
Index: /branches/new_class_id/src/story_entities/game_world_data.cc
===================================================================
--- /branches/new_class_id/src/story_entities/game_world_data.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/game_world_data.cc	(revision 9727)
@@ -41,5 +41,5 @@
 #include "util/loading/factory.h"
 #include "loading/fast_factory.h"
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 
 #include "graphics_engine.h"
@@ -193,5 +193,4 @@
 ErrorMessage GameWorldData::loadWorldEntities(const TiXmlElement* root)
 {
-
   const TiXmlElement* element = root->FirstChildElement("WorldEntities");
   bool mouseCaptured = EventHandler::getInstance()->grabbedEvents();
Index: /branches/new_class_id/src/story_entities/single_player_world.cc
===================================================================
--- /branches/new_class_id/src/story_entities/single_player_world.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/single_player_world.cc	(revision 9727)
@@ -20,4 +20,5 @@
 
 #include "state.h"
+#include "debug.h"
 
 #include "util/loading/load_param.h"
Index: /branches/new_class_id/src/story_entities/story_entity.cc
===================================================================
--- /branches/new_class_id/src/story_entities/story_entity.cc	(revision 9726)
+++ /branches/new_class_id/src/story_entities/story_entity.cc	(revision 9727)
@@ -25,5 +25,5 @@
 #include "util/loading/resource_manager.h"
 
-
+#include "debug.h"
 
 ObjectListDefinition(StoryEntity);
@@ -102,4 +102,5 @@
 void StoryEntity::setLoadFile(const std::string& fileName)
 {
+  printf("===Testing %s:: %s\n", this->getCName(), fileName.c_str());
   if (File(fileName).isFile())
   {
Index: /branches/new_class_id/src/util/game_rules.cc
===================================================================
--- /branches/new_class_id/src/util/game_rules.cc	(revision 9726)
+++ /branches/new_class_id/src/util/game_rules.cc	(revision 9727)
@@ -17,5 +17,5 @@
 #include "game_rules.h"
 
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "util/loading/factory.h"
 
Index: /branches/new_class_id/src/world_entities/bsp_entity.cc
===================================================================
--- /branches/new_class_id/src/world_entities/bsp_entity.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/bsp_entity.cc	(revision 9727)
@@ -17,4 +17,6 @@
 #include "util/loading/resource_manager.h"
 #include "util/loading/resource_manager.h"
+
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/npcs/network_turret.cc
===================================================================
--- /branches/new_class_id/src/world_entities/npcs/network_turret.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/npcs/network_turret.cc	(revision 9727)
@@ -30,4 +30,5 @@
 
 #include "weapons/aiming_turret.h"
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/planet.cc
===================================================================
--- /branches/new_class_id/src/world_entities/planet.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/planet.cc	(revision 9727)
@@ -30,5 +30,5 @@
 #include "primitive_model.h"
 
-
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/power_ups/power_up.cc
===================================================================
--- /branches/new_class_id/src/world_entities/power_ups/power_up.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/power_ups/power_up.cc	(revision 9727)
@@ -24,4 +24,5 @@
 #include "util/loading/load_param.h"
 
+#include "debug.h"
 
 ObjectListDefinition(PowerUp);
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 9726)
+++ /branches/new_class_id/src/world_entities/power_ups/weapon_power_up.cc	(revision 9727)
@@ -25,5 +25,5 @@
 #include "util/loading/factory.h"
 #include "util/loading/load_param.h"
-
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/recorder.cc
===================================================================
--- /branches/new_class_id/src/world_entities/recorder.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/recorder.cc	(revision 9727)
@@ -20,5 +20,5 @@
 #include "util/loading/resource_manager.h"
 #include "state.h"
-
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/skybox.cc
===================================================================
--- /branches/new_class_id/src/world_entities/skybox.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/skybox.cc	(revision 9727)
@@ -29,5 +29,5 @@
 #include "util/loading/resource_manager.h"
 
-
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/skydome.cc
===================================================================
--- /branches/new_class_id/src/world_entities/skydome.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/skydome.cc	(revision 9727)
@@ -24,4 +24,6 @@
 #include "converter.h"
 #include "util/loading/resource_manager.h"
+
+#include "debug.h"
 
 #define DTOR (PI/180.0f)
Index: /branches/new_class_id/src/world_entities/terrain.cc
===================================================================
--- /branches/new_class_id/src/world_entities/terrain.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/terrain.cc	(revision 9727)
@@ -32,5 +32,5 @@
 
 #include "state.h"
-
+#include "debug.h"
 
 #include "class_id_DEPRECATED.h"
Index: /branches/new_class_id/src/world_entities/weapons/aiming_system.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/aiming_system.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/weapons/aiming_system.cc	(revision 9727)
@@ -21,10 +21,8 @@
 
 #include "state.h"
+#include "debug.h"
 
 #include "aabb.h"
 #include "obb_tree.h"
-
-#include <vector>
-
 
 
Index: /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/weapons/weapon_manager.cc	(revision 9727)
@@ -25,5 +25,5 @@
 #include "playable.h"
 
-#include "util/loading/load_param.h"
+#include "util/loading/load_param_xml.h"
 #include "util/loading/factory.h"
 
Index: /branches/new_class_id/src/world_entities/world_entity.cc
===================================================================
--- /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9726)
+++ /branches/new_class_id/src/world_entities/world_entity.cc	(revision 9727)
@@ -39,4 +39,5 @@
 #include "game_rules.h"
 #include "kill.h"
+#include "debug.h"
 
 
