Index: code/branches/consolecommands3/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/BaseObject.cc	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/BaseObject.cc	(revision 7200)
@@ -477,6 +477,6 @@
                 if (!container)
                 {
-                    ExecutorMember<BaseObject>* setfunctor = createExecutor(createFunctor(&BaseObject::addEventSource), std::string( "BaseObject" ) + "::" + "addEventSource" + '(' + statename + ')');
-                    ExecutorMember<BaseObject>* getfunctor = createExecutor(createFunctor(&BaseObject::getEventSource), std::string( "BaseObject" ) + "::" + "getEventSource" + '(' + statename + ')');
+                    const ExecutorMemberPtr<BaseObject>& setfunctor = createExecutor(createFunctor(&BaseObject::addEventSource), std::string( "BaseObject" ) + "::" + "addEventSource" + '(' + statename + ')');
+                    const ExecutorMemberPtr<BaseObject>& getfunctor = createExecutor(createFunctor(&BaseObject::getEventSource), std::string( "BaseObject" ) + "::" + "getEventSource" + '(' + statename + ')');
                     setfunctor->setDefaultValue(1, statename);
                     getfunctor->setDefaultValue(1, statename);
Index: code/branches/consolecommands3/src/libraries/core/EventIncludes.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/EventIncludes.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/EventIncludes.h	(revision 7200)
@@ -76,6 +76,8 @@
 
 #define XMLPortEventStateIntern(name, classname, statename, xmlelement, mode) \
-    static orxonox::ExecutorMember<classname>* xmlsetfunctor##name = (orxonox::ExecutorMember<classname>*)&orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')')->setDefaultValue(1, statename); \
-    static orxonox::ExecutorMember<classname>* xmlgetfunctor##name = (orxonox::ExecutorMember<classname>*)&orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')')->setDefaultValue(1, statename); \
+    static orxonox::ExecutorMemberPtr<classname> xmlsetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> >(); \
+    static orxonox::ExecutorMemberPtr<classname> xmlgetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> >(); \
+    xmlsetfunctor##name->setDefaultValue(1, statename); \
+    xmlgetfunctor##name->setDefaultValue(1, statename); \
     XMLPortObjectGeneric(xmlport##name, classname, orxonox::BaseObject, statename, xmlsetfunctor##name, xmlgetfunctor##name, xmlelement, mode, false, true)
 
Index: code/branches/consolecommands3/src/libraries/core/Executor.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/Executor.cc	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/Executor.cc	(revision 7200)
@@ -191,29 +191,23 @@
     }
 
-    Executor& Executor::setDefaultValues(const MultiType& param1)
-    {
-        this->defaultValue_[0] = param1;
-
-        return (*this);
-    }
-
-    Executor& Executor::setDefaultValues(const MultiType& param1, const MultiType& param2)
-    {
-        this->defaultValue_[0] = param1;
-        this->defaultValue_[1] = param2;
-
-        return (*this);
-    }
-
-    Executor& Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3)
+    void Executor::setDefaultValues(const MultiType& param1)
+    {
+        this->defaultValue_[0] = param1;
+    }
+
+    void Executor::setDefaultValues(const MultiType& param1, const MultiType& param2)
+    {
+        this->defaultValue_[0] = param1;
+        this->defaultValue_[1] = param2;
+    }
+
+    void Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3)
     {
         this->defaultValue_[0] = param1;
         this->defaultValue_[1] = param2;
         this->defaultValue_[2] = param3;
-
-        return (*this);
-    }
-
-    Executor& Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4)
+    }
+
+    void Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4)
     {
         this->defaultValue_[0] = param1;
@@ -221,9 +215,7 @@
         this->defaultValue_[2] = param3;
         this->defaultValue_[3] = param4;
-
-        return (*this);
-    }
-
-    Executor& Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
+    }
+
+    void Executor::setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
     {
         this->defaultValue_[0] = param1;
@@ -232,14 +224,10 @@
         this->defaultValue_[3] = param4;
         this->defaultValue_[4] = param5;
-
-        return (*this);
-    }
-
-    Executor& Executor::setDefaultValue(unsigned int index, const MultiType& param)
+    }
+
+    void Executor::setDefaultValue(unsigned int index, const MultiType& param)
     {
         if (index < MAX_FUNCTOR_ARGUMENTS)
             this->defaultValue_[index] = param;
-
-        return (*this);
     }
 
Index: code/branches/consolecommands3/src/libraries/core/Executor.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/Executor.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/Executor.h	(revision 7200)
@@ -81,10 +81,10 @@
                 { return this->name_; }
 
