Index: code/trunk/src/libraries/util/CMakeLists.txt
===================================================================
--- code/trunk/src/libraries/util/CMakeLists.txt	(revision 11052)
+++ code/trunk/src/libraries/util/CMakeLists.txt	(revision 11071)
@@ -26,5 +26,4 @@
   CRC32.cc
   ExprParser.cc
-  SharedPtr.cc
   Sleep.cc
   SmallObjectAllocator.cc
Index: code/trunk/src/libraries/util/Clipboard.cc
===================================================================
--- code/trunk/src/libraries/util/Clipboard.cc	(revision 11052)
+++ code/trunk/src/libraries/util/Clipboard.cc	(revision 11071)
@@ -93,5 +93,5 @@
             {
                 HANDLE hData = GetClipboardData(CF_TEXT);
-                if (hData == NULL)
+                if (hData == nullptr)
                     return "";
                 std::string output(static_cast<char*>(GlobalLock(hData)));
Index: code/trunk/src/libraries/util/Clock.h
===================================================================
--- code/trunk/src/libraries/util/Clock.h	(revision 11052)
+++ code/trunk/src/libraries/util/Clock.h	(revision 11071)
@@ -102,6 +102,7 @@
 
     private:
-        /// Undefined
-        Clock(const Clock& instance);
+        // non-copyable:
+        Clock(const Clock&) = delete;
+        Clock& operator=(const Clock&) = delete;
 
         Ogre::Timer*       timer_;       ///< Ogre timer object
Index: code/trunk/src/libraries/util/DestructionHelper.h
===================================================================
--- code/trunk/src/libraries/util/DestructionHelper.h	(revision 11052)
+++ code/trunk/src/libraries/util/DestructionHelper.h	(revision 11071)
@@ -36,5 +36,5 @@
     /** Deletes an object and resets the pointer
     @param object
-        Pointer to an object. Handing over NULL is safe.
+        Pointer to an object. Handing over nullptr is safe.
     */
     template <class T>
@@ -42,5 +42,5 @@
     {
         delete *object;
-        *object = NULL;
+        *object = nullptr;
     }
 
@@ -87,5 +87,7 @@
 
     private:
-        DestructionHelper(const DestructionHelper&); //!< Don't use (undefined)
+        // non-copyable:
+        DestructionHelper(const DestructionHelper&) = delete;
+        DestructionHelper& operator=(const DestructionHelper&) = delete;
 
         T* object_;
Index: code/trunk/src/libraries/util/DisplayStringConversions.h
===================================================================
--- code/trunk/src/libraries/util/DisplayStringConversions.h	(revision 11052)
+++ code/trunk/src/libraries/util/DisplayStringConversions.h	(revision 11071)
@@ -51,7 +51,7 @@
             {
                 Ogre::UTFString::code_point cp;
-                for (unsigned int i = 0; i < input.size(); ++i)
+                for (const char& character : input)
                 {
-                  cp = input[i];
+                  cp = character;
                   cp &= 0xFF;
                   output->append(1, cp);
Index: code/trunk/src/libraries/util/ExprParser.cc
===================================================================
--- code/trunk/src/libraries/util/ExprParser.cc	(revision 11052)
+++ code/trunk/src/libraries/util/ExprParser.cc	(revision 11071)
@@ -391,5 +391,5 @@
     }
 
-    char* ExprParser::parse_word(char* str)
+    void ExprParser::parse_word(char* str)
     {
         char* word = str;
@@ -402,9 +402,8 @@
             {
                 this->failed_ = true;
-                return '\0';
+                return;
             }
         };
         *word = '\0';
-        return str;
     }
 
Index: code/trunk/src/libraries/util/ExprParser.h
===================================================================
--- code/trunk/src/libraries/util/ExprParser.h	(revision 11052)
+++ code/trunk/src/libraries/util/ExprParser.h	(revision 11071)
@@ -139,5 +139,5 @@
         float parse_expr_7();
         float parse_expr_8();
-        char* parse_word(char* str);
+        void parse_word(char* str);
         binary_operator parse_binary_operator();
         unary_operator parse_unary_operator();
Index: code/trunk/src/libraries/util/ImplicitConversion.h
===================================================================
--- code/trunk/src/libraries/util/ImplicitConversion.h	(revision 11052)
+++ code/trunk/src/libraries/util/ImplicitConversion.h	(revision 11071)
@@ -68,5 +68,10 @@
     {
     private:
-        ImplicitConversion(); ImplicitConversion(const ImplicitConversion&); ~ImplicitConversion();
+        // static class, no instances allowed:
+        ImplicitConversion() = delete;
+        ImplicitConversion(const ImplicitConversion&) = delete;
+        ImplicitConversion& operator=(const ImplicitConversion&) = delete;
+        ~ImplicitConversion() = delete;
+
         // Gets chosen only if there is an implicit conversion from FromType to ToType.
         static char test(ToType);
Index: code/trunk/src/libraries/util/Math.cc
===================================================================
--- code/trunk/src/libraries/util/Math.cc	(revision 11052)
+++ code/trunk/src/libraries/util/Math.cc	(revision 11071)
@@ -371,4 +371,10 @@
     }
 
+
+    namespace detail
+    {
+        std::mt19937 rngen;
+    }
+
     /**
         @brief Returns a unique number. This function will never return the same value twice.
Index: code/trunk/src/libraries/util/Math.h
===================================================================
--- code/trunk/src/libraries/util/Math.h	(revision 11052)
+++ code/trunk/src/libraries/util/Math.h	(revision 11071)
@@ -46,4 +46,6 @@
 #include <cmath>
 #include <cstdlib>
+#include <random>
+#include <type_traits>
 
 #include <OgreMath.h>
@@ -73,11 +75,11 @@
     namespace math
     {
-        const float twoPi   = 6.283185482025146484375f;     ///< PI * 2
-        const float pi      = 3.1415927410125732421875f;    ///< PI
-        const float pi_2    = 1.57079637050628662109375f;   ///< PI / 2
-        const float pi_4    = 0.785398185253143310546875f;  ///< PI / 4
-        const float e       = 2.718281269073486328125f;     ///< e
-        const float sqrt2   = 1.41421353816986083984375f;   ///< sqrt(2)
-        const float sqrt2_2 = 0.707106769084930419921875f;  ///< sqrt(2) / 2
+        constexpr float twoPi   = 6.283185482025146484375f;     ///< PI * 2
+        constexpr float pi      = 3.1415927410125732421875f;    ///< PI
+        constexpr float pi_2    = 1.57079637050628662109375f;   ///< PI / 2
+        constexpr float pi_4    = 0.785398185253143310546875f;  ///< PI / 4
+        constexpr float e       = 2.718281269073486328125f;     ///< e
+        constexpr float sqrt2   = 1.41421353816986083984375f;   ///< sqrt(2)
+        constexpr float sqrt2_2 = 0.707106769084930419921875f;  ///< sqrt(2) / 2
     }
 
@@ -104,5 +106,5 @@
     */
     template <typename T>
-    inline T sgn(T x)
+    constexpr inline T sgn(T x)
     {
         return (x >= 0) ? (T)1 : (T)-1;
@@ -116,13 +118,7 @@
     */
     template <typename T>
-    inline T clamp(T x, T min, T max)
-    {
-        if (x < min)
-            return min;
-
-        if (x > max)
-            return max;
-
-        return x;
+    constexpr inline T clamp(T x, T min, T max)
+    {
+        return x < min ? min : (x > max ? max : x);
     }
 
@@ -131,5 +127,5 @@
     */
     template <typename T>
-    inline T square(T x)
+    constexpr inline T square(T x)
     {
         return x*x;
@@ -140,5 +136,5 @@
     */
     template <typename T>
-    inline T cube(T x)
+    constexpr inline T cube(T x)
     {
         return x*x*x;
@@ -183,11 +179,15 @@
         @c Vector3 you get <tt>Vector3(0, 0, 0)</tt>.
     */
-    template <typename T>
-    inline T zeroise()
-    {
-        // Default, raise a compiler error without including large boost header cascade.
-        T temp();
-        *********temp; // If you reach this code, you abused zeroise()!
-        return temp;
+    template <typename T> /* for normal classes */ typename std::enable_if<!std::is_enum<T>::value, T>::type
+    inline /*T*/ zeroise()
+    {
+        // If you reach this code, you abused zeroise()!
+        static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
+    }
+    /// Implementation for enum classes: uses the underlying type to create a zero value.
+    template <typename T> /* for enum classes */ typename std::enable_if<std::is_enum<T>::value, T>::type
+    inline /*T*/ zeroise()
+    {
+        return static_cast<T>(zeroise<typename std::underlying_type<T>::type>());
     }
 
@@ -206,5 +206,5 @@
     template <> inline long double          zeroise<long double>()          { return 0; }
     template <> inline bool                 zeroise<bool>()                 { return 0; }
-    template <> inline void*                zeroise<void*>()                { return 0; }
+    template <> inline void*                zeroise<void*>()                { return nullptr; }
     template <> inline std::string          zeroise<std::string>()          { return std::string(); }
     template <> inline orxonox::Radian      zeroise<orxonox::Radian>()      { return orxonox::Radian(0.0f); }
@@ -258,4 +258,31 @@
     }
 
+    namespace detail
+    {
+        /**
+        Random number generator used for the functions below. Marked extern to only have one global instance.
+        */
+        _UtilExport extern std::mt19937 rngen;
+    }
+
+    /**
+    @brief Seeds the random number generator used for the functions below.
+    */
+    inline void rndseed(unsigned int seed)
+    {
+        detail::rngen.seed(seed);
+    }
+
+    /**
+    @brief Returns a random number between @a min and almost @a max: <tt>min <= rnd < max</tt>.
+    @param min The minimum
+    @param max The maximum
+    */
+    inline float rnd(float min, float max)
+    {
+        std::uniform_real_distribution<float> dist(min, max);
+        return dist(detail::rngen);
+    }
+
     /**
         @brief Returns a random number between 0 and almost 1: <tt>0 <= rnd < 1</tt>.
@@ -263,5 +290,5 @@
     inline float rnd()
     {
-        return rand() / (RAND_MAX + 1.0f);
+        return rnd(0, 1);
     }
 
@@ -272,15 +299,5 @@
     inline float rnd(float max)
     {
-        return rnd() * max;
-    }
-
-    /**
-        @brief Returns a random number between @a min and almost @a max: <tt>min <= rnd < max</tt>.
-        @param min The minimum
-        @param max The maximum
-    */
-    inline float rnd(float min, float max)
-    {
-        return rnd(max - min) + min;
+        return rnd(0, max);
     }
 
@@ -290,5 +307,6 @@
     inline float rndsgn()
     {
-        return static_cast<float>((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
+        std::uniform_int_distribution<> dist;
+        return static_cast<float>((dist(detail::rngen) & 0x2) - 1); // dist(...) & 0x2 is either 2 or 0
     }
 
Index: code/trunk/src/libraries/util/MultiType.cc
===================================================================
--- code/trunk/src/libraries/util/MultiType.cc	(revision 11052)
+++ code/trunk/src/libraries/util/MultiType.cc	(revision 11071)
@@ -43,5 +43,5 @@
         @param type The type
     */
-    bool MultiType::convert(Type::Enum type)
+    bool MultiType::convert(Type type)
     {
         switch (type)
@@ -106,5 +106,5 @@
     std::string MultiType::getTypename() const
     {
-        Type::Enum type = (this->value_) ? this->value_->type_ : Type::Null;
+        Type type = (this->value_) ? this->value_->type_ : Type::Null;
 
         switch (type)
Index: code/trunk/src/libraries/util/MultiType.h
===================================================================
--- code/trunk/src/libraries/util/MultiType.h	(revision 11052)
+++ code/trunk/src/libraries/util/MultiType.h	(revision 11071)
@@ -132,36 +132,33 @@
         template <typename T> friend class MT_Value;
 
-        struct Type
+        /**
+            @brief Enum of all possible types of a MultiType.
+        */
+        enum class Type : uint8_t
         {
-            /**
-                @brief Enum of all possible types of a MultiType.
-            */
-            enum Enum
-            {
-                Null,
-                Char,
-                UnsignedChar,
-                Short,
-                UnsignedShort,
-                Int,
-                UnsignedInt,
-                Long,
-                UnsignedLong,
-                LongLong,
-                UnsignedLongLong,
-                Float,
-                Double,
-                LongDouble,
-                Bool,
-                VoidPointer,
-                String,
-                Vector2,
-                Vector3,
-                Vector4,
-                ColourValue,
-                Quaternion,
-                Radian,
-                Degree
-            };
+            Null,
+            Char,
+            UnsignedChar,
+            Short,
+            UnsignedShort,
+            Int,
+            UnsignedInt,
+            Long,
+            UnsignedLong,
+            LongLong,
+            UnsignedLongLong,
+            Float,
+            Double,
+            LongDouble,
+            Bool,
+            VoidPointer,
+            String,
+            Vector2,
+            Vector3,
+            Vector4,
+            ColourValue,
+            Quaternion,
+            Radian,
+            Degree
         };
 
@@ -174,6 +171,6 @@
         {
         public:
-            inline MT_ValueBase(void* data, Type::Enum type) : type_(type), bLastConversionSuccessful(true), data_(data) {}
-            inline virtual ~MT_ValueBase() {}
+            inline MT_ValueBase(void* data, Type type) : type_(type), bLastConversionSuccessful(true), data_(data) {}
+            virtual inline ~MT_ValueBase() {}
 
             virtual MT_ValueBase* clone() const = 0;
@@ -182,7 +179,20 @@
 
             /// Returns the type of the current value.
-            inline const Type::Enum& getType() const { return this->type_; }
-            /// Returns true if the type of the stored value is T.
-            template <typename T> inline bool isType() const { return false; }
+            inline const Type& getType() const { return this->type_; }
+
+            /// Returns true if the type of the stored value is T. Note: the actual implementations for all supported types are defined outside of the class.
+            template <typename T> /* for normal classes */ typename std::enable_if<!std::is_enum<T>::value, bool>::type
+            inline /*bool*/ isType() const
+            {
+                // If you reach this code, you used MultiType with an unsupported type T
+                static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
+                return false;
+            }
+            /// Implementation for enum classes: Returns true if the type of the stored value is the underlying type of T.
+            template <typename T> /* for enum classes */ typename std::enable_if<std::is_enum<T>::value, bool>::type
+            inline /*bool*/ isType() const
+            {
+                return this->isType<typename std::underlying_type<T>::type>();
+            }
 
             /// Checks whether the value is a default one.
@@ -215,4 +225,18 @@
             virtual bool setValue(const MultiType& other)            = 0;
 
+            template <typename T> /* for normal classes */ typename std::enable_if<!std::is_enum<T>::value, bool>::type
+            inline /*bool*/ setValue(const T& value)
+            {
+                // If you reach this code, you used MultiType with an unsupported type T
+                static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
+                return false;
+            }
+            template <typename T> /* for enum classes */ typename std::enable_if<std::is_enum<T>::value, bool>::type
+            inline /*bool*/ setValue(const T& value)
+            {
+                typedef typename std::underlying_type<T>::type UnderlyingType;
+                return this->setValue(reinterpret_cast<const UnderlyingType&>(value));
+            }
+
             virtual bool getValue(char*                 value) const = 0;
             virtual bool getValue(unsigned char*        value) const = 0;
@@ -239,4 +263,18 @@
             virtual bool getValue(orxonox::Degree*      value) const = 0;
 
+            template <typename T> /* for normal classes */ typename std::enable_if<!std::is_enum<T>::value, bool>::type
+            inline /*bool*/ getValue(T* value) const
+            {
+                // If you reach this code, you used MultiType with an unsupported type T
+                static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
+                return false;
+            }
+            template <typename T> /* for enum classes */ typename std::enable_if<std::is_enum<T>::value, bool>::type
+            inline /*bool*/ getValue(T* value) const
+            {
+                typedef typename std::underlying_type<T>::type UnderlyingType;
+                return this->getValue(reinterpret_cast<UnderlyingType*>(value));
+            }
+
             template <typename T> T get() const
             {
@@ -257,5 +295,5 @@
             virtual uint8_t getSize() const = 0;
 
-            Type::Enum type_;               ///< The type of the current value
+            Type type_;                     ///< The type of the current value
             bool bLastConversionSuccessful; ///< True if the last conversion was successful
             void* data_;                    ///< For direct access to the value if the type is known
@@ -266,10 +304,10 @@
 
             /// Default constructor: Assigns no value and no type. The type will be determined by the first assignment of a value.
-            inline MultiType()                       : value_(0) { }
+            inline MultiType()                       : value_(nullptr) { }
             /// Constructor: Assigns the given value and sets the type.
             template <typename V>
-            inline MultiType(const V& value)         : value_(0) { this->set(value); }
+            inline MultiType(const V& value)         : value_(nullptr) { this->set(value); }
             /// Copyconstructor: Assigns value and type of the other MultiType.
-            inline MultiType(const MultiType& other) : value_(0) { this->set(other); }
+            inline MultiType(const MultiType& other) : value_(nullptr) { this->set(other); }
 
             /// Destructor: Deletes the MT_Value.
@@ -325,5 +363,5 @@
                 if (this->value_)
                     delete this->value_;
-                this->value_ = (other.value_) ? other.value_->clone() : 0;
+                this->value_ = (other.value_) ? other.value_->clone() : nullptr;
             }
 
@@ -332,5 +370,5 @@
 
             /// Resets value and type. Type will be void afterwards and null() returns true.
-            inline void reset() { if (this->value_) delete this->value_; this->value_ = 0; }
+            inline void reset() { if (this->value_) delete this->value_; this->value_ = nullptr; }
             /// Resets the value and changes the internal type to T.
             template <typename T> inline void reset() { this->assignValue(typename Loki::TypeTraits<T>::UnqualifiedReferredType()); }
@@ -354,7 +392,10 @@
             template <typename T> inline bool getValue(T* value) const { if (this->value_) { return this->value_->getValue(value); } return false; }
 
-            /// Returns the current value, converted to the requested type. This base implementation works only for pointers. All other supported types are
-            /// implemented in  specialized functions at the bottom of this file.
-            template <typename T> inline T get() const { return static_cast<T>(this->get<void*>()); }
+            /// Returns the current value, converted to the requested type.
+            template <typename T> /* for normal types */ typename std::enable_if<!std::is_pointer<T>::value, T>::type
+            inline /*T*/ get() const { return (this->value_ ? this->value_->get<T>() : NilValue<T>()); }
+            /// Returns the current value, converted to a pointer of the requested type.
+            template <typename T> /* for pointers */ typename std::enable_if<std::is_pointer<T>::value, T>::type
+            inline /*T*/ get() const { return this->value_ ? static_cast<T>(this->value_->get<void*>()) : nullptr; }
 
 
@@ -365,6 +406,6 @@
             inline void exportData(uint8_t*& mem) const
             {
-                assert(sizeof(Type::Enum) <= 8);
-                *static_cast<uint8_t*>(mem) = this->getType();
+                assert(sizeof(Type) <= 8);
+                *static_cast<uint8_t*>(mem) = static_cast<uint8_t>(this->getType());
                 mem += sizeof(uint8_t);
                 this->value_->exportData(mem);
@@ -373,6 +414,6 @@
             inline void importData(uint8_t*& mem)
             {
-                assert(sizeof(Type::Enum) <= 8);
-                this->setType(static_cast<Type::Enum>(*static_cast<uint8_t*>(mem)));
+                assert(sizeof(Type) <= 8);
+                this->setType(static_cast<Type>(*static_cast<uint8_t*>(mem)));
                 mem += sizeof(uint8_t);
                 this->value_->importData(mem);
@@ -414,9 +455,9 @@
 
             /// Resets the value and changes the internal type to the given type.
-            inline void setType(Type::Enum type) { this->reset(); this->convert(type); this->resetValue(); }
+            inline void setType(Type type) { this->reset(); this->convert(type); this->resetValue(); }
             /// Returns the current type.
-            inline Type::Enum getType() const { return (this->value_) ? this->value_->type_ : Type::Null; }
+            inline Type getType() const { return (this->value_) ? this->value_->type_ : Type::Null; }
             /// Converts the current value to the given type.
-            bool convert(Type::Enum type);
+            bool convert(Type type);
 
             /// Changes the value container.
@@ -428,5 +469,17 @@
             }
             /// Creates a new value container (works only with specialized types).
-            template <typename T> inline void createNewValueContainer(const T& value) { /* STATIC ASSERT */ *****value; return false; }
+            template <typename T> /* for normal classes */ typename std::enable_if<!std::is_enum<T>::value>::type
+            inline /*void*/ createNewValueContainer(const T& value)
+            { 
+                // If you reach this code, you used MultiType with an unsupported type T
+                static_assert(sizeof(T) != sizeof(T), "No template specialization available for T");
+            }
+            /// Creates a new value container (implementation for enum classes that must be cast to the underlying type).
+            template <typename T> /* for enum classes */ typename std::enable_if<std::is_enum<T>::value>::type
+            inline /*void*/ createNewValueContainer(const T& value)
+            {
+                typedef typename std::underlying_type<T>::type UnderlyingType;
+                this->createNewValueContainer<UnderlyingType>(reinterpret_cast<const UnderlyingType&>(value));
+            }
 
             MT_ValueBase* value_; //!< A pointer to the value container
@@ -471,28 +524,4 @@
     template <> inline bool MultiType::isType<void>() const { return this->null(); }
     template <> inline bool MultiType::convert<void>() { this->reset(); return true; }
-
-    template <> inline char                 MultiType::get() const { return (this->value_ ? this->value_->get<char>()                 : 0); }
-    template <> inline unsigned char        MultiType::get() const { return (this->value_ ? this->value_->get<unsigned char>()        : 0); }
-    template <> inline short                MultiType::get() const { return (this->value_ ? this->value_->get<short>()                : 0); }
-    template <> inline unsigned short       MultiType::get() const { return (this->value_ ? this->value_->get<unsigned short>()       : 0); }
-    template <> inline int                  MultiType::get() const { return (this->value_ ? this->value_->get<int>()                  : 0); }
-    template <> inline unsigned int         MultiType::get() const { return (this->value_ ? this->value_->get<unsigned int>()         : 0); }
-    template <> inline long                 MultiType::get() const { return (this->value_ ? this->value_->get<long>()                 : 0); }
-    template <> inline unsigned long        MultiType::get() const { return (this->value_ ? this->value_->get<unsigned long>()        : 0); }
-    template <> inline long long            MultiType::get() const { return (this->value_ ? this->value_->get<long long>()            : 0); }
-    template <> inline unsigned long long   MultiType::get() const { return (this->value_ ? this->value_->get<unsigned long long>()   : 0); }
-    template <> inline float                MultiType::get() const { return (this->value_ ? this->value_->get<float>()                : 0); }
-    template <> inline double               MultiType::get() const { return (this->value_ ? this->value_->get<double>()               : 0); }
-    template <> inline long double          MultiType::get() const { return (this->value_ ? this->value_->get<long double>()          : 0); }
-    template <> inline bool                 MultiType::get() const { return (this->value_ ? this->value_->get<bool>()                 : 0); }
-    template <> inline void*                MultiType::get() const { return (this->value_ ? this->value_->get<void*>()                : 0); }
-    template <> inline std::string          MultiType::get() const { return (this->value_ ? this->value_->get<std::string>()          : NilValue<std::string>()); }
-    template <> inline orxonox::Vector2     MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Vector2>()     : NilValue<orxonox::Vector2>()); }
-    template <> inline orxonox::Vector3     MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Vector3>()     : NilValue<orxonox::Vector3>()); }
-    template <> inline orxonox::Vector4     MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Vector4>()     : NilValue<orxonox::Vector4>()); }
-    template <> inline orxonox::ColourValue MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::ColourValue>() : NilValue<orxonox::ColourValue>()); }
-    template <> inline orxonox::Quaternion  MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Quaternion>()  : NilValue<orxonox::Quaternion>()); }
-    template <> inline orxonox::Radian      MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Radian>()      : NilValue<orxonox::Radian>()); }
-    template <> inline orxonox::Degree      MultiType::get() const { return (this->value_ ? this->value_->get<orxonox::Degree>()      : NilValue<orxonox::Degree>()); }
 
     template <> _UtilExport void MultiType::createNewValueContainer(const char& value);
Index: code/trunk/src/libraries/util/MultiTypeValue.h
===================================================================
--- code/trunk/src/libraries/util/MultiTypeValue.h	(revision 11052)
+++ code/trunk/src/libraries/util/MultiTypeValue.h	(revision 11071)
@@ -55,35 +55,35 @@
     public:
         /// Constructor: Assigns the value and the type identifier.
-        MT_Value(const T& value, MultiType::Type::Enum type) : MT_ValueBase(&this->value_, type), value_(value) {}
+        MT_Value(const T& value, MultiType::Type type) : MT_ValueBase(&this->value_, type), value_(value) {}
 
         /// Creates a copy of itself.
-        inline MT_ValueBase* clone() const { return new MT_Value<T>(this->value_, this->type_); }
+        virtual inline MT_ValueBase* clone() const override { return new MT_Value<T>(this->value_, this->type_); }
 
         /// Resets the current value to the default.
-        inline void reset() { this->value_ = zeroise<T>(); bLastConversionSuccessful = true; }
-
-        inline bool getValue(char*                 value) const { return convertValue<T, char                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(unsigned char*        value) const { return convertValue<T, unsigned char       >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(short*                value) const { return convertValue<T, short               >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(unsigned short*       value) const { return convertValue<T, unsigned short      >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(int*                  value) const { return convertValue<T, int                 >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(unsigned int*         value) const { return convertValue<T, unsigned int        >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(long*                 value) const { return convertValue<T, long                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(unsigned long*        value) const { return convertValue<T, unsigned long       >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(long long*            value) const { return convertValue<T, long long           >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(unsigned long long*   value) const { return convertValue<T, unsigned long long  >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(float*                value) const { return convertValue<T, float               >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(double*               value) const { return convertValue<T, double              >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(long double*          value) const { return convertValue<T, long double         >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(bool*                 value) const { return convertValue<T, bool                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(void**                value) const { return convertValue<T, void*               >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(std::string*          value) const { return convertValue<T, std::string         >(value, value_, NilValue<std::string>         ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Vector2*     value) const { return convertValue<T, orxonox::Vector2    >(value, value_, NilValue<orxonox::Vector2>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Vector3*     value) const { return convertValue<T, orxonox::Vector3    >(value, value_, NilValue<orxonox::Vector3>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Vector4*     value) const { return convertValue<T, orxonox::Vector4    >(value, value_, NilValue<orxonox::Vector4>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::ColourValue* value) const { return convertValue<T, orxonox::ColourValue>(value, value_, NilValue<orxonox::ColourValue>()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Quaternion*  value) const { return convertValue<T, orxonox::Quaternion >(value, value_, NilValue<orxonox::Quaternion> ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Radian*      value) const { return convertValue<T, orxonox::Radian     >(value, value_, NilValue<orxonox::Radian>     ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
-        inline bool getValue(orxonox::Degree*      value) const { return convertValue<T, orxonox::Degree     >(value, value_, NilValue<orxonox::Degree>     ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline void reset() override { this->value_ = zeroise<T>(); bLastConversionSuccessful = true; }
+
+        virtual inline bool getValue(char*                 value) const override { return convertValue<T, char                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(unsigned char*        value) const override { return convertValue<T, unsigned char       >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(short*                value) const override { return convertValue<T, short               >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(unsigned short*       value) const override { return convertValue<T, unsigned short      >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(int*                  value) const override { return convertValue<T, int                 >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(unsigned int*         value) const override { return convertValue<T, unsigned int        >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(long*                 value) const override { return convertValue<T, long                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(unsigned long*        value) const override { return convertValue<T, unsigned long       >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(long long*            value) const override { return convertValue<T, long long           >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(unsigned long long*   value) const override { return convertValue<T, unsigned long long  >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(float*                value) const override { return convertValue<T, float               >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(double*               value) const override { return convertValue<T, double              >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(long double*          value) const override { return convertValue<T, long double         >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(bool*                 value) const override { return convertValue<T, bool                >(value, value_, 0); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(void**                value) const override { return convertValue<T, void*               >(value, value_, nullptr); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(std::string*          value) const override { return convertValue<T, std::string         >(value, value_, NilValue<std::string>         ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Vector2*     value) const override { return convertValue<T, orxonox::Vector2    >(value, value_, NilValue<orxonox::Vector2>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Vector3*     value) const override { return convertValue<T, orxonox::Vector3    >(value, value_, NilValue<orxonox::Vector3>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Vector4*     value) const override { return convertValue<T, orxonox::Vector4    >(value, value_, NilValue<orxonox::Vector4>    ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::ColourValue* value) const override { return convertValue<T, orxonox::ColourValue>(value, value_, NilValue<orxonox::ColourValue>()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Quaternion*  value) const override { return convertValue<T, orxonox::Quaternion >(value, value_, NilValue<orxonox::Quaternion> ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Radian*      value) const override { return convertValue<T, orxonox::Radian     >(value, value_, NilValue<orxonox::Radian>     ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
+        virtual inline bool getValue(orxonox::Degree*      value) const override { return convertValue<T, orxonox::Degree     >(value, value_, NilValue<orxonox::Degree>     ()); } ///< Assigns the value to the given pointer. The value gets converted if the types don't match.
 
         /**
@@ -91,5 +91,5 @@
             @param other The other MultiType
         */
-        inline bool setValue(const MultiType& other)
+        virtual inline bool setValue(const MultiType& other) override
         {
             if (other.value_)
@@ -104,37 +104,37 @@
         }
 
-        inline bool setValue(const char& value)                 { return (bLastConversionSuccessful = convertValue<char                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const unsigned char& value)        { return (bLastConversionSuccessful = convertValue<unsigned char       , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const short& value)                { return (bLastConversionSuccessful = convertValue<short               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const unsigned short& value)       { return (bLastConversionSuccessful = convertValue<unsigned short      , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const int& value)                  { return (bLastConversionSuccessful = convertValue<int                 , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const unsigned int& value)         { return (bLastConversionSuccessful = convertValue<unsigned int        , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const long& value)                 { return (bLastConversionSuccessful = convertValue<long                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const unsigned long& value)        { return (bLastConversionSuccessful = convertValue<unsigned long       , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const long long& value)            { return (bLastConversionSuccessful = convertValue<long long           , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const unsigned long long& value)   { return (bLastConversionSuccessful = convertValue<unsigned long long  , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const float& value)                { return (bLastConversionSuccessful = convertValue<float               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const double& value)               { return (bLastConversionSuccessful = convertValue<double              , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const long double& value)          { return (bLastConversionSuccessful = convertValue<long double         , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const bool& value)                 { return (bLastConversionSuccessful = convertValue<bool                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(      void* const& value)          { return (bLastConversionSuccessful = convertValue<void*               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const std::string& value)          { return (bLastConversionSuccessful = convertValue<std::string         , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Vector2& value)     { return (bLastConversionSuccessful = convertValue<orxonox::Vector2    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Vector3& value)     { return (bLastConversionSuccessful = convertValue<orxonox::Vector3    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Vector4& value)     { return (bLastConversionSuccessful = convertValue<orxonox::Vector4    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::ColourValue& value) { return (bLastConversionSuccessful = convertValue<orxonox::ColourValue, T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Quaternion& value)  { return (bLastConversionSuccessful = convertValue<orxonox::Quaternion , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Radian& value)      { return (bLastConversionSuccessful = convertValue<orxonox::Radian     , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
-        inline bool setValue(const orxonox::Degree& value)      { return (bLastConversionSuccessful = convertValue<orxonox::Degree     , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const char& value)                 override { return (bLastConversionSuccessful = convertValue<char                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const unsigned char& value)        override { return (bLastConversionSuccessful = convertValue<unsigned char       , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const short& value)                override { return (bLastConversionSuccessful = convertValue<short               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const unsigned short& value)       override { return (bLastConversionSuccessful = convertValue<unsigned short      , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const int& value)                  override { return (bLastConversionSuccessful = convertValue<int                 , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const unsigned int& value)         override { return (bLastConversionSuccessful = convertValue<unsigned int        , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const long& value)                 override { return (bLastConversionSuccessful = convertValue<long                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const unsigned long& value)        override { return (bLastConversionSuccessful = convertValue<unsigned long       , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const long long& value)            override { return (bLastConversionSuccessful = convertValue<long long           , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const unsigned long long& value)   override { return (bLastConversionSuccessful = convertValue<unsigned long long  , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const float& value)                override { return (bLastConversionSuccessful = convertValue<float               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const double& value)               override { return (bLastConversionSuccessful = convertValue<double              , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const long double& value)          override { return (bLastConversionSuccessful = convertValue<long double         , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const bool& value)                 override { return (bLastConversionSuccessful = convertValue<bool                , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(      void* const& value)          override { return (bLastConversionSuccessful = convertValue<void*               , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const std::string& value)          override { return (bLastConversionSuccessful = convertValue<std::string         , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Vector2& value)     override { return (bLastConversionSuccessful = convertValue<orxonox::Vector2    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Vector3& value)     override { return (bLastConversionSuccessful = convertValue<orxonox::Vector3    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Vector4& value)     override { return (bLastConversionSuccessful = convertValue<orxonox::Vector4    , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::ColourValue& value) override { return (bLastConversionSuccessful = convertValue<orxonox::ColourValue, T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Quaternion& value)  override { return (bLastConversionSuccessful = convertValue<orxonox::Quaternion , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Radian& value)      override { return (bLastConversionSuccessful = convertValue<orxonox::Radian     , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
+        virtual inline bool setValue(const orxonox::Degree& value)      override { return (bLastConversionSuccessful = convertValue<orxonox::Degree     , T>(&value_, value, NilValue<T>())); } ///< Assigns the value by converting it to T.
 
         /// Puts the current value on the stream
-        inline void toString(std::ostream& outstream) const { outstream << this->value_; }
+        virtual inline void toString(std::ostream& outstream) const override { outstream << this->value_; }
 
         /// 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 ); }
+        virtual inline void importData( uint8_t*& mem ) override         { loadAndIncrease( /*(const T&)*/this->value_, mem ); }
         /// saves data from the MT into the bytestream (mem) and increases the bytestream pointer by the size of the data
-        inline void exportData( uint8_t*& mem ) const   { saveAndIncrease( /*(const T&)*/this->value_, mem ); }
+        virtual inline void exportData( uint8_t*& mem ) const override   { saveAndIncrease( /*(const T&)*/this->value_, mem ); }
         /// returns the size of the data that would be saved by exportData
-        inline uint8_t getSize() const { return returnSize( this->value_ ); }
+        virtual inline uint8_t getSize() const override { return returnSize( this->value_ ); }
 
         T value_; ///< The stored value
Index: code/trunk/src/libraries/util/Serialise.h
===================================================================
--- code/trunk/src/libraries/util/Serialise.h	(revision 11052)
+++ code/trunk/src/libraries/util/Serialise.h	(revision 11071)
@@ -672,6 +672,6 @@
     {
         uint32_t tempsize = sizeof(uint32_t); // for the number of entries
-        for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it)
-            tempsize += returnSize( *it );
+        for(const T& element : *((std::set<T>*)(&variable)))
+            tempsize += returnSize( element );
         return tempsize;
     }
@@ -679,8 +679,7 @@
     template <class T> inline void saveAndIncrease(  const std::set<T>& variable, uint8_t*& mem )
     {
-        typename std::set<T>::const_iterator it = variable.begin();
         saveAndIncrease( (uint32_t)variable.size(), mem );
-        for( ; it!=variable.end(); ++it )
-            saveAndIncrease( *it, mem );
+        for( const T& elem : variable )
+            saveAndIncrease( elem, mem );
     }
 
Index: code/trunk/src/libraries/util/SharedPtr.cc
===================================================================
--- code/trunk/src/libraries/util/SharedPtr.cc	(revision 11052)
+++ 	(revision )
@@ -1,46 +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
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file
-    @brief Static linkage of the SmallObjectAllocator used by SharedPtr.
-*/
-
-#include "SharedPtr.h"
-
-namespace orxonox
-{
-    namespace detail
-    {
-        SmallObjectAllocator& createSharedCounterPool()
-        {
-            static SmallObjectAllocator instance(sizeof(SharedCounterImpl<void>));
-            return instance;
-        }
-    }
-}
Index: code/trunk/src/libraries/util/SharedPtr.h
===================================================================
--- code/trunk/src/libraries/util/SharedPtr.h	(revision 11052)
+++ 	(revision )
@@ -1,375 +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
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @defgroup SharedPtr SharedPtr<T>
-    @ingroup Util
-*/
-
-/**
-    @file
-    @ingroup SharedPtr
-    @brief Definition of the SharedPtr template that is used to manage pointers.
-
-    @anchor SharedPtrExample
-
-    The orxonox::SharedPtr template can be used to manage a pointer to an object
-    that was created with new. The SharedPtr acts like the pointer itself, but it
-    keeps track of the number of references to it. If all references are removed,
-    SharedPtr deletes the managed object automatically.
-
-    Example:
-
-    Classic implementation using new and delete:
-    @code
-    void someFunction()
-    {
-        MyClass* object = new MyClass();            // Create a new instance of MyClass
-
-        object->myFunction();                       // Calls MyClass::myFunction()
-
-        delete object;                              // Delete the object at the end of the scope
-    }
-    @endcode
-
-    The same function using SharedPtr:
-    @code
-    void someFunction()
-    {
-        SharedPtr<MyClass> object = new MyClass();  // Create a new instance of MyClass and store its pointer in a SharedPtr
-
-        object->myFunction();                       // Calls MyClass::myFunction()
-
-    }                                               // At the end of the scope, the SharedPtr is destroyed. Because no other SharedPtrs
-                                                    // point at the object, the object itself is also destroyed automatically
-    @endcode
-
-    This is especially handy if you do not know what will happen with an object that was
-    created with new, for example if you pass it to another object. If multiple instances
-    share a pointer to the same object, none of these instances can delete the object
-    without interfering with the other instances. But if none of the instances destroy the
-    object, it will never be destroyed and results in a memory leak. With a SharedPtr
-    however you don't have to think about destroying the object, because the SharedPtr
-    itself keeps track of the references.
-
-    Example:
-
-    Classic implementation using new and delete:
-    @code
-    class OtherClass                                    // Declaration of some class
-    {
-        public:
-            OtherClass(MyClass* object)                 // Constructor
-            {
-                this->object_ = object;                 // Assigns the pointer to the member variable object_
-            }
-
-            ~OtherClass()                               // Destructor
-            {
-                ???                                     // What to do with object_?
-            }
-
-        private:
-            MyClass* object_;                           // A pointer to the object
-    };
-
-    void someFunction()
-    {
-        MyClass* object = new MyClass();                // Create a new instance of MyClass
-
-        OtherClass* other1 = new OtherClass(object);    // Create an instance of OtherClass and pass the object pointer
-        OtherClass* other2 = new OtherClass(object);    // "
-        OtherClass* other3 = new OtherClass(object);    // "
-
-        ???                                             // What happens with object now?
-    }
-    @endcode
-
-    If you use SharedPtr<MyClass> instead of a classic MyClass* pointer, the instance of
-    MyClass would be automatically destroyed if all instances of OtherClass are destroyed.
-    You don't need any code in the destructor and you can completely forget about the
-    object, because its managed by the SharedPtr.
-
-    The same code using SharedPtr:
-    @code
-    class OtherClass                                        // Declaration of some class
-    {
-        public:
-            OtherClass(const SharedPtr<MyClass>& object)    // Constructor
-            {
-                this->object_ = object;                     // Assigns the pointer to the member variable object_
-            }
-
-        private:
-            SharedPtr<MyClass> object_;                     // A SharedPtr to the object
-    };
-
-    void someFunction()
-    {
-        SharedPtr<MyClass> object = new MyClass();          // Create a new instance of MyClass
-
-        OtherClass* other1 = new OtherClass(object);        // Create an instance of OtherClass and pass the object pointer
-        OtherClass* other2 = new OtherClass(object);        // "
-        OtherClass* other3 = new OtherClass(object);        // "
-
-    }                                                       // The SharedPtr "object" is destroyed at the end of the scope,
-                                                            // but the three instances of OtherClass keep the object alive
-                                                            // until they are all destroyed.
-    @endcode
-*/
-
-#ifndef _SharedPtr_H__
-#define _SharedPtr_H__
-
-#include "UtilPrereqs.h"
-
-#include <algorithm>
-#include <cassert>
-
-#include "SmallObjectAllocator.h"
-
-namespace orxonox
-{
-    namespace detail
-    {
-        /// BaseClass of SharedCounterImpl, has a counter that is initialized with 1
-        class SharedCounter
-        {
-            public:
-                SharedCounter() : count_(1) {}
-                virtual ~SharedCounter() {}
-                virtual void destroy() = 0;
-
-                int count_;
-        };
-
-        /// Child class of SharedCounter, keeps a pointer to an object of type T that can be destroyed with destroy()
-        template <class T>
-        class SharedCounterImpl : public SharedCounter
-        {
-            public:
-                SharedCounterImpl(T* pointer) : pointer_(pointer) {}
-
-                void destroy()
-                {
-                    delete this->pointer_;
-                }
-
-            private:
-                T* pointer_;
-        };
-
-        _UtilExport SmallObjectAllocator& createSharedCounterPool();
-
-        ORX_FORCEINLINE SmallObjectAllocator& getSharedCounterPool()
-        {
-            static SmallObjectAllocator& instance = createSharedCounterPool();
-            return instance;
-        }
-    }
-
-    /**
-        @brief The SharedPtr template is a utility to manage pointers to an object.
-        @param T The type of the managed object
-
-        SharedPtr acts like a real pointer, except that it keeps track of the number of
-        references to the object. If the the number of references drops to zero, the
-        object is destroyed automatically.
-
-        @see See @ref SharedPtrExample "this description" for some examples and more information.
-
-        @note The number of references is stored in a separate object that is shared
-        among all instances of SharedPtr that point to the same pointer. This object is
-        also responsible for destroying the pointer if the reference counter becomes zero.
-    */
-    template <class T>
-    class SharedPtr
-    {
-        template <class O>
-        friend class SharedPtr;
-
-        public:
-            /// Default constructor, the pointer is set to NULL.
-            inline SharedPtr() : pointer_(0), counter_(0)
-            {
-            }
-
-            /// Constructor, creates a SharedPtr that points to @a pointer, increments the counter.
-            inline SharedPtr(T* pointer) : pointer_(pointer), counter_(0)
-            {
-                if (this->pointer_)
-                {
-                    void* chunk = detail::getSharedCounterPool().alloc();
-                    this->counter_ = new (chunk) detail::SharedCounterImpl<T>(this->pointer_);
-                }
-            }
-
-            /// Copy-constructor, this SharedPtr now points to the same object like the other SharedPtr, increments the counter.
-            inline SharedPtr(const SharedPtr& other) : pointer_(other.pointer_), counter_(other.counter_)
-            {
-                if (this->pointer_)
-                    ++this->counter_->count_;
-            }
-
-            /// Copy-constructor for SharedPtr with another template agument, increments the counter.
-            template <class O>
-            inline SharedPtr(const SharedPtr<O>& other) : pointer_(other.pointer_), counter_(other.counter_)
-            {
-                if (this->pointer_)
-                    ++this->counter_->count_;
-            }
-
-            /// Destructor, decrements the counter and deletes the object if the counter becomes zero.
-            inline ~SharedPtr()
-            {
-                if (this->pointer_)
-                {
-                    --this->counter_->count_;
-
-                    if (this->counter_->count_ == 0)
-                    {
-                        this->counter_->destroy();
-                        detail::getSharedCounterPool().free(this->counter_);
-                    }
-                }
-            }
-
-            /// Assigns a new object, decrements the counter of the old object, increments the counter of the new object.
-            inline SharedPtr& operator=(const SharedPtr& other)
-            {
-                SharedPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Assigns a new object with another template argument, decrements the counter of the old object, increments the counter of the new object.
-            template <class O>
-            inline SharedPtr& operator=(const SharedPtr<O>& other)
-            {
-                SharedPtr(other).swap(*this);
-                return *this;
-            }
-
-            /// Casts the pointer to another type
-            template <class O>
-            inline SharedPtr<O> cast() const
-            {
-                O* temp = static_cast<O*>(this->pointer_); // temp value for prettier compiler error in case of an invalid static_cast
-                return SharedPtr<O>(temp, this->counter_);
-            }
-
-            /// Overloaded -> operator, returns the pointer to the managed object.
-            inline T* operator->() const
-            {
-                assert(this->pointer_ != 0);
-                return this->pointer_;
-            }
-
-            /// Overloaded * operator, returns a reference ot the managed object.
-            inline T& operator*() const
-            {
-                assert(this->pointer_ != 0);
-                return *this->pointer_;
-            }
-
-            /// Returns the pointer to the managed object.
-            inline T* get() const
-            {
-                return this->pointer_;
-            }
-
-            /// Returns true if the pointer is not NULL.
-            inline operator bool() const
-            {
-                return (this->pointer_ != 0);
-            }
-
-            /// Swaps the pointer and the counter of two instances of SharedPtr with the same template argument.
-            inline void swap(SharedPtr& other)
-            {
-                std::swap(this->pointer_, other.pointer_);
-                std::swap(this->counter_, other.counter_);
-            }
-
-        private:
-            /// Private constructor, used by the cast() function.
-            inline SharedPtr(T* pointer, detail::SharedCounter* counter) : pointer_(pointer), counter_(counter)
-            {
-                if (this->pointer_)
-                    ++this->counter_->count_;
-            }
-
-            T* pointer_;                        ///< A pointer to the managed object of type @a T
-            detail::SharedCounter* counter_;    ///< A pointer to the shared reference counter
-    };
-
-    /**
-        @brief A child class of SharedPtr, used to reflect the hierarchy of the underlying class @a T.
-        @param T The type of the managed object
-        @param Parent The type of the SharedPtr that manages the parent class of @a T
-
-        This class is used to reflect the hierarchy of the underlying class @a T.
-        For example the @c Functor classes: While a @c Functor* pointer would be managed by
-        @c SharedPtr<Functor>, the child class @c FunctorStatic is managed by the class
-        <tt>SharedChildPtr<FunctorStatic, SharedPtr<Functor> ></tt>.
-
-        The second template argument @a Parent is used as the parent class of
-        SharedChildPtr. This means that each instance of <tt>SharedChildPtr<T, Parent></tt>
-        can be upcasted to @c Parent.
-
-        So for example this works:
-        @code
-        SharedChildPtr<FunctorStatic, SharedPtr<Functor> > functorStatic = createFunctor(&MyClass::myStaticFunction);
-        SharedPtr<Functor> functor = functorStatic;
-        @endcode
-
-        @note There are some typedefs and more to make the usage of SharedChildPtr easier
-        for the classes Functor and Executor. See FunctorPtr.h and ExecutorPtr.h. The above
-        example could thus be simplified the following way:
-        @code
-        FunctorStaticPtr functorStatic = createFunctor(&MyClass::myStaticFunction);
-        FunctorPtr functor = functorStatic;
-        @endcode
-
-        @see See SharedPtr for more information about the base class SharedPtr.
-        @see See @ref SharedPtrExample "this description" for some examples about how to use SharedPtr.
-    */
-    template <class T, class Parent>
-    class SharedChildPtr : public Parent
-    {
-        public:
-            inline SharedChildPtr() : Parent() {}
-            inline SharedChildPtr(T* pointer) : Parent(pointer) {}
-            inline SharedChildPtr(const SharedPtr<T>& other) : Parent(other) {}
-
-            inline T* operator->() const { return static_cast<T*>(Parent::operator->()); }
-            inline T& operator*() const { return *static_cast<T*>(Parent::operator->()); }
-    };
-
-}
-
-#endif /* _SharedPtr_H__ */
Index: code/trunk/src/libraries/util/SignalHandler.cc
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.cc	(revision 11052)
+++ code/trunk/src/libraries/util/SignalHandler.cc	(revision 11071)
@@ -44,5 +44,5 @@
 namespace orxonox
 {
-    SignalHandler* SignalHandler::singletonPtr_s = NULL;
+    SignalHandler* SignalHandler::singletonPtr_s = nullptr;
 }
 
@@ -81,7 +81,7 @@
     void SignalHandler::dontCatch()
     {
-      for ( SignalRecList::iterator it = sigRecList.begin(); it != sigRecList.end(); it++ )
-      {
-        signal( it->signal, it->handler );
+      for (const SignalRec& sigRec : sigRecList)
+      {
+        signal( sigRec.signal, sigRec.handler );
       }
 
@@ -127,5 +127,5 @@
       }
       // if the signalhandler has already been destroyed then don't do anything
-      if( SignalHandler::singletonPtr_s == 0 )
+      if( SignalHandler::singletonPtr_s == nullptr )
       {
         orxout(user_error) << "Received signal " << sigName.c_str() << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl;
@@ -133,7 +133,7 @@
       }
 
-      for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++  )
-      {
-        (*(it->cb))( it->someData );
+      for (const SignalCallbackRec& callback : SignalHandler::getInstance().callbackList)
+      {
+        (*(callback.cb))( callback.someData );
       }
 
@@ -175,5 +175,5 @@
         dup2( gdbErr[1], STDERR_FILENO );
 
-        execlp( "sh", "sh", "-c", "gdb", static_cast<void*>(NULL));
+        execlp( "sh", "sh", "-c", "gdb", static_cast<void*>(nullptr));
       }
 
@@ -186,5 +186,5 @@
         perror("pipe failed!\n");
         kill( gdbPid, SIGTERM );
-        waitpid( gdbPid, NULL, 0 );
+        waitpid( gdbPid, nullptr, 0 );
         exit(EXIT_FAILURE);
       }
@@ -196,5 +196,5 @@
         perror("fork failed!\n");
         kill( gdbPid, SIGTERM );
-        waitpid( gdbPid, NULL, 0 );
+        waitpid( gdbPid, nullptr, 0 );
         exit(EXIT_FAILURE);
       }
@@ -297,6 +297,6 @@
 
 
-      waitpid( sigPid, NULL, 0 );
-      waitpid( gdbPid, NULL, 0 );
+      waitpid( sigPid, nullptr, 0 );
+      waitpid( gdbPid, nullptr, 0 );
 
       int wsRemoved = 0;
@@ -312,5 +312,5 @@
         bt.erase(0, 1);
 
-      time_t now = time(NULL);
+      time_t now = time(nullptr);
 
       std::string timeString =
@@ -388,5 +388,5 @@
     SignalHandler::SignalHandler()
     {
-        this->prevExceptionFilter_ = NULL;
+        this->prevExceptionFilter_ = nullptr;
     }
 
@@ -394,9 +394,9 @@
     SignalHandler::~SignalHandler()
     {
-        if (this->prevExceptionFilter_ != NULL)
+        if (this->prevExceptionFilter_ != nullptr)
         {
             // Remove the unhandled exception filter function
             SetUnhandledExceptionFilter(this->prevExceptionFilter_);
-            this->prevExceptionFilter_ = NULL;
+            this->prevExceptionFilter_ = nullptr;
         }
     }
@@ -408,7 +408,7 @@
 
         // don't register twice
-        assert(this->prevExceptionFilter_ == NULL);
-
-        if (this->prevExceptionFilter_ == NULL)
+        assert(this->prevExceptionFilter_ == nullptr);
+
+        if (this->prevExceptionFilter_ == nullptr)
         {
             // Install the unhandled exception filter function
@@ -430,5 +430,5 @@
 
             // if the signalhandler has already been destroyed then don't do anything
-            if (SignalHandler::singletonPtr_s == 0)
+            if (SignalHandler::singletonPtr_s == nullptr)
             {
                 orxout(user_error) << "Caught an unhandled exception" << endl << "Can't write backtrace because SignalHandler is already destroyed" << endl;
@@ -441,5 +441,5 @@
             std::ofstream crashlog(SignalHandler::getInstance().filename_.c_str());
 
-            time_t now = time(NULL);
+            time_t now = time(nullptr);
 
             crashlog << "=======================================================" << endl;
@@ -480,5 +480,5 @@
     }
 
-    /// Returns the stack trace for either the current function, or, if @a pExceptionInfo is not NULL, for the given exception context.
+    /// Returns the stack trace for either the current function, or, if @a pExceptionInfo is not nullptr, for the given exception context.
     /* static */ std::string SignalHandler::getStackTrace(PEXCEPTION_POINTERS pExceptionInfo)
     {
@@ -625,5 +625,5 @@
 #ifdef ORXONOX_COMPILER_GCC
                 int status;
-                char* demangled = __cxxabiv1::__cxa_demangle(symbol->Name, NULL, NULL, &status);
+                char* demangled = __cxxabiv1::__cxa_demangle(symbol->Name, nullptr, nullptr, &status);
                 if (demangled)
                 {
@@ -684,5 +684,5 @@
         HMODULE hModule;
 
-        std::string output = (GetModuleFileName(NULL, szModule, MAX_PATH) ? SignalHandler::getModuleName(szModule) : "Application");
+        std::string output = (GetModuleFileName(nullptr, szModule, MAX_PATH) ? SignalHandler::getModuleName(szModule) : "Application");
         output += " caused ";
 
Index: code/trunk/src/libraries/util/SignalHandler.h
===================================================================
--- code/trunk/src/libraries/util/SignalHandler.h	(revision 11052)
+++ code/trunk/src/libraries/util/SignalHandler.h	(revision 11071)
@@ -113,5 +113,5 @@
             void doCatch(const std::string& appName, const std::string& filename);
 
-            static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = NULL);
+            static std::string getStackTrace(PEXCEPTION_POINTERS pExceptionInfo = nullptr);
             static std::string getExceptionType(PEXCEPTION_POINTERS pExceptionInfo);
 
Index: code/trunk/src/libraries/util/Singleton.h
===================================================================
--- code/trunk/src/libraries/util/Singleton.h	(revision 11052)
+++ code/trunk/src/libraries/util/Singleton.h	(revision 11071)
@@ -66,5 +66,5 @@
     And don't forget to initialize the static singleton pointer in the source (*.cc) %file:
     @code
-    TestSingleton* TestSingleton::singletonPtr_s = NULL;
+    TestSingleton* TestSingleton::singletonPtr_s = nullptr;
     @endcode
 
@@ -118,5 +118,5 @@
         static T& getInstance()
         {
-            OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
+            OrxVerify(T::singletonPtr_s != nullptr, "T=" << typeid(T).name());
             return *T::singletonPtr_s;
         }
@@ -125,5 +125,5 @@
         static bool exists()
         {
-            return (T::singletonPtr_s != NULL);
+            return (T::singletonPtr_s != nullptr);
         }
 
@@ -132,5 +132,5 @@
         Singleton()
         {
-            OrxVerify(T::singletonPtr_s == NULL, "T=" << typeid(T).name());
+            OrxVerify(T::singletonPtr_s == nullptr, "T=" << typeid(T).name());
             T::singletonPtr_s = static_cast<T*>(this);
         }
@@ -139,10 +139,12 @@
         virtual ~Singleton()
         {
-            OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name());
-            T::singletonPtr_s = NULL;
+            OrxVerify(T::singletonPtr_s != nullptr, "T=" << typeid(T).name());
+            T::singletonPtr_s = nullptr;
         }
 
     private:
-        Singleton(const Singleton& rhs); //!< Don't use (undefined)
+        // non-copyable:
+        Singleton(const Singleton&) = delete;
+        Singleton& operator=(const Singleton&) = delete;
     };
 }
Index: code/trunk/src/libraries/util/SmallObjectAllocator.cc
===================================================================
--- code/trunk/src/libraries/util/SmallObjectAllocator.cc	(revision 11052)
+++ code/trunk/src/libraries/util/SmallObjectAllocator.cc	(revision 11071)
@@ -45,5 +45,5 @@
         this->chunkSize_ = std::max(objectSize, sizeof(Chunk)); // the chunk's size will be the maximum of the object's size and the size of a Chunk object itself
         this->numChunksPerBlock_ = numObjects;
-        this->first_ = 0;
+        this->first_ = nullptr;
     }
 
@@ -53,6 +53,6 @@
     SmallObjectAllocator::~SmallObjectAllocator()
     {
-        for (std::vector<char*>::iterator it = this->blocks_.begin(); it != this->blocks_.end(); ++it)
-            delete[] *it;
+        for (char* block : this->blocks_)
+            delete[] block;
     }
 
@@ -97,6 +97,6 @@
                 setNext(block + i * this->chunkSize_, block + (i + 1) * this->chunkSize_);
 
-            // the next_ pointer of the last chunk must point to NULL
-            setNext(block + (this->numChunksPerBlock_ - 1) * this->chunkSize_, 0);
+            // the next_ pointer of the last chunk must point to nullptr
+            setNext(block + (this->numChunksPerBlock_ - 1) * this->chunkSize_, nullptr);
 
             // The second chunk in the block is assigned to the first_ pointer
Index: code/trunk/src/libraries/util/SmallObjectAllocator.h
===================================================================
--- code/trunk/src/libraries/util/SmallObjectAllocator.h	(revision 11052)
+++ code/trunk/src/libraries/util/SmallObjectAllocator.h	(revision 11071)
@@ -77,4 +77,5 @@
 #include "UtilPrereqs.h"
 #include <vector>
+#include <cstdio>
 
 namespace orxonox
Index: code/trunk/src/libraries/util/StringUtils.cc
===================================================================
--- code/trunk/src/libraries/util/StringUtils.cc	(revision 11052)
+++ code/trunk/src/libraries/util/StringUtils.cc	(revision 11071)
@@ -36,5 +36,4 @@
 #include <cctype>
 #include <ctime>
-#include <boost/scoped_array.hpp>
 #include "Convert.h"
 #include "Math.h"
@@ -263,7 +262,7 @@
         std::string output(str.size() * 2, ' ');
         size_t i = 0;
-        for (size_t pos = 0; pos < str.size(); ++pos)
-        {
-            switch (str[pos])
+        for (const char& character : str)
+        {
+            switch (character)
             {
             case '\\': output[i] = '\\'; output[i + 1] = '\\'; break;
@@ -277,5 +276,5 @@
             case  '"': output[i] = '\\'; output[i + 1] =  '"'; break;
             case '\0': output[i] = '\\'; output[i + 1] =  '0'; break;
-            default  : output[i] = str[pos]; ++i; continue;
+            default  : output[i] = character; ++i; continue;
             }
             i += 2;
@@ -337,7 +336,7 @@
     void lowercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(tolower((*str)[i]));
+        for (char& character : *str)
+        {
+            character = static_cast<char>(tolower(character));
         }
     }
@@ -354,7 +353,7 @@
     void uppercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(toupper((*str)[i]));
+        for (char& character : *str)
+        {
+            character = static_cast<char>(toupper(character));
         }
     }
@@ -461,9 +460,9 @@
     {
         size_t j = 0;
-        for (size_t i = 0; i < str.size(); ++i)
-        {
-            if (str[i] == target)
+        for (char& character : str)
+        {
+            if (character == target)
             {
-                str[i] = replacement;
+                character = replacement;
                 ++j;
             }
@@ -482,5 +481,5 @@
         size_t cols = str1.size() + 1;
         size_t rows = str2.size() + 1;
-        boost::scoped_array<int> matrix(new int[rows * cols]);
+        const std::unique_ptr<int[]> matrix(new int[rows * cols]);
 
         for (size_t r = 0; r < rows; ++r)
Index: code/trunk/src/libraries/util/SubString.cc
===================================================================
--- code/trunk/src/libraries/util/SubString.cc	(revision 11052)
+++ code/trunk/src/libraries/util/SubString.cc	(revision 11071)
@@ -112,5 +112,5 @@
         for (size_t i = 0; i < argc; ++i)
         {
-            this->tokens_.push_back(std::string(argv[i]));
+            this->tokens_.emplace_back(argv[i]);
             this->bTokenInSafemode_.push_back(false);
         }
@@ -265,10 +265,10 @@
         bool inSafemode = false;
 
-        if(start_state != SL_NORMAL && tokens.size() > 0)
+        if(start_state != SPLIT_LINE_STATE::NORMAL && tokens.size() > 0)
         {
             token = tokens[tokens.size()-1];
             tokens.pop_back();
         }
-        if(start_state != SL_NORMAL && bTokenInSafemode.size() > 0)
+        if(start_state != SPLIT_LINE_STATE::NORMAL && bTokenInSafemode.size() > 0)
         {
             inSafemode = bTokenInSafemode[bTokenInSafemode.size()-1];
@@ -280,8 +280,8 @@
             switch(state)
             {
-            case SL_NORMAL:
+            case SPLIT_LINE_STATE::NORMAL:
                 if(line[i] == escapeChar)
                 {
-                    state = SL_ESCAPE;
+                    state = SPLIT_LINE_STATE::ESCAPE;
                     if (!bRemoveEscapeChar)
                         token += line[i];
@@ -290,5 +290,5 @@
                 else if(line[i] == safemodeChar)
                 {
-                    state = SL_SAFEMODE;
+                    state = SPLIT_LINE_STATE::SAFEMODE;
                     inSafemode = true;
                     if (!bRemoveSafemodeChar)
@@ -298,5 +298,5 @@
                 else if(line[i] == openparenthesisChar)
                 {
-                    state = SL_PARENTHESES;
+                    state = SPLIT_LINE_STATE::PARENTHESES;
                     inSafemode = true;
                     if (!bRemoveParenthesisChars)
@@ -318,5 +318,5 @@
                     }
                     token += line[i];       // EAT
-                    state = SL_COMMENT;
+                    state = SPLIT_LINE_STATE::COMMENT;
                 }
                 else if(delimiters.find(line[i]) != std::string::npos)
@@ -334,5 +334,5 @@
                         inSafemode = false;
                     }
-                    state = SL_NORMAL;
+                    state = SPLIT_LINE_STATE::NORMAL;
                 }
                 else
@@ -353,5 +353,5 @@
                 }
                 break;
-            case SL_ESCAPE:
+            case SPLIT_LINE_STATE::ESCAPE:
                 if (!bRemoveSafemodeChar)
                     token += line[i];
@@ -368,10 +368,10 @@
                     else token += line[i];  // EAT
                 }
-                state = SL_NORMAL;
-                break;
-            case SL_SAFEMODE:
+                state = SPLIT_LINE_STATE::NORMAL;
+                break;
+            case SPLIT_LINE_STATE::SAFEMODE:
                 if(line[i] == safemodeChar)
                 {
-                    state = SL_NORMAL;
+                    state = SPLIT_LINE_STATE::NORMAL;
                     if (!bRemoveSafemodeChar)
                         token += line[i];
@@ -379,5 +379,5 @@
                 else if(line[i] == escapeChar)
                 {
-                    state = SL_SAFEESCAPE;
+                    state = SPLIT_LINE_STATE::SAFEESCAPE;
                 }
                 else
@@ -387,5 +387,5 @@
                 break;
 
-            case SL_SAFEESCAPE:
+            case SPLIT_LINE_STATE::SAFEESCAPE:
                 if(line[i] == 'n') token += '\n';
                 else if(line[i] == 't') token += '\t';
@@ -397,11 +397,11 @@
                 else if(line[i] == '?') token += '\?';
                 else token += line[i];  // EAT
-                state = SL_SAFEMODE;
-                break;
-
-            case SL_PARENTHESES:
+                state = SPLIT_LINE_STATE::SAFEMODE;
+                break;
+
+            case SPLIT_LINE_STATE::PARENTHESES:
                 if(line[i] == closeparenthesisChar)
                 {
-                    state = SL_NORMAL;
+                    state = SPLIT_LINE_STATE::NORMAL;
                     if (!bRemoveParenthesisChars)
                         token += line[i];
@@ -409,5 +409,5 @@
                 else if(line[i] == escapeChar)
                 {
-                    state = SL_PARENTHESESESCAPE;
+                    state = SPLIT_LINE_STATE::PARENTHESESESCAPE;
                 }
                 else
@@ -417,5 +417,5 @@
                 break;
 
-            case SL_PARENTHESESESCAPE:
+            case SPLIT_LINE_STATE::PARENTHESESESCAPE:
                 if(line[i] == 'n') token += '\n';
                 else if(line[i] == 't') token += '\t';
@@ -427,8 +427,8 @@
                 else if(line[i] == '?') token += '\?';
                 else token += line[i];  // EAT
-                state = SL_PARENTHESES;
-                break;
-
-            case SL_COMMENT:
+                state = SPLIT_LINE_STATE::PARENTHESES;
+                break;
+
+            case SPLIT_LINE_STATE::COMMENT:
                 if(line[i] == '\n')
                 {
@@ -441,5 +441,5 @@
                         inSafemode = false;
                     }
-                    state = SL_NORMAL;
+                    state = SPLIT_LINE_STATE::NORMAL;
                 }
                 else
Index: code/trunk/src/libraries/util/SubString.h
===================================================================
--- code/trunk/src/libraries/util/SubString.h	(revision 11052)
+++ code/trunk/src/libraries/util/SubString.h	(revision 11071)
@@ -102,13 +102,13 @@
     {
         /// An enumerator for the internal state of the parser
-        enum SPLIT_LINE_STATE
+        enum class SPLIT_LINE_STATE
         {
-            SL_NORMAL,            //!< Normal state
-            SL_ESCAPE,            //!< After an escape character
-            SL_SAFEMODE,          //!< In safe mode (usually between quotation marks).
-            SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
-            SL_COMMENT,           //!< In Comment mode.
-            SL_PARENTHESES,       //!< Between parentheses (usually '{' and '}')
-            SL_PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing parenthesis character.
+            NORMAL,            //!< Normal state
+            ESCAPE,            //!< After an escape character
+            SAFEMODE,          //!< In safe mode (usually between quotation marks).
+            SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
+            COMMENT,           //!< In Comment mode.
+            PARENTHESES,       //!< Between parentheses (usually '{' and '}')
+            PARENTHESESESCAPE, //!< Between parentheses with the internal escape character, that escapes even the closing parenthesis character.
         };
 
@@ -204,5 +204,5 @@
                                           bool bRemoveParenthesisChars = true,
                                           char commentChar = '\0',
-                                          SPLIT_LINE_STATE start_state = SL_NORMAL);
+                                          SPLIT_LINE_STATE start_state = SPLIT_LINE_STATE::NORMAL);
 
         std::vector<std::string>  tokens_;              ///< The tokens after splitting the input line
Index: code/trunk/src/libraries/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/libraries/util/UtilPrereqs.h	(revision 11052)
+++ code/trunk/src/libraries/util/UtilPrereqs.h	(revision 11071)
@@ -37,4 +37,5 @@
 
 #include "OrxonoxConfig.h"
+#include <string>
 
 //-----------------------------------------------------------------------
@@ -80,6 +81,4 @@
     class OutputStream;
     class ScopeListener;
-    template <class T>
-    class SharedPtr;
     class SignalHandler;
     template <class T>
Index: code/trunk/src/libraries/util/output/BaseWriter.cc
===================================================================
--- code/trunk/src/libraries/util/output/BaseWriter.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/BaseWriter.cc	(revision 11071)
@@ -47,5 +47,5 @@
         this->configurableMaxLevel_ = level::none;
         this->configurableAdditionalContextsMaxLevel_ = level::verbose;
-        this->configurableAdditionalContexts_.push_back("example");
+        this->configurableAdditionalContexts_.emplace_back("example");
 
         this->changedConfigurableLevel();
@@ -116,8 +116,6 @@
 
         // iterate over all strings in the config-vector
-        for (size_t i = 0; i < this->configurableAdditionalContexts_.size(); ++i)
+        for (const std::string& full_name : this->configurableAdditionalContexts_)
         {
-            const std::string& full_name = this->configurableAdditionalContexts_[i];
-
             // split the name into main-name and sub-name (if given; otherwise sub-name remains empty). both names are separated by ::
             std::string name = full_name;
Index: code/trunk/src/libraries/util/output/BaseWriter.h
===================================================================
--- code/trunk/src/libraries/util/output/BaseWriter.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/BaseWriter.h	(revision 11071)
@@ -103,5 +103,5 @@
 
         protected:
-            virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines);
+            virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines) override;
 
         private:
Index: code/trunk/src/libraries/util/output/ConsoleWriter.h
===================================================================
--- code/trunk/src/libraries/util/output/ConsoleWriter.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/ConsoleWriter.h	(revision 11071)
@@ -53,5 +53,4 @@
         public:
             ConsoleWriter(std::ostream& outputStream);
-            ConsoleWriter(const ConsoleWriter&);
             virtual ~ConsoleWriter();
 
@@ -63,7 +62,11 @@
 
         protected:
-            virtual void printLine(const std::string& line, OutputLevel level);
+            virtual void printLine(const std::string& line, OutputLevel level) override;
 
         private:
+            // non-copyable:
+            ConsoleWriter(const ConsoleWriter&) = delete;
+            ConsoleWriter& operator=(const ConsoleWriter&) = delete;
+
             std::ostream& outputStream_; ///< The ostream to which the console writer writes its output
             bool bEnabled_;              ///< If false, the instance will not write output to the console.
Index: code/trunk/src/libraries/util/output/LogWriter.cc
===================================================================
--- code/trunk/src/libraries/util/output/LogWriter.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/LogWriter.cc	(revision 11071)
@@ -35,4 +35,5 @@
 
 #include <ctime>
+#include <chrono>
 #include <cstdlib>
 
@@ -43,5 +44,5 @@
 namespace orxonox
 {
-    static const int MAX_ARCHIVED_FILES = 9;
+    static constexpr int MAX_ARCHIVED_FILES = 9;
 
     /**
@@ -180,14 +181,20 @@
             return;
 
+        // get the milliseconds
+        std::chrono::system_clock::time_point now = std::chrono::system_clock::now();
+        std::chrono::system_clock::duration timeSinceEpoch = now.time_since_epoch();
+        std::chrono::milliseconds millisSinceEpoch = std::chrono::duration_cast<std::chrono::milliseconds>(timeSinceEpoch);
+        unsigned int millis = (millisSinceEpoch.count() % 1000);
+
         // get the current time
-        time_t rawtime;
-        struct tm* timeinfo;
-        time(&rawtime);
-        timeinfo = localtime(&rawtime);
+        time_t rawtime = std::chrono::system_clock::to_time_t(now);
+        struct tm* timeinfo = localtime(&rawtime);
+
+        // format time: hh:mm:ss:xxx
+        char buffer[13];
+        snprintf(buffer, sizeof(buffer), "%.2i:%.2i:%.2i:%.3i", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec, millis);
 
         // print timestamp and output line to the log file
-        this->file_ << (timeinfo->tm_hour < 10 ? "0" : "") << timeinfo->tm_hour << ':' <<
-                       (timeinfo->tm_min  < 10 ? "0" : "") << timeinfo->tm_min  << ':' <<
-                       (timeinfo->tm_sec  < 10 ? "0" : "") << timeinfo->tm_sec  << ' ' << line << std::endl;
+        this->file_ << buffer << ' ' << line << std::endl;
     }
 }
Index: code/trunk/src/libraries/util/output/LogWriter.h
===================================================================
--- code/trunk/src/libraries/util/output/LogWriter.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/LogWriter.h	(revision 11071)
@@ -57,5 +57,4 @@
         public:
             LogWriter();
-            LogWriter(const LogWriter&);
             virtual ~LogWriter();
 
@@ -70,7 +69,11 @@
 
         protected:
-            virtual void printLine(const std::string& line, OutputLevel level);
+            virtual void printLine(const std::string& line, OutputLevel level) override;
 
         private:
+            // non-copyable:
+            LogWriter(const LogWriter&) = delete;
+            LogWriter& operator=(const LogWriter&) = delete;
+
             void openFile();
             void closeFile();
Index: code/trunk/src/libraries/util/output/MemoryWriter.cc
===================================================================
--- code/trunk/src/libraries/util/output/MemoryWriter.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/MemoryWriter.cc	(revision 11071)
@@ -57,5 +57,5 @@
     void MemoryWriter::output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines)
     {
-        this->messages_.push_back(Message(level, context, lines));
+        this->messages_.emplace_back(level, context, lines);
     }
 
@@ -65,7 +65,6 @@
     void MemoryWriter::resendOutput(OutputListener* listener) const
     {
-        for (size_t i = 0; i < this->messages_.size(); ++i)
+        for (const Message& message : this->messages_)
         {
-            const Message& message = this->messages_[i];
             listener->unfilteredOutput(message.level, *message.context, message.lines);
         }
Index: code/trunk/src/libraries/util/output/MemoryWriter.h
===================================================================
--- code/trunk/src/libraries/util/output/MemoryWriter.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/MemoryWriter.h	(revision 11071)
@@ -68,5 +68,4 @@
         public:
             MemoryWriter();
-            MemoryWriter(const MemoryWriter&);
             virtual ~MemoryWriter();
 
@@ -75,7 +74,11 @@
 
         protected:
-            virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines);
+            virtual void output(OutputLevel level, const OutputContextContainer& context, const std::vector<std::string>& lines) override;
 
         private:
+            // non-copyable:
+            MemoryWriter(const MemoryWriter&) = delete;
+            MemoryWriter& operator=(const MemoryWriter&) = delete;
+
             std::vector<Message> messages_; ///< Stores all output messages from the creation of this instance until disable() is called.
     };
Index: code/trunk/src/libraries/util/output/OutputDefinitions.h
===================================================================
--- code/trunk/src/libraries/util/output/OutputDefinitions.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/OutputDefinitions.h	(revision 11071)
@@ -132,8 +132,8 @@
     namespace context
     {
-        static const OutputContextMask all       = 0xFFFFFFFFFFFFFFFFull; ///< Context mask, all bits set to 1
-        static const OutputContextMask none      = 0x0000000000000000ull; ///< Context mask, all bits set to 0
+        static constexpr OutputContextMask all       = 0xFFFFFFFFFFFFFFFFull; ///< Context mask, all bits set to 1
+        static constexpr OutputContextMask none      = 0x0000000000000000ull; ///< Context mask, all bits set to 0
 
-        static const OutputContextSubID no_subcontext = 0; ///< Used as ID for contexts which are not sub-contexts
+        static constexpr OutputContextSubID no_subcontext = 0; ///< Used as ID for contexts which are not sub-contexts
 
         namespace
Index: code/trunk/src/libraries/util/output/OutputListener.cc
===================================================================
--- code/trunk/src/libraries/util/output/OutputListener.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/OutputListener.cc	(revision 11071)
@@ -111,6 +111,6 @@
         this->levelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedLevelMask(this);
+        for (AdditionalContextListener* listener : this->listeners_)
+            listener->updatedLevelMask(this);
     }
 
@@ -142,6 +142,6 @@
         this->additionalContextsLevelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsLevelMask(this);
+        for (AdditionalContextListener* listener : this->listeners_)
+            listener->updatedAdditionalContextsLevelMask(this);
     }
 
@@ -153,6 +153,6 @@
         this->additionalContextsMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsMask(this);
+        for (AdditionalContextListener* listener : this->listeners_)
+            listener->updatedAdditionalContextsMask(this);
     }
 
Index: code/trunk/src/libraries/util/output/OutputManager.cc
===================================================================
--- code/trunk/src/libraries/util/output/OutputManager.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/OutputManager.cc	(revision 11071)
@@ -41,5 +41,4 @@
 #include "util/Output.h"
 #include "util/StringUtils.h"
-#include "util/SharedPtr.h"
 
 namespace orxonox
@@ -57,7 +56,7 @@
 
         this->isInitialized_ = false;
-        this->memoryWriterInstance_ = 0;
-        this->consoleWriterInstance_ = 0;
-        this->logWriterInstance_ = 0;
+        this->memoryWriterInstance_ = nullptr;
+        this->consoleWriterInstance_ = nullptr;
+        this->logWriterInstance_ = nullptr;
 
         // register 'undefined' context in order to give it always the first context-ID
@@ -81,7 +80,7 @@
     }
 
-    /*static*/ SharedPtr<OutputManager>& OutputManager::Testing::getInstancePointer()
-    {
-        static SharedPtr<OutputManager> instance(new OutputManager());
+    /*static*/ std::shared_ptr<OutputManager>& OutputManager::Testing::getInstancePointer()
+    {
+        static std::shared_ptr<OutputManager> instance(new OutputManager());
         return instance;
     }
@@ -132,6 +131,6 @@
         vectorize(message, '\n', &lines);
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->unfilteredOutput(level, context, lines);
+        for (OutputListener* listener : this->listeners_)
+            listener->unfilteredOutput(level, context, lines);
     }
 
@@ -179,6 +178,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getLevelMask();
+        for (OutputListener* listener : this->listeners_)
+            mask |= listener->getLevelMask();
         this->combinedLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -190,6 +189,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getAdditionalContextsLevelMask();
+        for (OutputListener* listener : this->listeners_)
+            mask |= listener->getAdditionalContextsLevelMask();
         this->combinedAdditionalContextsLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -201,6 +200,6 @@
     {
         this->combinedAdditionalContextsMask_ = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->combinedAdditionalContextsMask_ |= this->listeners_[i]->getAdditionalContextsMask();
+        for (OutputListener* listener : this->listeners_)
+            this->combinedAdditionalContextsMask_ |= listener->getAdditionalContextsMask();
     }
 
Index: code/trunk/src/libraries/util/output/OutputManager.h
===================================================================
--- code/trunk/src/libraries/util/output/OutputManager.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/OutputManager.h	(revision 11071)
@@ -41,4 +41,5 @@
 #include <vector>
 #include <map>
+#include <memory>
 
 #include "OutputDefinitions.h"
@@ -66,5 +67,4 @@
         public:
             OutputManager();
-            OutputManager(const OutputManager&);
             virtual ~OutputManager();
 
@@ -81,9 +81,9 @@
             virtual void unregisterListener(OutputListener* listener);
 
-            virtual void updatedLevelMask(const OutputListener* listener)
+            virtual void updatedLevelMask(const OutputListener* listener) override
                 { this->updateCombinedLevelMask(); }
-            virtual void updatedAdditionalContextsLevelMask(const OutputListener* listener)
+            virtual void updatedAdditionalContextsLevelMask(const OutputListener* listener) override
                 { this->updateCombinedAdditionalContextsLevelMask(); }
-            virtual void updatedAdditionalContextsMask(const OutputListener* listener)
+            virtual void updatedAdditionalContextsMask(const OutputListener* listener) override
                 { this->updateCombinedAdditionalContextsMask(); }
 
@@ -114,4 +114,8 @@
 
         private:
+            // non-copyable:
+            OutputManager(const OutputManager&) = delete;
+            OutputManager& operator=(const OutputManager&) = delete;
+
             void updateMasks();
             void updateCombinedLevelMask();
@@ -137,5 +141,5 @@
             struct _UtilExport Testing
             {
-                static SharedPtr<OutputManager>& getInstancePointer();
+                static std::shared_ptr<OutputManager>& getInstancePointer();
             };
     };
Index: code/trunk/src/libraries/util/output/OutputStream.cc
===================================================================
--- code/trunk/src/libraries/util/output/OutputStream.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/OutputStream.cc	(revision 11071)
@@ -41,7 +41,6 @@
         @brief Default constructor, initializes level and context with default values.
     */
-    OutputStream::OutputStream()
+    OutputStream::OutputStream() : OutputStream(level::debug_output, context::undefined())
     {
-        this->setOutputAttributes(level::debug_output, context::undefined());
     }
 
Index: code/trunk/src/libraries/util/output/SubcontextOutputListener.cc
===================================================================
--- code/trunk/src/libraries/util/output/SubcontextOutputListener.cc	(revision 11052)
+++ code/trunk/src/libraries/util/output/SubcontextOutputListener.cc	(revision 11071)
@@ -79,8 +79,8 @@
 
         // compose the mask of subcontexts and build the set of sub-context-IDs
-        for (std::set<const OutputContextContainer*>::const_iterator it = subcontexts.begin(); it != subcontexts.end(); ++it)
+        for (const OutputContextContainer* subcontext : subcontexts)
         {
-            this->subcontextsCheckMask_ |= (*it)->mask;
-            this->subcontexts_.insert((*it)->sub_id);
+            this->subcontextsCheckMask_ |= subcontext->mask;
+            this->subcontexts_.insert(subcontext->sub_id);
         }
 
Index: code/trunk/src/libraries/util/output/SubcontextOutputListener.h
===================================================================
--- code/trunk/src/libraries/util/output/SubcontextOutputListener.h	(revision 11052)
+++ code/trunk/src/libraries/util/output/SubcontextOutputListener.h	(revision 11071)
@@ -73,8 +73,8 @@
             virtual ~SubcontextOutputListener();
 
-            virtual void setAdditionalContextsMask(OutputContextMask mask);
+            virtual void setAdditionalContextsMask(OutputContextMask mask) override;
             void setAdditionalSubcontexts(const std::set<const OutputContextContainer*>& subcontexts);
 
-            virtual bool acceptsOutput(OutputLevel level, const OutputContextContainer& context) const;
+            virtual bool acceptsOutput(OutputLevel level, const OutputContextContainer& context) const override;
 
             inline const std::set<OutputContextSubID>& getSubcontexts() const
