Index: code/trunk/src/util/Convert.h
===================================================================
--- code/trunk/src/util/Convert.h	(revision 2295)
+++ code/trunk/src/util/Convert.h	(revision 2662)
@@ -460,5 +460,5 @@
             else
               *output = "false";
-            return false;
+            return true;
         }
     };
Index: code/trunk/src/util/Exception.h
===================================================================
--- code/trunk/src/util/Exception.h	(revision 2295)
+++ code/trunk/src/util/Exception.h	(revision 2662)
@@ -82,14 +82,9 @@
                   const char* filename, const char* functionName)                   \
                   : Exception(description, lineNumber, filename, functionName)      \
-        {                                                                           \
-            /* Let the catcher decide whether to display the message below level 4  \
-               Note: Don't place this code in Exception c'tor because getTypeName() \
-               is still pure virtual at that time. */                               \
-            COUT(4) << this->getFullDescription() << std::endl;                     \
-        }                                                                           \
+        { }                                                                         \
                                                                                     \
         ExceptionName##Exception(const std::string& description)                    \
                   : Exception(description)                                          \
-        { COUT(4) << this->getFullDescription() << std::endl; }                     \
+        { }                                                                         \
                                                                                     \
         ~ExceptionName##Exception() throw() { }                                     \
@@ -103,4 +98,6 @@
     CREATE_ORXONOX_EXCEPTION(FileNotFound);
     CREATE_ORXONOX_EXCEPTION(Argument);
+    CREATE_ORXONOX_EXCEPTION(PhysicsViolation);
+    CREATE_ORXONOX_EXCEPTION(ParseError);
     CREATE_ORXONOX_EXCEPTION(PluginsNotFound);
     CREATE_ORXONOX_EXCEPTION(InitialisationFailed);
@@ -111,6 +108,18 @@
 }
 
