Index: code/trunk/src/libraries/util/Clipboard.cc
===================================================================
--- code/trunk/src/libraries/util/Clipboard.cc	(revision 6105)
+++ code/trunk/src/libraries/util/Clipboard.cc	(revision 6417)
@@ -78,5 +78,5 @@
         {
             COUT(1) << "Error: Unable to copy the following text to the clipboard:" << std::endl;
-            COUT(1) << "       \"" << text << "\"" << std::endl;
+            COUT(1) << "       \"" << text << '"' << std::endl;
         }
         return false;
@@ -96,5 +96,5 @@
                 if (hData == NULL)
                     return "";
-                std::string output = static_cast<char*>(GlobalLock(hData));
+                std::string output(static_cast<char*>(GlobalLock(hData)));
                 GlobalUnlock(hData);
                 CloseClipboard();
@@ -119,5 +119,5 @@
 namespace orxonox
 {
-    static std::string clipboard = ""; //!< Keeps the text of our internal clipboard
+    static std::string clipboard; //!< Keeps the text of our internal clipboard
 
     /**
Index: code/trunk/src/libraries/util/Clock.cc
===================================================================
--- code/trunk/src/libraries/util/Clock.cc	(revision 6105)
+++ code/trunk/src/libraries/util/Clock.cc	(revision 6417)
@@ -34,9 +34,7 @@
     Clock::Clock()
         : timer_(new Ogre::Timer())
-        , storedTime_(0)
         , tickTime_(0)
         , tickDt_(0)
         , tickDtFloat_(0.0f)
-        , lastTimersTime_(0)
     {
     }
@@ -46,28 +44,24 @@
         delete timer_;
     }
-    
+
+    /**
+    @remarks
+        Mind the types! Ogre::Timer::getMicroseconds() will return an unsigned
+        long, which will eventually overflow. But if you use the subtraction of
+        the current time minus the last time the timer gave us and sum these up to
+        a 64 bit integer, we get the desired result.
+        Also mind that we don't have to store the last timer's time as unsigned long
+        as well because (unsigned long)tickTime_ will do exactly that.
+    */
     void Clock::capture()
     {
-        unsigned long timersTime = timer_->getMicroseconds();
-        tickTime_ = storedTime_ + timersTime;
-        tickDt_ = timersTime - lastTimersTime_;
+        tickDt_ = timer_->getMicroseconds() - (unsigned long)tickTime_;
+        tickTime_ += tickDt_;
         tickDtFloat_ = static_cast<float>(tickDt_) / 1000000.0f;
-
-        if (timersTime > 0xFFFFFFFF/4)
-        {
-            // Ogre timer will overflow at 2^32 microseconds if unsigned long is 32 bit
-            storedTime_ += timersTime;
-            lastTimersTime_ = 0;
-            timer_->reset();
-        }
-        else
-        {
-            lastTimersTime_ = timersTime;
-        }
     }
 
     unsigned long long Clock::getRealMicroseconds() const
     {
-        return this->timer_->getMicroseconds() + this->storedTime_;
+        return tickTime_ + (timer_->getMicroseconds() - (unsigned long)tickTime_);
     }
 }
Index: code/trunk/src/libraries/util/Clock.h
===================================================================
--- code/trunk/src/libraries/util/Clock.h	(revision 6105)
+++ code/trunk/src/libraries/util/Clock.h	(revision 6417)
@@ -57,9 +57,7 @@
 
         Ogre::Timer*       timer_;
-        unsigned long long storedTime_;
         unsigned long long tickTime_;
         long               tickDt_;
         float              tickDtFloat_;
-        unsigned long      lastTimersTime_;
     };
 }
Index: code/trunk/src/libraries/util/Convert.h
===================================================================
--- code/trunk/src/libraries/util/Convert.h	(revision 6105)
+++ code/trunk/src/libraries/util/Convert.h	(revision 6417)
@@ -43,5 +43,4 @@
 
 #include "Debug.h"
-#include "StringUtils.h"
 #include "TemplateUtils.h"
 
@@ -336,5 +335,5 @@
         FORCEINLINE static bool convert(std::string* output, const char input)
         {
-            *output = std::string(1, input);
+            *output = input;
             return true;
         }
@@ -345,5 +344,5 @@
         FORCEINLINE static bool convert(std::string* output, const unsigned char input)
         {
-            *output = std::string(1, input);
+            *output = input;
             return true;
         }
@@ -352,7 +351,7 @@
     struct ConverterExplicit<std::string, char>
     {
-        FORCEINLINE static bool convert(char* output, const std::string input)
-        {
-            if (input != "")
+        FORCEINLINE static bool convert(char* output, const std::string& input)
+        {
+            if (!input.empty())
                 *output = input[0];
             else
@@ -364,7 +363,7 @@
     struct ConverterExplicit<std::string, unsigned char>
     {
-        FORCEINLINE static bool convert(unsigned char* output, const std::string input)
-        {
-            if (input != "")
+        FORCEINLINE static bool convert(unsigned char* output, const std::string& input)
+        {
+            if (!input.empty())
                 *output = input[0];
             else
@@ -389,4 +388,8 @@
     };
 
+    // Declarations to avoid StringUtils.h include
+    _UtilExport std::string removeTrailingWhitespaces(const std::string& str);
+    _UtilExport std::string getLowercase(const std::string& str);
+
     // std::string to bool
     template <>
@@ -395,14 +398,14 @@
         static bool convert(bool* output, const std::string& input)
         {
-            std::string stripped = getLowercase(removeTrailingWhitespaces(input));
+            const std::string& stripped = getLowercase(removeTrailingWhitespaces(input));
             if (stripped == "true" || stripped == "on" || stripped == "yes")
             {
-              *output = true;
-              return true;
+                *output = true;
+                return true;
             }
             else if (stripped == "false" || stripped == "off" || stripped == "no")
             {
-              *output = false;
-              return true;
+                *output = false;
+                return true;
             }
 
Index: code/trunk/src/libraries/util/Debug.h
===================================================================
--- code/trunk/src/libraries/util/Debug.h	(revision 6105)
+++ code/trunk/src/libraries/util/Debug.h	(revision 6417)
@@ -71,6 +71,19 @@
     using std::endl;
 
-    //! Adjust to discard certain output with level > hardDebugLevel at compile time
+    // Adjust this to discard certain output with level > hardDebugLevel at compile time already
+#ifdef ORXONOX_RELEASE
+    const int hardDebugLevel = OutputLevel::Verbose
+#elif defined(NDEBUG)
     const int hardDebugLevel = OutputLevel::Verbose;
+#else
+    //! Maximum level for debug output that should be even processed at run time
+    const int hardDebugLevel = OutputLevel::Ultra;
+#endif
+
+    //! This function simply returns 0 and helps to suppress the "statement has no effect" compiler warning
+    inline int debugDummyFunction()
+    {
+        return 0;
+    }
 }
 
@@ -79,4 +92,8 @@
     Logs text output: use exactly like std::cout, but specify an output
     level as argument.
+@details
+    (a > b ? 0 : c << "text") is equivalent to (a > b ? 0 : (c << "text"))
+    where (a > b ? 0 : ) stands for COUT(x). This should explain how
+    this macro magic can possibly even work ;)
 @example
     COUT(3) << "Some info" << std::endl;
@@ -88,8 +105,8 @@
 #define COUT(level)                                                    \
     /*if*/ (level > orxonox::hardDebugLevel) ?                         \
-        0                                                              \
+        orxonox::debugDummyFunction()                                  \
     /*else*/ :                                                         \
         /*if*/ (level > orxonox::OutputHandler::getSoftDebugLevel()) ? \
-            0                                                          \
+            orxonox::debugDummyFunction()                              \
         /*else*/ :                                                     \
             orxonox::OutputHandler::getOutStream(level)
Index: code/trunk/src/libraries/util/DisplayStringConversions.h
===================================================================
--- code/trunk/src/libraries/util/DisplayStringConversions.h	(revision 6417)
+++ code/trunk/src/libraries/util/DisplayStringConversions.h	(revision 6417)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   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
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ */
+
+/**
+@file
+@brief
+    std::sring to Ogre::UTFString conversion functions
+*/
+
+#ifndef _DisplayStringConversions_H__
+#define _DisplayStringConversions_H__
+
+#include "UtilPrereqs.h"
+#include <OgreOverlayElement.h>
+
+#if OGRE_UNICODE_SUPPORT
+    #include <OgreUTFString.h>
+
+    namespace orxonox
+    {
+        template <>
+        struct ConverterExplicit<std::string, Ogre::DisplayString>
+        {
+            //! Converts an std::string into an Ogre::UTFString
+            inline static bool convert(Ogre::DisplayString* output, const std::string& input)
+            {
+                Ogre::UTFString::code_point cp;
+                for (unsigned int i = 0; i < input.size(); ++i)
+                {
+                  cp = input[i];
+                  cp &= 0xFF;
+                  output->append(1, cp);
+                }
+                return true;
+            }
+        };
+    }
+#else
+    namespace orxonox
+    {
+        template <>
+        struct ConverterExplicit<std::string, Ogre::DisplayString>
+        {
+            //! Converts an std::string into an Ogre::String
+            inline static bool convert(Ogre::DisplayString* output, const std::string& input)
+            {
+                *output = input;
+                return true;
+            }
+        };
+    }
+#endif
+
+#endif /* _DisplayStringConversions_H__ */
Index: code/trunk/src/libraries/util/Exception.cc
===================================================================
--- code/trunk/src/libraries/util/Exception.cc	(revision 6105)
+++ code/trunk/src/libraries/util/Exception.cc	(revision 6417)
@@ -49,6 +49,4 @@
         : description_(description)
         , lineNumber_(0)
-        , functionName_("")
-        , filename_("")
     { }
 
@@ -61,5 +59,5 @@
     const std::string& Exception::getFullDescription() const
     {
-        if (fullDescription_ == "")
+        if (fullDescription_.empty())
         {
             std::ostringstream fullDesc;
@@ -67,21 +65,21 @@
             fullDesc << this->getTypeName() << "Exception";
 
-            if (this->filename_ != "")
+            if (!this->filename_.empty())
             {
                 fullDesc << " in " << this->filename_;
                 if (this->lineNumber_)
-                    fullDesc << "(" << this->lineNumber_ << ")";
+                    fullDesc << '(' << this->lineNumber_ << ')';
             }
 
-            if (this->functionName_ != "")
-                fullDesc << " in function '" << this->functionName_ << "'";
+            if (!this->functionName_.empty())
+                fullDesc << " in function '" << this->functionName_ << '\'';
 
             fullDesc << ": ";
-            if (this->description_ != "")
+            if (!this->description_.empty())
                 fullDesc << this->description_;
             else
                 fullDesc << "No description available.";
 
-            this->fullDescription_ = std::string(fullDesc.str());
+            this->fullDescription_ = fullDesc.str();
         }
 
Index: code/trunk/src/libraries/util/Exception.h
===================================================================
--- code/trunk/src/libraries/util/Exception.h	(revision 6105)
+++ code/trunk/src/libraries/util/Exception.h	(revision 6417)
@@ -131,4 +131,5 @@
     CREATE_ORXONOX_EXCEPTION(PluginsNotFound);
     CREATE_ORXONOX_EXCEPTION(InitialisationFailed);
+    CREATE_ORXONOX_EXCEPTION(InitialisationAborted);
     CREATE_ORXONOX_EXCEPTION(NotImplemented);
     CREATE_ORXONOX_EXCEPTION(GameState);
Index: code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- code/trunk/src/libraries/util/ExprParser.cc	(revision 6105)
+++ code/trunk/src/libraries/util/ExprParser.cc	(revision 6417)
@@ -47,7 +47,18 @@
 namespace orxonox
 {
-    ExprParser::ExprParser(const std::string& str)
+    ExprParser::ExprParser()
     {
         this->failed_ = false;
+        this->variables_["pi"] = 3.1415926535897932;
+        this->variables_["e"] = 2.7182818284590452;
+    }
+
+    void ExprParser::setVariable(const std::string& varname, double value)
+    {
+        this->variables_[varname] = value;
+    }
+
+    void ExprParser::parse(const std::string& str)
+    {
         this->reading_stream = str.c_str();
         if (str.size() == 0 || *reading_stream == '\0')
@@ -343,10 +354,8 @@
             else
             {
-#define SWITCH word
-                CASE_1("pi")
-                    value = 3.1415926535897932;
-                CASE("e")
-                    value = 2.7182818284590452;
-                CASE_ELSE
+                std::map<std::string, double>::const_iterator it = this->variables_.find(word);
+                if (it != this->variables_.end())
+                    value = it->second;
+                else
                 {
                     this->failed_ = true;
@@ -358,5 +367,5 @@
         }
         else if (*reading_stream == 40)
-        {  // expresion in paranthesis
+        {  // expression in parenthesis
             ++reading_stream;
             value = parse_last_argument();
Index: code/trunk/src/libraries/util/ExprParser.h
===================================================================
--- code/trunk/src/libraries/util/ExprParser.h	(revision 6105)
+++ code/trunk/src/libraries/util/ExprParser.h	(revision 6417)
@@ -36,4 +36,6 @@
 
 #include "UtilPrereqs.h"
+
+#include <map>
 #include <string>
 
@@ -71,8 +73,11 @@
 
 
-        ExprParser(const std::string& str);
+        ExprParser();
+        void parse(const std::string& str);
         const std::string& getRemains() { return  this->remains_; }
         double             getResult()  { return  this->result_; }
         bool               getSuccess() { return !this->failed_; }
+
+        void setVariable(const std::string& varname, double value);
 
     private:
@@ -97,5 +102,5 @@
         double result_;
         std::string remains_;
-
+        std::map<std::string, double> variables_;
     };
 
Index: code/trunk/src/libraries/util/Math.cc
===================================================================
--- code/trunk/src/libraries/util/Math.cc	(revision 6105)
+++ code/trunk/src/libraries/util/Math.cc	(revision 6417)
@@ -43,4 +43,5 @@
 namespace orxonox
 {
+#if OGRE_VERSION < 0x010603
     /**
         @brief Function for writing a Radian to a stream.
@@ -51,4 +52,14 @@
         return out;
     }
+
+    /**
+        @brief Function for writing a Degree to a stream.
+    */
+    std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree)
+    {
+        out << degree.valueDegrees();
+        return out;
+    }
+#endif
 
     /**
@@ -61,13 +72,4 @@
         radian = temp;
         return in;
-    }
-
-    /**
-        @brief Function for writing a Degree to a stream.
-    */
-    std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree)
-    {
-        out << degree.valueDegrees();
-        return out;
     }
 
@@ -136,8 +138,8 @@
                 return orxonox::Vector2(0, 1);
         }
-        
+
         float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1);
         float sin_value = sqrt( 1 - cos_value*cos_value );
-        
+
         if ((mydirection.crossProduct(myorthonormal)).dotProduct(distance) > 0)
             return orxonox::Vector2( sin_value, cos_value );
@@ -177,5 +179,5 @@
         }
         //float angle = acos(clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1));
-        
+
         float cos_value = clamp<float>(myorthonormal.dotProduct(projection) / projectionlength, -1, 1);
         float sin_value = sqrt( 1 - cos_value*cos_value );
Index: code/trunk/src/libraries/util/Math.h
===================================================================
--- code/trunk/src/libraries/util/Math.h	(revision 6105)
+++ code/trunk/src/libraries/util/Math.h	(revision 6417)
@@ -59,7 +59,9 @@
 namespace orxonox
 {
+#if OGRE_VERSION < 0x010603
     _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
+    _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree);
+#endif
     _UtilExport std::istream& operator>>(std::istream& in, orxonox::Radian& radian);
-    _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Degree& degree);
     _UtilExport std::istream& operator>>(std::istream& in, orxonox::Degree& degree);
 
@@ -163,5 +165,5 @@
     template <> inline bool                 zeroise<bool>()                 { return 0; }
     template <> inline void*                zeroise<void*>()                { return 0; }
-    template <> inline std::string          zeroise<std::string>()          { return ""; }
+    template <> inline std::string          zeroise<std::string>()          { return std::string(); }
     template <> inline orxonox::Radian      zeroise<orxonox::Radian>()      { return orxonox::Radian(0.0f); }
     template <> inline orxonox::Degree      zeroise<orxonox::Degree>()      { return orxonox::Degree(0.0f); }
Index: code/trunk/src/libraries/util/MathConvert.h
===================================================================
--- code/trunk/src/libraries/util/MathConvert.h	(revision 6105)
+++ code/trunk/src/libraries/util/MathConvert.h	(revision 6417)
@@ -53,5 +53,5 @@
         {
             std::ostringstream ostream;
-            if (ostream << input.x << "," << input.y)
+            if (ostream << input.x << ',' << input.y)
             {
                 (*output) = ostream.str();
@@ -69,5 +69,5 @@
         {
             std::ostringstream ostream;
-            if (ostream << input.x << "," << input.y << "," << input.z)
+            if (ostream << input.x << ',' << input.y << ',' << input.z)
             {
                 (*output) = ostream.str();
@@ -85,5 +85,5 @@
         {
             std::ostringstream ostream;
-            if (ostream << input.x << "," << input.y << "," << input.z << "," << input.w)
+            if (ostream << input.x << ',' << input.y << ',' << input.z << ',' << input.w)
             {
                 (*output) = ostream.str();
@@ -101,5 +101,5 @@
         {
             std::ostringstream ostream;
-            if (ostream << input.w << "," << input.x << "," << input.y << "," << input.z)
+            if (ostream << input.w << ',' << input.x << ',' << input.y << ',' << input.z)
             {
                 (*output) = ostream.str();
@@ -117,5 +117,5 @@
         {
             std::ostringstream ostream;
-            if (ostream << input.r << "," << input.g << "," << input.b << "," << input.a)
+            if (ostream << input.r << ',' << input.g << ',' << input.b << ',' << input.a)
             {
                 (*output) = ostream.str();
Index: code/trunk/src/libraries/util/MultiType.h
===================================================================
--- code/trunk/src/libraries/util/MultiType.h	(revision 6105)
+++ code/trunk/src/libraries/util/MultiType.h	(revision 6417)
@@ -232,5 +232,5 @@
 
             virtual void toString(std::ostream& outstream) const = 0;
-            
+
             virtual void importData( uint8_t*& mem )=0;
             virtual void exportData( uint8_t*& mem ) const=0;
@@ -339,5 +339,5 @@
             template <typename T> inline bool isType()                    const { return false; } // Only works for specialized values - see below
             std::string                       getTypename()               const;
-            
+
             /** @brief Saves the value of the MT to a bytestream (pointed at by mem) and increases mem pointer by size of MT */
             inline void                       exportData(uint8_t*& mem) const { assert(sizeof(MT_Type::Value)<=8); *static_cast<uint8_t*>(mem) = this->getType(); mem+=sizeof(uint8_t); this->value_->exportData(mem); }
Index: code/trunk/src/libraries/util/MultiTypeValue.h
===================================================================
--- code/trunk/src/libraries/util/MultiTypeValue.h	(revision 6105)
+++ code/trunk/src/libraries/util/MultiTypeValue.h	(revision 6417)
@@ -150,5 +150,5 @@
         /** @brief Puts the current value on the stream */
         inline void toString(std::ostream& outstream) const { outstream << this->value_; }
-        
+
         /** @brief loads data from the bytestream (mem) into the MT and increases the bytestream pointer by the size of the data */
         inline void importData( uint8_t*& mem )         { loadAndIncrease( /*(const T&)*/this->value_, mem ); }
@@ -160,5 +160,5 @@
         T value_; //!< The stored value
     };
-    
+
     // Import / Export specialisation
     // ColourValue
Index: code/trunk/src/libraries/util/OutputHandler.cc
===================================================================
--- code/trunk/src/libraries/util/OutputHandler.cc	(revision 6105)
+++ code/trunk/src/libraries/util/OutputHandler.cc	(revision 6417)
@@ -39,4 +39,5 @@
 #include <cstdlib>
 #include <fstream>
+#include <iostream>
 #include <sstream>
 
@@ -76,5 +77,5 @@
 #ifdef ORXONOX_PLATFORM_WINDOWS
             char* pTempDir = getenv("TEMP");
-            this->logFilename_ = std::string(pTempDir) + "/" + logFileBaseName_g;
+            this->logFilename_ = std::string(pTempDir) + '/' + logFileBaseName_g;
 #else
             this->logFilename_ = std::string("/tmp/") + logFileBaseName_g;
@@ -174,8 +175,11 @@
         void outputChanged(int level)
         {
-            // Read ostringstream and store it
-            this->output_.push_back(std::make_pair(level, this->buffer_.str()));
-            // Clear content and flags
-            this->buffer_.str(std::string());
+            if (!this->buffer_.str().empty())
+            {
+                // Read ostringstream and store it
+                this->output_.push_back(std::make_pair(level, this->buffer_.str()));
+                // Clear content and flags
+                this->buffer_.str(std::string());
+            }
             this->buffer_.clear();
         }
@@ -214,5 +218,5 @@
         this->registerOutputListener(this->consoleWriter_);
 
-        this->output_  = new MemoryLogWriter();
+        this->output_ = new MemoryLogWriter();
         // We capture as much input as the listener with the highest level
         this->output_->softDebugLevel_ = getSoftDebugLevel();
@@ -224,4 +228,5 @@
     {
         delete this->logFile_;
+        delete this->consoleWriter_;
         delete this->output_;
     }
Index: code/trunk/src/libraries/util/Serialise.h
===================================================================
--- code/trunk/src/libraries/util/Serialise.h	(revision 6105)
+++ code/trunk/src/libraries/util/Serialise.h	(revision 6417)
@@ -37,17 +37,16 @@
 #include <cstring>
 #include "util/Math.h"
+#include "util/mbool.h"
 
 namespace orxonox{
-    
-// general template declaration
-    
+
     /** @brief returns the size of the variable in a datastream */
-    template <class T> inline uint32_t returnSize( const T& );
+    template <class T> inline uint32_t returnSize( const T& variable );
     /** @brief loads the value of a variable out of the bytestream and increases the mem pointer */
-    template <class T> inline void loadAndIncrease( const T&, uint8_t*& );
+    template <class T> inline void loadAndIncrease( const T& variable, uint8_t*& mem );
     /** @brief saves the value of a variable into the bytestream and increases the mem pointer */
-    template <class T> inline void saveAndIncrease( const T&, uint8_t*& );
+    template <class T> inline void saveAndIncrease( const T& variable, uint8_t*& mem );
     /** @brief checks whether the variable of type T is the same as in the bytestream */
-    template <class T> inline  bool checkEquality( const T&, uint8_t* );
+    template <class T> inline bool checkEquality( const T& variable, uint8_t* mem );
 
 // =================== Template specialisation stuff =============
@@ -203,5 +202,5 @@
         return sizeof(uint32_t);
     }
-    
+
     template <> inline void loadAndIncrease( const unsigned int& variable, uint8_t*& mem )
     {
@@ -376,5 +375,5 @@
         double temp;
         memcpy(&temp, mem, sizeof(uint64_t));
-        *(long double*)( &variable ) = static_cast<const long double>(temp);
+        *(long double*)( &variable ) = static_cast<long double>(temp);
         mem += returnSize( variable );
     }
@@ -471,6 +470,167 @@
         return variable==Degree(*r);
     }
-    
-    
+
+    // =========== Vector2
+
+    template <> inline uint32_t returnSize( const Vector2& variable )
+    {
+        return returnSize( variable.x )+returnSize( variable.y );
+    }
+
+    template <> inline void saveAndIncrease( const Vector2& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector2& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector2& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.x, mem) && checkEquality(variable.y, mem+returnSize(variable.x));
+    }
+
+    // =========== Vector3
+
+    template <> inline uint32_t returnSize( const Vector3& variable )
+    {
+        return returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Vector3& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector3& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector3& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.x, mem) && checkEquality(variable.y, mem+returnSize(variable.x)) &&
+            checkEquality(variable.z, mem+returnSize(variable.x)+returnSize(variable.y));
+    }
+
+    // =========== Vector4
+
+    template <> inline uint32_t returnSize( const Vector4& variable )
+    {
+        return returnSize( variable.w )+returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Vector4& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.w, mem );
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Vector4& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.w, mem );
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Vector4& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) &&
+            checkEquality(variable.z, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));
+    }
+
+    // =========== Quaternion
+
+    template <> inline uint32_t returnSize( const Quaternion& variable )
+    {
+        return returnSize( variable.w )+returnSize( variable.x )+returnSize( variable.y )+returnSize( variable.z );
+    }
+
+    template <> inline void saveAndIncrease( const Quaternion& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.w, mem );
+        saveAndIncrease( variable.x, mem );
+        saveAndIncrease( variable.y, mem );
+        saveAndIncrease( variable.z, mem );
+    }
+
+    template <> inline void loadAndIncrease( const Quaternion& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.w, mem );
+        loadAndIncrease( variable.x, mem );
+        loadAndIncrease( variable.y, mem );
+        loadAndIncrease( variable.z, mem );
+    }
+
+    template <> inline bool checkEquality( const Quaternion& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.w, mem) && checkEquality(variable.x, mem+returnSize(variable.w)) &&
+            checkEquality(variable.y, mem+returnSize(variable.w)+returnSize(variable.x)) &&
+            checkEquality(variable.z, mem+returnSize(variable.w)+returnSize(variable.x)+returnSize(variable.y));
+    }
+
+    // =========== ColourValue
+
+    template <> inline uint32_t returnSize( const ColourValue& variable )
+    {
+        return returnSize( variable.r )+returnSize( variable.g )+returnSize( variable.b )+returnSize( variable.a );
+    }
+
+    template <> inline void saveAndIncrease( const ColourValue& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( variable.r, mem );
+        saveAndIncrease( variable.g, mem );
+        saveAndIncrease( variable.b, mem );
+        saveAndIncrease( variable.a, mem );
+    }
+
+    template <> inline void loadAndIncrease( const ColourValue& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( variable.r, mem );
+        loadAndIncrease( variable.g, mem );
+        loadAndIncrease( variable.b, mem );
+        loadAndIncrease( variable.a, mem );
+    }
+
+    template <> inline bool checkEquality( const ColourValue& variable, uint8_t* mem )
+    {
+        return checkEquality(variable.r, mem) && checkEquality(variable.g, mem+returnSize(variable.r)) &&
+            checkEquality(variable.b, mem+returnSize(variable.r)+returnSize(variable.g)) &&
+            checkEquality(variable.a, mem+returnSize(variable.r)+returnSize(variable.g)+returnSize(variable.b));
+    }
+
+    // =========== mbool
+
+    template <> inline uint32_t returnSize( const mbool& variable )
+    {
+        return returnSize( (unsigned char&)((mbool&)variable).getMemory() );
+    }
+
+    template <> inline void saveAndIncrease( const mbool& variable, uint8_t*& mem )
+    {
+        saveAndIncrease( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
+
+    template <> inline void loadAndIncrease( const mbool& variable, uint8_t*& mem )
+    {
+        loadAndIncrease( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
+
+    template <> inline bool checkEquality( const mbool& variable, uint8_t* mem )
+    {
+        return checkEquality( (unsigned char&)((mbool&)variable).getMemory(), mem );
+    }
 }
 
Index: code/trunk/src/libraries/util/Singleton.h
===================================================================
--- code/trunk/src/libraries/util/Singleton.h	(revision 6105)
+++ code/trunk/src/libraries/util/Singleton.h	(revision 6417)
@@ -56,7 +56,11 @@
 
         //! Update method called by ClassSingletonManager (if used)
-        void updateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->update(time); }
+        void preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); }
         //! Empty update method for the static polymorphism
-        void update(const Clock& time) { }
+        void preUpdate(const Clock& time) { }
+        //! Update method called by ClassSingletonManager (if used)
+        void postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); }
+        //! Empty update method for the static polymorphism
+        void postUpdate(const Clock& time) { }
 
     protected:
Index: code/trunk/src/libraries/util/StringUtils.cc
===================================================================
--- code/trunk/src/libraries/util/StringUtils.cc	(revision 6105)
+++ code/trunk/src/libraries/util/StringUtils.cc	(revision 6417)
@@ -40,5 +40,5 @@
 namespace orxonox
 {
-    std::string BLANKSTRING("");
+    std::string BLANKSTRING;
 
     std::string getUniqueNumberString()
@@ -54,10 +54,10 @@
     {
         size_t pos;
-        while ((pos = (*str).find(" ")) < (*str).length())
-            (*str).erase(pos, 1);
-        while ((pos = (*str).find("\t")) < (*str).length())
-            (*str).erase(pos, 1);
-        while ((pos = (*str).find("\n")) < (*str).length())
-            (*str).erase(pos, 1);
+        while ((pos = str->find(' ')) < str->length())
+            str->erase(pos, 1);
+        while ((pos = str->find('\t')) < str->length())
+            str->erase(pos, 1);
+        while ((pos = str->find('\n')) < str->length())
+            str->erase(pos, 1);
     }
 
@@ -69,5 +69,5 @@
     std::string getStripped(const std::string& str)
     {
-        std::string output = std::string(str);
+        std::string output(str);
         strip(&output);
         return output;
@@ -98,5 +98,5 @@
         size_t quote = start - 1;
 
-        while ((quote = str.find('\"', quote + 1)) != std::string::npos)
+        while ((quote = str.find('"', quote + 1)) != std::string::npos)
         {
             size_t backslash = quote;
@@ -231,5 +231,5 @@
     {
         // Strip the line, whitespaces are disturbing
-        std::string teststring = getStripped(str);
+        const std::string& teststring = getStripped(str);
 
         // There are four possible comment-symbols:
@@ -259,6 +259,5 @@
     bool isEmpty(const std::string& str)
     {
-        std::string temp = getStripped(str);
-        return ((temp == "") || (temp.size() == 0));
+        return getStripped(str).empty();
     }
 
@@ -303,5 +302,5 @@
         for (size_t pos = 0; (pos = output.find('\f', pos)) < std::string::npos; pos += 2) { output.replace(pos, 1, "\\f"); }
         for (size_t pos = 0; (pos = output.find('\a', pos)) < std::string::npos; pos += 2) { output.replace(pos, 1, "\\a"); }
-        for (size_t pos = 0; (pos = output.find('"', pos)) < std::string::npos; pos += 2) { output.replace(pos, 1, "\\\""); }
+        for (size_t pos = 0; (pos = output.find('"' , pos)) < std::string::npos; pos += 2) { output.replace(pos, 1, "\\\""); }
         for (size_t pos = 0; (pos = output.find('\0', pos)) < std::string::npos; pos += 2) { output.replace(pos, 1, "\\0"); }
 
@@ -319,5 +318,5 @@
             return str;
 
-        std::string output = "";
+        std::string output;
         for (size_t pos = 0; pos < str.size() - 1; )
         {
@@ -363,5 +362,5 @@
     std::string getLowercase(const std::string& str)
     {
-        std::string output = std::string(str);
+        std::string output(str);
         lowercase(&output);
         return output;
@@ -387,5 +386,5 @@
     std::string getUppercase(const std::string& str)
     {
-        std::string output = std::string(str);
+        std::string output(str);
         uppercase(&output);
         return output;
Index: code/trunk/src/libraries/util/SubString.cc
===================================================================
--- code/trunk/src/libraries/util/SubString.cc	(revision 6105)
+++ code/trunk/src/libraries/util/SubString.cc	(revision 6417)
@@ -270,8 +270,5 @@
         }
         else
-        {
-            static std::string empty;
-            return empty;
-        }
+            return "";
     }
 
Index: code/trunk/src/libraries/util/UTFStringConversions.h
===================================================================
--- code/trunk/src/libraries/util/UTFStringConversions.h	(revision 6105)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   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
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *      Reto Grieder
- *   Co-authors:
- *      ...
- */
-
-/**
-@file
-@brief
-    std::sring to Ogre::UTFString conversion functions
-*/
-
-#ifndef _UTFStringConversions_H__
-#define _UTFStringConversions_H__
-
-#include "UtilPrereqs.h"
-#include <OgreUTFString.h>
-
-namespace orxonox
-{
-    template <>
-    struct ConverterExplicit<std::string, Ogre::UTFString>
-    {
-        //! Converts an std::string into an Ogre::UTFString
-        inline static bool convert(Ogre::UTFString* output, const std::string& input)
-        {
-            Ogre::UTFString::code_point cp;
-            for (unsigned int i = 0; i < input.size(); ++i)
-            {
-              cp = input[i];
-              cp &= 0xFF;
-              output->append(1, cp);
-            }
-            return true;
-        }
-    };
-}
-
-#endif /* _UTFStringConversions_H__ */
Index: code/trunk/src/libraries/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/libraries/util/UtilPrereqs.h	(revision 6105)
+++ code/trunk/src/libraries/util/UtilPrereqs.h	(revision 6417)
@@ -131,3 +131,10 @@
 }
 
+// Just so you don't have to include StringUtils.h everywhere just for this
+namespace orxonox
+{
+    extern _UtilExport std::string BLANKSTRING;
+}
+
+
 #endif /* _UtilPrereqs_H__ */
Index: code/trunk/src/libraries/util/mbool.h
===================================================================
--- code/trunk/src/libraries/util/mbool.h	(revision 6105)
+++ code/trunk/src/libraries/util/mbool.h	(revision 6417)
@@ -67,5 +67,5 @@
             inline bool operator!() const
                 { return (!this->value_.bool_); }
-            
+
             inline unsigned char& getMemory(){ return value_.memory_; }
 
