Index: code/branches/buildsystem/src/core/ConfigFileManager.cc
===================================================================
--- code/branches/buildsystem/src/core/ConfigFileManager.cc	(revision 2239)
+++ code/branches/buildsystem/src/core/ConfigFileManager.cc	(revision 2278)
@@ -255,7 +255,7 @@
             if (!isEmpty(temp) && !isComment(temp))
             {
-                unsigned int   pos1 = temp.find('[');
+                size_t   pos1 = temp.find('[');
                 if (pos1 == 0) pos1 = line.find('['); else pos1 = std::string::npos;
-                unsigned int   pos2 = line.find(']');
+                size_t   pos2 = line.find(']');
 
                 if (pos1 != std::string::npos && pos2 != std::string::npos && pos2 > pos1 + 1)
@@ -282,12 +282,12 @@
                 else
                 {
-                    unsigned int pos1 = line.find('=');
+                    size_t pos1 = line.find('=');
 
                     if (pos1 != std::string::npos && pos1 > 0)
                     {
                         // New entry
-                        unsigned int pos2 = line.find('[');
-                        unsigned int pos3 = line.find(']');
-                        unsigned int commentposition = getNextCommentPosition(line, pos1 + 1);
+                        size_t pos2 = line.find('[');
+                        size_t pos3 = line.find(']');
+                        size_t commentposition = getNextCommentPosition(line, pos1 + 1);
                         while (isBetweenQuotes(line, commentposition))
                         {
Index: code/branches/buildsystem/src/core/Executor.h
===================================================================
--- code/branches/buildsystem/src/core/Executor.h	(revision 2239)
+++ code/branches/buildsystem/src/core/Executor.h	(revision 2278)
@@ -177,9 +177,9 @@
             inline FunctionType getType() const
                 { return this->functor_->getType(); }
-            inline MultiType getReturnvalue() const
+            inline const MultiType& getReturnvalue() const
                 { return this->functor_->getReturnvalue(); }
-            inline std::string getTypenameParam(unsigned int param) const
+            inline const std::string& getTypenameParam(unsigned int param) const
                 { return this->functor_->getTypenameParam(param); }
-            inline std::string getTypenameReturnvalue() const
+            inline const std::string& getTypenameReturnvalue() const
                 { return this->functor_->getTypenameReturnvalue(); }
 
Index: code/branches/buildsystem/src/core/Functor.h
===================================================================
--- code/branches/buildsystem/src/core/Functor.h	(revision 2239)
+++ code/branches/buildsystem/src/core/Functor.h	(revision 2278)
@@ -34,4 +34,5 @@
 
 #include "util/MultiType.h"
+#include "util/String.h"
 #include "util/Debug.h"
 
@@ -103,8 +104,8 @@
             inline bool hasReturnvalue() const { return this->hasReturnValue_; }
             inline FunctionType getType() const { return this->type_; }
-            inline MultiType getReturnvalue() const { return this->returnedValue_; }
-
-            std::string getTypenameParam(unsigned int param) const { return (param >= 0 && param < 5) ? this->typeParam_[param] : ""; }
-            std::string getTypenameReturnvalue() const { return this->typeReturnvalue_; }
+            inline const MultiType& getReturnvalue() const { return this->returnedValue_; }
+
+            const std::string& getTypenameParam(unsigned int param) const { return (param < 5) ? this->typeParam_[param] : blankString; }
+            const std::string& getTypenameReturnvalue() const { return this->typeReturnvalue_; }
 
             virtual void evaluateParam(unsigned int index, MultiType& param) const = 0;
Index: code/branches/buildsystem/src/core/Namespace.cc
===================================================================
--- code/branches/buildsystem/src/core/Namespace.cc	(revision 2239)
+++ code/branches/buildsystem/src/core/Namespace.cc	(revision 2278)
@@ -63,5 +63,5 @@
 
         std::string name = this->getName();
-        unsigned int pos = 0;
+        size_t pos = 0;
         while ((pos = name.find(',')) != std::string::npos)
             name.replace(pos, 1, " ");
Index: code/branches/buildsystem/src/core/NamespaceNode.cc
===================================================================
--- code/branches/buildsystem/src/core/NamespaceNode.cc	(revision 2239)
+++ code/branches/buildsystem/src/core/NamespaceNode.cc	(revision 2278)
@@ -56,5 +56,5 @@
         else
         {
-            unsigned int pos = name.find("::");
+            size_t pos = name.find("::");
             std::string firstPart = name;
             std::string secondPart;
Index: code/branches/buildsystem/src/core/Script.cc
===================================================================
--- code/branches/buildsystem/src/core/Script.cc	(revision 2239)
+++ code/branches/buildsystem/src/core/Script.cc	(revision 2278)
@@ -134,34 +134,15 @@
   }
 
-  unsigned int Script::getNextQuote(const std::string& text, unsigned int start)
-  {
-    unsigned int quote = start - 1;
-
-    while ((quote = text.find('\"', quote + 1)) != std::string::npos)
-    {
-      unsigned int backslash = quote;
-      unsigned int numbackslashes = 0;
-      for (; backslash > 0; backslash--, numbackslashes++)
-        if (text[backslash - 1] != '\\')
-          break;
-
-      if (numbackslashes % 2 == 0)
-        break;
-    }
-
-    return quote;
-  }
-
   std::string Script::replaceLuaTags(const std::string& text)
   {
     // chreate map with all Lua tags
-    std::map<unsigned int, bool> luaTags;
-    {
-      unsigned int pos = 0;
+    std::map<size_t, bool> luaTags;
+    {
+      size_t pos = 0;
       while ((pos = text.find("<?lua", pos)) != std::string::npos)
         luaTags[pos++] = true;
     }
     {
-      unsigned int pos = 0;
+      size_t pos = 0;
       while ((pos = text.find("?>", pos)) != std::string::npos)
         luaTags[pos++] = false;
@@ -170,8 +151,8 @@
     // erase all tags from the map that are between two quotes
     {
-      std::map<unsigned int, bool>::iterator it = luaTags.begin();
-      std::map<unsigned int, bool>::iterator it2 = it;
+      std::map<size_t, bool>::iterator it = luaTags.begin();
+      std::map<size_t, bool>::iterator it2 = it;
       bool bBetweenQuotes = false;
-      unsigned int pos = 0;
+      size_t pos = 0;
       while ((pos = getNextQuote(text, pos)) != std::string::npos)
       {
@@ -196,5 +177,5 @@
     {
       bool expectedValue = true;
-      for (std::map<unsigned int, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
+      for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
       {
         if (it->second == expectedValue)
@@ -215,8 +196,8 @@
     std::string output;
     {
-      std::map<unsigned int, bool>::iterator it = luaTags.begin();
+      std::map<size_t, bool>::iterator it = luaTags.begin();
       bool bInPrintFunction = true;
-      unsigned int start = 0;
-      unsigned int end = 0;
+      size_t start = 0;
+      size_t end = 0;
 
       do
@@ -234,9 +215,9 @@
           std::string temp = text.substr(start, end - start);
           {
-            unsigned int pos = 0;
+            size_t pos = 0;
             while ((pos = temp.find('[', pos)) != std::string::npos)
             {
               unsigned int tempCounter = 1;
-              unsigned int tempPos = pos++;
+              size_t tempPos = pos++;
               while(temp[++tempPos] == '=') {
                 tempCounter++;
@@ -253,9 +234,9 @@
           }
           {
-            unsigned int pos = 0;
+            size_t pos = 0;
             while ((pos = temp.find(']', pos)) != std::string::npos)
             {
               unsigned int tempCounter = 1;
-              unsigned int tempPos = pos++;
+              size_t tempPos = pos++;
               while(temp[++tempPos] == '=') {
                 tempCounter++;
Index: code/branches/buildsystem/src/core/Script.h
===================================================================
--- code/branches/buildsystem/src/core/Script.h	(revision 2239)
+++ code/branches/buildsystem/src/core/Script.h	(revision 2278)
@@ -75,5 +75,4 @@
     inline void clearLuaOutput() { output_ = ""; }
 
-    unsigned int getNextQuote(const std::string& text, unsigned int start);
     std::string replaceLuaTags(const std::string& text);
 
Index: code/branches/buildsystem/src/core/XMLPort.h
===================================================================
--- code/branches/buildsystem/src/core/XMLPort.h	(revision 2239)
+++ code/branches/buildsystem/src/core/XMLPort.h	(revision 2278)
@@ -83,5 +83,5 @@
 */
 #define XMLPortParamTemplate(classname, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, orxonox::createExecutor(orxonox::createFunctor< __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction), xmlelement, mode)
+    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, classname, this, paramname, orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&classname::savefunction), std::string( #classname ) + "::" + #savefunction), xmlelement, mode)
 
 // --------------------
@@ -105,5 +105,5 @@
 */
 #define XMLPortParamLoadOnlyTemplate(classname, paramname, loadfunction, xmlelement, mode, ...) \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, orxonox::createExecutor(orxonox::createFunctor< __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction), 0, xmlelement, mode)
+    XMLPortParamGeneric(xmlcontainer##loadfunction##0, classname, classname, this, paramname, orxonox::createExecutor(orxonox::createFunctor<classname, __VA_ARGS__ >(&classname::loadfunction), std::string( #classname ) + "::" + #loadfunction), 0, xmlelement, mode)
 
 // ------------------
@@ -135,5 +135,5 @@
 */
 #define XMLPortParamExternTemplate(classname, externclass, object, paramname, loadfunction, savefunction, xmlelement, mode, ...) \
-    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, orxonox::createExecutor(orxonox::createFunctor< __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction), xmlelement, mode);
+    XMLPortParamGeneric(xmlcontainer##loadfunction##savefunction, classname, externclass, object, paramname, orxonox::createExecutor(orxonox::createFunctor<externclass, __VA_ARGS__ >(&externclass::loadfunction), std::string( #externclass ) + "::" + #loadfunction), orxonox::createExecutor(orxonox::createFunctor(&externclass::savefunction), std::string( #externclass ) + "::" + #savefunction), xmlelement, mode);
 
 // -------------------