-            Executor& setDefaultValues(const MultiType& param1);
-            Executor& setDefaultValues(const MultiType& param1, const MultiType& param2);
-            Executor& setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3);
-            Executor& setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4);
-            Executor& setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5);
-            Executor& setDefaultValue(unsigned int index, const MultiType& param);
+            void setDefaultValues(const MultiType& param1);
+            void setDefaultValues(const MultiType& param1, const MultiType& param2);
+            void setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3);
+            void setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4);
+            void setDefaultValues(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5);
+            void setDefaultValue(unsigned int index, const MultiType& param);
 
             inline MultiType getDefaultValue(unsigned int index) const
@@ -169,5 +169,5 @@
 
                 this->functorMember_->setObject(object);
-                const MultiType& result = Executor::parse(params, success, delimiter);
+                const MultiType& result = this->Executor::parse(params, success, delimiter);
                 this->functorMember_->setObjects(objects);
 
@@ -180,5 +180,5 @@
 
                 this->functorMember_->setObject(object);
-                const MultiType& result = Executor::parse(params, success, delimiter);
+                const MultiType& result = this->Executor::parse(params, success, delimiter);
                 this->functorMember_->setObjects(objects);
 
@@ -190,5 +190,5 @@
     };
 
-    inline Executor* createExecutor(const FunctorPtr& functor, const std::string& name = "")
+    inline ExecutorPtr createExecutor(const FunctorPtr& functor, const std::string& name = "")
     {
         return new Executor(functor, name);
@@ -196,10 +196,10 @@
 
     template <class T>
-    inline ExecutorMember<T>* createExecutor(const FunctorMemberPtr<T>& functor, const std::string& name = "")
+    inline ExecutorMemberPtr<T> createExecutor(const FunctorMemberPtr<T>& functor, const std::string& name = "")
     {
         return new ExecutorMember<T>(functor, name);
     }
 
-    inline ExecutorStatic* createExecutor(const FunctorStaticPtr& functor, const std::string& name = "")
+    inline ExecutorStaticPtr createExecutor(const FunctorStaticPtr& functor, const std::string& name = "")
     {
         return new ExecutorStatic(functor, name);
Index: code/branches/consolecommands3/src/libraries/core/Thread.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/Thread.cc	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/Thread.cc	(revision 7200)
@@ -75,5 +75,5 @@
     }
 
-    bool Thread::evaluateExecutor( Executor* executor )
+    bool Thread::evaluateExecutor( const ExecutorPtr& executor )
     {
         this->isWorkingMutex_->lock();
@@ -92,5 +92,5 @@
         {
             //this->executorMutex_->lock();
-            Executor* executor = this->executor_;
+            ExecutorPtr executor = this->executor_;
             //this->executorMutex_->unlock();
             if( executor )
@@ -98,5 +98,4 @@
                 (*executor)();
                 this->executorMutex_->lock();
-                delete this->executor_;
                 this->executor_ = 0;
                 this->executorMutex_->unlock();
Index: code/branches/consolecommands3/src/libraries/core/Thread.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/Thread.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/Thread.h	(revision 7200)
@@ -46,15 +46,15 @@
         bool isWorking();
         void waitUntilFinished();
-        bool evaluateExecutor( Executor* executor );
+        bool evaluateExecutor( const ExecutorPtr& executor );
 
     private:
         void            threadLoop();
 
-        Executor*       executor_;
+        ExecutorPtr     executor_;
         bool            isWorking_;
         bool            stopThread_;
         boost::thread*  workerThread_;
         boost::mutex*   executorMutex_;
-        boost::mutex*     isWorkingMutex_;
+        boost::mutex*   isWorkingMutex_;
         boost::mutex*   stopThreadMutex_;
     };
Index: code/branches/consolecommands3/src/libraries/core/ThreadPool.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/ThreadPool.cc	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/ThreadPool.cc	(revision 7200)
@@ -81,5 +81,5 @@
     }
 
-    bool ThreadPool::passFunction( Executor* executor, bool addThread )
+    bool ThreadPool::passFunction( const ExecutorPtr& executor, bool addThread )
     {
         std::vector<Thread*>::iterator it;
Index: code/branches/consolecommands3/src/libraries/core/ThreadPool.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/ThreadPool.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/ThreadPool.h	(revision 7200)
@@ -46,5 +46,5 @@
         unsigned int setNrOfThreads( unsigned int nr );
 
-        bool passFunction( Executor* executor, bool addThread=false );
+        bool passFunction( const ExecutorPtr& executor, bool addThread=false );
         void synchronise();
 
Index: code/branches/consolecommands3/src/libraries/core/XMLPort.h
===================================================================
--- code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7200)
@@ -75,6 +75,6 @@
 */
 #define XMLPortParam(classname, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
 
@@ -94,6 +94,6 @@
 #define XMLPortParamVariable(classname, paramname, variable, xmlelement, mode) \
     XMLPortVariableHelperClass xmlcontainer##variable##dummy(static_cast<void*>(&variable)); \
-    static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##loadexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader")); \
-    static ExecutorMember<orxonox::XMLPortVariableHelperClass>* xmlcontainer##variable##saveexecutor = static_cast<ExecutorMember<orxonox::XMLPortVariableHelperClass>*>(orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getSaver (variable)), std::string( #classname ) + "::" + #variable + "saver" )); \
+    static ExecutorMemberPtr<orxonox::XMLPortVariableHelperClass> xmlcontainer##variable##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getLoader(variable)), std::string( #classname ) + "::" + #variable + "loader"); \
+    static ExecutorMemberPtr<orxonox::XMLPortVariableHelperClass> xmlcontainer##variable##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(orxonox::XMLPortVariableHelperClass::getSaver (variable)), std::string( #classname ) + "::" + #variable + "saver" ); \
     XMLPortParamGeneric(xmlcontainer##variable, classname, orxonox::XMLPortVariableHelperClass, &xmlcontainer##variable##dummy, paramname, xmlcontainer##variable##loadexecutor, xmlcontainer##variable##saveexecutor, xmlelement, mode)
 
@@ -110,6 +110,6 @@
 */
 #define XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode)
 
@@ -129,5 +129,5 @@
 */
 #define XMLPortParamLoadOnly(classname, paramname, loadfunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
 /**
@@ -135,5 +135,5 @@
 */
 #define XMLPortParamLoadOnlyTemplate(classname, paramname, loadfunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##0##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, xmlcontainer##loadfunction##0##loadexecutor, 0, xmlelement, mode)
 
@@ -161,6 +161,6 @@
 */
 #define XMLPortParamExtern(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
 /**
@@ -168,6 +168,6 @@
 */
 #define XMLPortParamExternTemplate(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<externclass, __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
-    static ExecutorMember<externclass>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<externclass, __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<externclass> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction); \
     XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode);
 
@@ -249,6 +249,6 @@
 */
 #define XMLPortObjectExtended(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
 /**
@@ -256,6 +256,6 @@
 */
 #define XMLPortObjectExtendedTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, bApplyLoaderMask, bLoadBefore, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, bApplyLoaderMask, bLoadBefore)
 
@@ -267,6 +267,6 @@
 */
 #define XMLPortObject(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
 /**
@@ -274,6 +274,6 @@
 */
 #define XMLPortObjectTemplate(classname, objectclass, sectionname, loadfunction, savefunction, xmlelement, mode, ...) \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
-    static ExecutorMember<classname>* xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##loadexecutor = orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction); \
+    static ExecutorMemberPtr<classname> xmlcontainer##loadfunction##savefunction##saveexecutor = orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction); \
     XMLPortObjectGeneric(xmlcontainer##loadfunction##savefunction, classname, objectclass, sectionname, xmlcontainer##loadfunction##savefunction##loadexecutor, xmlcontainer##loadfunction##savefunction##saveexecutor, xmlelement, mode, false, true)
 
@@ -348,5 +348,5 @@
 
         public:
-            XMLPortClassParamContainer(const std::string& paramname, Identifier* identifier, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor)
+            XMLPortClassParamContainer(const std::string& paramname, Identifier* identifier, const ExecutorMemberPtr<T>& loadexecutor, const ExecutorMemberPtr<T>& saveexecutor)
             {
                 this->paramname_ = paramname;
@@ -358,8 +358,4 @@
             ~XMLPortClassParamContainer()
             {
-                assert(this->loadexecutor_);
-                delete this->loadexecutor_;
-                if (this->saveexecutor_)
-                    delete this->saveexecutor_;
             }
 
@@ -479,6 +475,6 @@
 
         private:
-            ExecutorMember<T>* loadexecutor_;
-            ExecutorMember<T>* saveexecutor_;
+            ExecutorMemberPtr<T> loadexecutor_;
+            ExecutorMemberPtr<T> saveexecutor_;
             ParseParams parseParams_;
     };
@@ -522,5 +518,5 @@
     {
         public:
-            XMLPortClassObjectContainer(const std::string& sectionname, Identifier* identifier, ExecutorMember<T>* loadexecutor, ExecutorMember<T>* saveexecutor, bool bApplyLoaderMask, bool bLoadBefore)
+            XMLPortClassObjectContainer(const std::string& sectionname, Identifier* identifier, const ExecutorMemberPtr<T>& loadexecutor, const ExecutorMemberPtr<T>& saveexecutor, bool bApplyLoaderMask, bool bLoadBefore)
             {
                 this->sectionname_ = sectionname;
@@ -536,8 +532,4 @@
             ~XMLPortClassObjectContainer()
             {
-                assert(this->loadexecutor_);
-                delete this->loadexecutor_;
-                if (this->saveexecutor_)
-                    delete this->saveexecutor_;
             }
 
@@ -553,6 +545,6 @@
 
         private:
-            ExecutorMember<T>* loadexecutor_;
-            ExecutorMember<T>* saveexecutor_;
+            ExecutorMemberPtr<T> loadexecutor_;
+            ExecutorMemberPtr<T> saveexecutor_;
     };
 
Index: code/branches/consolecommands3/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/tools/Timer.cc	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/tools/Timer.cc	(revision 7200)
@@ -54,5 +54,5 @@
         delaytimerset.insert(delaytimer);
 
-        ExecutorStatic* delayexecutor = createExecutor(createFunctor(&executeDelayedCommand));
+        const ExecutorStaticPtr& delayexecutor = createExecutor(createFunctor(&executeDelayedCommand));
         delayexecutor->setDefaultValues(delaytimer, command);
         delaytimer->setTimer(delay, false, delayexecutor);
@@ -97,5 +97,5 @@
         @param exeuctor A executor of the function to call
     */
-    Timer::Timer(float interval, bool bLoop, Executor* executor, bool bKillAfterCall)
+    Timer::Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall)
     {
         this->init();
@@ -103,12 +103,4 @@
 
         this->setTimer(interval, bLoop, executor, bKillAfterCall);
-    }
-
-    /**
-        @brief Deletes the executor.
-    */
-    Timer::~Timer()
-    {
-        this->deleteExecutor();
     }
 
@@ -138,13 +130,4 @@
         if (temp)
             this->destroy();
-    }
-
-    /**
-        @brief Deletes the executor.
-    */
-    void Timer::deleteExecutor()
-    {
-      if (this->executor_)
-          delete this->executor_;
     }
 
Index: code/branches/consolecommands3/src/libraries/tools/Timer.h
===================================================================
--- code/branches/consolecommands3/src/libraries/tools/Timer.h	(revision 7199)
+++ code/branches/consolecommands3/src/libraries/tools/Timer.h	(revision 7200)
@@ -78,7 +78,6 @@
         public:
             Timer();
-            ~Timer();
 
-            Timer(float interval, bool bLoop, Executor* executor, bool bKillAfterCall = false);
+            Timer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false);
 
             /**
@@ -89,8 +88,6 @@
                 @param executor A executor of the function to call
             */
-            void setTimer(float interval, bool bLoop, Executor* executor, bool bKillAfterCall = false)
+            void setTimer(float interval, bool bLoop, const ExecutorPtr& executor, bool bKillAfterCall = false)
             {
-                this->deleteExecutor();
-
                 this->setInterval(interval);
                 this->bLoop_ = bLoop;
@@ -103,5 +100,4 @@
 
             void run();
-            void deleteExecutor();
 
             /** @brief Starts the Timer: Function-call after 'interval' seconds. */
@@ -141,12 +137,12 @@
             void init();
 
-            Executor* executor_;  //!< The executor of the function that should be called when the time expires
+            ExecutorPtr executor_;  //!< The executor of the function that should be called when the time expires
 
-            long long interval_;  //!< The time-interval in micro seconds
-            bool bLoop_;          //!< If true, the function gets called every 'interval' seconds
-            bool bActive_;        //!< If true, the Timer ticks and calls the function if the time's up
-            bool bKillAfterCall_; //!< If true the timer gets deleted after it called the function
+            long long interval_;    //!< The time-interval in micro seconds
+            bool bLoop_;            //!< If true, the function gets called every 'interval' seconds
+            bool bActive_;          //!< If true, the Timer ticks and calls the function if the time's up
+            bool bKillAfterCall_;   //!< If true the timer gets deleted after it called the function
 
-            long long time_;      //!< Internal variable, counting the time till the next function-call
+            long long time_;        //!< Internal variable, counting the time till the next function-call
     };
 }