-#define ThrowException(Type, Description) \
-    throw Type##Exception(Description, __LINE__, __FILE__, __FUNCTIONNAME__)
+    /**
+    @brief
+        Helper function that creates an exception, displays the message, but doesn't throw it.
+    */
+    template <class T>
+    inline const T& InternalHandleException(const T& exception)
+    {
+        // let the catcher decide whether to display the message below level 4
+        COUT(4) << exception.getFullDescription() << std::endl;
+        return exception;
+    }
+
+#define ThrowException(type, description) \
+    throw InternalHandleException(type##Exception(description, __LINE__, __FILE__, __FUNCTIONNAME__))
 
     // define an assert macro that can display a message
Index: code/trunk/src/util/Integers.h
===================================================================
--- code/trunk/src/util/Integers.h	(revision 2295)
+++ code/trunk/src/util/Integers.h	(revision 2662)
@@ -49,6 +49,6 @@
 typedef unsigned __int32  uint32_t;
 typedef unsigned __int64  uint64_t;
-#elif ORXONOX_COMPILER == ORXONOX_COMPILER_GCC
-# include "inttypes.h"
+#else
+# include <inttypes.h>
 #endif
 
Index: code/trunk/src/util/Math.h
===================================================================
--- code/trunk/src/util/Math.h	(revision 2295)
+++ code/trunk/src/util/Math.h	(revision 2662)
@@ -63,13 +63,31 @@
 namespace orxonox
 {
-    typedef Ogre::Radian Radian;
-    typedef Ogre::Degree Degree;
-    typedef Ogre::Vector2 Vector2;
-    typedef Ogre::Vector3 Vector3;
-    typedef Ogre::Vector4 Vector4;
-    typedef Ogre::Matrix3 Matrix3;
-    typedef Ogre::Matrix4 Matrix4;
-    typedef Ogre::Quaternion Quaternion;
-    typedef Ogre::ColourValue ColourValue;
+    using Ogre::Radian;
+    using Ogre::Degree;
+    using Ogre::Vector2;
+    using Ogre::Vector3;
+    using Ogre::Vector4;
+    using Ogre::Matrix3;
+    using Ogre::Matrix4;
+    using Ogre::Quaternion;
+    using Ogre::ColourValue;
+
+    // Also define our own transform space enum
+    namespace TransformSpace
+    {
+        /**
+        @brief
+            Enumeration denoting the spaces which a transform can be relative to.
+        */
+        enum Enum
+        {
+            //! Transform is relative to the local space
+            Local,
+            //! Transform is relative to the space of the parent node
+            Parent,
+            //! Transform is relative to world space
+            World
+        };
+    }
 
     _UtilExport std::ostream& operator<<(std::ostream& out, const orxonox::Radian& radian);
@@ -174,6 +192,8 @@
     inline T zeroise()
     {
-        BOOST_STATIC_ASSERT(sizeof(T) == 0);
-        return T();
+        // Default, raise a compiler error without including large boost header cascade.
+        T temp();
+        *********temp; // If you reach this code, you abused zeroise()!
+        return temp;
     }
 
Index: code/trunk/src/util/MultiType.cc
===================================================================
--- code/trunk/src/util/MultiType.cc	(revision 2295)
+++ code/trunk/src/util/MultiType.cc	(revision 2662)
@@ -45,4 +45,6 @@
         switch (type)
         {
+            case MT_null:
+                this->reset(); return true;
             case MT_char:
                 return this->convert<char>(); break;
Index: code/trunk/src/util/MultiType.h
===================================================================
--- code/trunk/src/util/MultiType.h	(revision 2295)
+++ code/trunk/src/util/MultiType.h	(revision 2662)
@@ -305,9 +305,11 @@
 
             /** @brief Current content gets deleted. New type is MT_null */
-            inline void                       reset()                         { if (this->value_) this->value_->reset(); }
-
-            template <typename T> inline void setType()                       { this->assignValue(T());                            } /** @brief Resets the value and changes the internal type to T. */
-            inline void                       setType(const MultiType& other) { this->setType(other.getType());                    } /** @brief Resets the value and changes the internal type to the type of the other MultiType. */
-            inline void                       setType(MT_Type type)           { this->reset(); this->convert(type); this->reset(); } /** @brief Resets the value and changes the internal type to the given type. */
+            inline void                       reset()                         { if (this->value_) delete this->value_; this->value_ = 0; }
+            /** @brief Current content gets overridden with default zero value */
+            inline void                       resetValue()                    { if (this->value_) this->value_->reset(); }
+
+            template <typename T> inline void setType()                       { this->assignValue(T());                                 } /** @brief Resets the value and changes the internal type to T. */
+            inline void                       setType(const MultiType& other) { this->setType(other.getType());                         } /** @brief Resets the value and changes the internal type to the type of the other MultiType. */
+            inline void                       setType(MT_Type type)           { this->reset(); this->convert(type); this->resetValue(); } /** @brief Resets the value and changes the internal type to the given type. */
 
             /** @brief Returns the current type. */
Index: code/trunk/src/util/OrxEnum.h
===================================================================
--- code/trunk/src/util/OrxEnum.h	(revision 2662)
+++ code/trunk/src/util/OrxEnum.h	(revision 2662)
@@ -0,0 +1,67 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+    Declaration of the OrxEnum class.
+*/
+
+#ifndef _OrxEnum_H__
+#define _OrxEnum_H__
+
+#include "UtilPrereqs.h"
+
+namespace orxonox
+{
+    template <class T>
+    struct OrxEnum
+    {
+        public:
+            OrxEnum() { }
+            OrxEnum(int type)                  { type_ = type; }
+            OrxEnum(const T& instance)   { type_ = instance.type_; }
+
+            operator int()                     { return type_; }
+            T& operator =(int type)      { type_ = type; return *this; }
+            bool operator <(const T& right) const { return (type_ < right.type_); }
+            bool operator >(const T& right) const { return (type_ > right.type_); }
+
+        private:
+            OrxEnum(const OrxEnum& instance);
+            int type_;
+    };
+}
+
+#define OrxEnumConstructors(enumName)                        \
+enumName() { }                                               \
+enumName(int type) : OrxEnum<enumName>(type)             { } \
+enumName(const enumName& inst) : OrxEnum<enumName>(inst) { } \
+void dummyFunction()
+
+#endif /* _OrxEnum_H__ */
Index: code/trunk/src/util/OutputHandler.cc
===================================================================
--- code/trunk/src/util/OutputHandler.cc	(revision 2295)
+++ code/trunk/src/util/OutputHandler.cc	(revision 2662)
@@ -100,8 +100,13 @@
         @param buffer The OutputBuffer
     */
-    void OutputHandler::setOutputBuffer(OutputBuffer& buffer)
-    {
-        buffer.getStream() >> this->outputBuffer_->getStream().rdbuf();
-        this->outputBuffer_ = &buffer;
+    void OutputHandler::setOutputBuffer(OutputBuffer* buffer)
+    {
+        if (buffer == NULL)
+            this->outputBuffer_ = &this->fallbackBuffer_;
+        else
+        {
+            buffer->getStream() >> this->outputBuffer_->getStream().rdbuf();
+            this->outputBuffer_ = buffer;
+        }
     }
 
Index: code/trunk/src/util/OutputHandler.h
===================================================================
--- code/trunk/src/util/OutputHandler.h	(revision 2295)
+++ code/trunk/src/util/OutputHandler.h	(revision 2662)
@@ -101,5 +101,5 @@
             static int getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All);
 
-            void setOutputBuffer(OutputBuffer& buffer);
+            void setOutputBuffer(OutputBuffer* buffer);
 
             template <class T>
Index: code/trunk/src/util/SignalHandler.cc
===================================================================
--- code/trunk/src/util/SignalHandler.cc	(revision 2295)
+++ code/trunk/src/util/SignalHandler.cc	(revision 2662)
@@ -35,5 +35,4 @@
 #include "Debug.h"
 
-#include <cassert>
 #include <iostream>
 #include <cstdlib>
@@ -42,5 +41,5 @@
 namespace orxonox
 {
-    SignalHandler * SignalHandler::singletonRef = NULL;
+    SignalHandler* SignalHandler::singletonRef_s = NULL;
 }
 
@@ -55,8 +54,4 @@
 {
     bool SignalHandler::bXAutoKeyRepeatOn_ = false;
-
-    SignalHandler::SignalHandler()
-    {
-    }
 
     /**
@@ -133,5 +128,5 @@
     void SignalHandler::sigHandler( int sig )
     {
-      for ( SignalCallbackList::iterator it = SignalHandler::getInstance()->callbackList.begin(); it != SignalHandler::getInstance()->callbackList.end(); it++  )
+      for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++  )
       {
         (*(it->cb))( it->someData );
@@ -184,5 +179,5 @@
       if ( sigPid == 0 )
       {
-        getInstance()->dontCatch();
+        getInstance().dontCatch();
         // wait for message from parent when it has attached gdb
         int someData;
@@ -237,5 +232,5 @@
 
       char cmd[256];
-      snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance()->appName.c_str(), sigPid );
+      snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance().appName.c_str(), sigPid );
       write( gdbIn[1], cmd, strlen(cmd) );
 
@@ -331,9 +326,9 @@
       bt.insert(0, timeString);
 
-      FILE * f = fopen( getInstance()->filename.c_str(), "a" );
+      FILE * f = fopen( getInstance().filename.c_str(), "a" );
 
       if ( !f )
       {
-        perror( ( std::string( "could not append to " ) + getInstance()->filename ).c_str() );
+        perror( ( std::string( "could not append to " ) + getInstance().filename ).c_str() );
         exit(EXIT_FAILURE);
       }
@@ -341,5 +336,5 @@
       if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() )
       {
-        COUT(0) << "could not write " << bt.length() << " byte to " << getInstance()->filename << std::endl;
+        COUT(0) << "could not write " << bt.length() << " byte to " << getInstance().filename << std::endl;
         exit(EXIT_FAILURE);
       }
Index: code/trunk/src/util/SignalHandler.h
===================================================================
--- code/trunk/src/util/SignalHandler.h	(revision 2295)
+++ code/trunk/src/util/SignalHandler.h	(revision 2662)
@@ -37,4 +37,5 @@
 #include "UtilPrereqs.h"
 
+#include <cassert>
 #include <list>
 #include <string>
@@ -68,9 +69,8 @@
     class SignalHandler
     {
-    private:
-        SignalHandler();
     public:
-        inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }
-        ~SignalHandler(){ SignalHandler::singletonRef = NULL; }
+        SignalHandler()  { assert(SignalHandler::singletonRef_s == 0); SignalHandler::singletonRef_s = this; }
+        ~SignalHandler() { assert(SignalHandler::singletonRef_s != 0); SignalHandler::singletonRef_s = NULL; }
+        inline static SignalHandler& getInstance() { assert(SignalHandler::singletonRef_s); return *SignalHandler::singletonRef_s; }
 
         void registerCallback( SignalCallback cb, void * someData );
@@ -87,5 +87,5 @@
         SignalCallbackList callbackList;
 
-        static SignalHandler * singletonRef;
+        static SignalHandler* singletonRef_s;
 
         std::string appName;
@@ -104,11 +104,13 @@
     {
     public:
-        inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; };
-        void doCatch( const std::string & appName, const std::string & filename ) {};
-        void dontCatch() {};
-        void registerCallback( SignalCallback cb, void * someData ) {};
+        SignalHandler()  { assert(SignalHandler::singletonRef_s == 0); SignalHandler::singletonRef_s = this; }
+        ~SignalHandler() { assert(SignalHandler::singletonRef_s != 0); SignalHandler::singletonRef_s = 0; }
+        inline static SignalHandler& getInstance() { assert(SignalHandler::singletonRef_s); return *SignalHandler::singletonRef_s; }
+        void doCatch( const std::string & appName, const std::string & filename ) {}
+        void dontCatch() {}
+        void registerCallback( SignalCallback cb, void * someData ) {}
 
     private:
-        static SignalHandler * singletonRef;
+        static SignalHandler* singletonRef_s;
     };
 }
Index: code/trunk/src/util/String.cc
===================================================================
--- code/trunk/src/util/String.cc	(revision 2295)
+++ code/trunk/src/util/String.cc	(revision 2662)
@@ -84,5 +84,5 @@
     {
         size_t pos1 = 0;
-        int pos2 = str.size() - 1;
+        int pos2 = (int)(str.size() - 1);
         for (; pos1 < str.size() && (str[pos1] == ' ' || str[pos1] == '\t' || str[pos1] == '\n'); pos1++);
         for (; pos2 > 0         && (str[pos2] == ' ' || str[pos2] == '\t' || str[pos2] == '\n'); pos2--);
Index: code/trunk/src/util/mbool.h
===================================================================
--- code/trunk/src/util/mbool.h	(revision 2295)
+++ code/trunk/src/util/mbool.h	(revision 2662)
@@ -36,4 +36,5 @@
     struct _UtilExport mbool
     {
+//        friend Synchronisable::registerVariable<>()
         public:
             inline mbool(bool value = false)
@@ -67,4 +68,6 @@
             inline bool operator!() const
                 { return (!this->value_.bool_); }
+            
+            inline unsigned char& getMemory(){ return value_.memory_; }
 
         private:
