Index: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/CMakeLists.txt	(revision 3196)
@@ -22,7 +22,5 @@
 # various macro includes
 INCLUDE(FlagUtilities)
-INCLUDE(GenerateToluaBindings)
-INCLUDE(InstallUtilities)
-INCLUDE(SourceFileUtilities)
+INCLUDE(TargetUtilities)
 
 # Use TinyXML++
@@ -31,5 +29,8 @@
 ADD_COMPILER_FLAGS("-DOIS_DYNAMIC_LIB")
 # Tolua binding speedup if required
-ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" Release MinSizeRel TOLUA_PARSER_RELEASE)
+ADD_COMPILER_FLAGS("-DTOLUA_RELEASE" ORXONOX_RELEASE)
+
+# Default linking is SHARED
+SET(ORXONOX_DEFAULT_LINK SHARED)
 
 ################ OrxonoxConfig.h ################
@@ -76,5 +77,5 @@
 
 SET(GENERATED_FILE_COMMENT
-   "DO NOT EDIT THIS FILE!
+   "DO NOT EDIT THIS FILE! <br>
     It has been automatically generated by CMake from OrxonoxConfig.h.in")
 # Copy and configure OrxonoxConfig which gets included in every file
@@ -83,4 +84,10 @@
 CONFIGURE_FILE(SpecialConfig.h.in ${CMAKE_CURRENT_BINARY_DIR}/SpecialConfig.h)
 
+SET(ORXONOX_CONFIG_FILES
+  ${CMAKE_CURRENT_BINARY_DIR}/OrxonoxConfig.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/OrxonoxConfig.h.in
+  ${CMAKE_CURRENT_BINARY_DIR}/SpecialConfig.h
+  ${CMAKE_CURRENT_SOURCE_DIR}/SpecialConfig.h.in
+)
 
 ############## Include Directories ##############
@@ -101,4 +108,5 @@
   ${DIRECTX_INCLUDE_DIR}
   ${ZLIB_INCLUDE_DIR}
+  ${VLD_INCLUDE_DIR}
 
   # All library includes are prefixed with the path to avoid conflicts
@@ -145,6 +153,2 @@
 ADD_SUBDIRECTORY(network)
 ADD_SUBDIRECTORY(orxonox)
-
-# Apply version info
-SET_TARGET_PROPERTIES(util core network orxonox
-  PROPERTIES VERSION ${ORXONOX_VERSION})
Index: code/trunk/src/OrxonoxConfig.h.in
===================================================================
--- code/trunk/src/OrxonoxConfig.h.in	(revision 3110)
+++ code/trunk/src/OrxonoxConfig.h.in	(revision 3196)
@@ -34,10 +34,10 @@
 
 /**
- @file
- @brief
+@file
+@brief
     Various constants for compiler, architecture and platform.
-
+@remarks
     @GENERATED_FILE_COMMENT@
- */
+*/
 
 #ifndef _OrxonoxConfig_H__
@@ -52,5 +52,5 @@
 #cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
 
-/* Determine compiler and set ORXONOX_COMP_VER */
+// Determine compiler and set ORXONOX_COMP_VER
 #if defined( _MSC_VER )
 #  define ORXONOX_COMPILER_MSVC
@@ -75,13 +75,13 @@
 #endif
 
-/* Endianness */
+// Endianness
 #cmakedefine ORXONOX_BIG_ENDIAN
 #cmakedefine ORXONOX_LITTLE_ENDIAN
 
-/* Architecture */
+// Architecture
 #cmakedefine ORXONOX_ARCH_32
 #cmakedefine ORXONOX_ARCH_64
 
-/* See if we can use __forceinline or if we need to use __inline instead */
+// See if we can use __forceinline or if we need to use __inline instead
 #cmakedefine HAVE_FORCEINLINE
 #ifndef FORCEINLINE
@@ -93,5 +93,5 @@
 #endif
 
-/* Try to define function information */
+// Try to define function information
 #ifndef __FUNCTIONNAME__
 #  ifdef ORXONOX_COMPILER_BORLAND
@@ -115,5 +115,7 @@
 #define ORXONOX_VERSION_NAME "@ORXONOX_VERSION_NAME@"
 
-#define ORXONOX_VERSION ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
+//! Defines version info encoded as 0xMMIIPP (M: Major version, I: Minor version, P: Patch version, all as hex)
+#define ORXONOX_VERSION \
+    ((ORXONOX_VERSION_MAJOR << 16) | (ORXONOX_VERSION_MINOR << 8) | ORXONOX_VERSION_PATCH)
 
 
@@ -123,10 +125,9 @@
 #ifdef ORXONOX_PLATFORM_UNIX
 
-/* TODO: Check what this actually is and whether we need it or not */
+// TODO: Check what this actually is and whether we need it or not
 #if 0
 #  ifdef ORXONOX_PLATFORM_APPLE
 #    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
-#  else
-/* ORXONOX_PLATFORM_LINUX */
+#  else // ORXONOX_PLATFORM_LINUX
 #    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
 #  endif
@@ -142,17 +143,18 @@
 
 /*---------------------------------
- * Special Macros
- *-------------------------------*/
-#define MACRO_CONCATENATE_AUX(a, b) a##b
-#define MACRO_CONCATENATE(a, b) MACRO_CONCATENATE_AUX(a, b)
-#define MACRO_QUOTEME_AUX(x) #x
-#define MACRO_QUOTEME(x) MACRO_QUOTEME_AUX(x)
-
-
-/*---------------------------------
- * Includes
- *-------------------------------*/
-/* Define the english written operators like and, or, xor
- * This is C++ standard, but the Microsoft compiler doesn't define them. */
+ * Options
+ *-------------------------------*/
+/**
+@def ORXONOX_RELEASE
+    Enables expensive (build time) optimisations and disables certain features
+*/
+#cmakedefine ORXONOX_RELEASE
+
+
+/*---------------------------------
+ * Includes and Declarations
+ *-------------------------------*/
+// Define the english written operators like and, or, xor
+// This is C++ standard, but the Microsoft compiler doesn't define them.
 #cmakedefine HAVE_ISO646_H
 #ifdef HAVE_ISO646_H
@@ -181,9 +183,18 @@
 */
 
-/* Visual Leak Detector looks for memory leaks */
-#cmakedefine VISUAL_LEAK_DETECTOR_ENABLE
-#ifdef VISUAL_LEAK_DETECTOR_ENABLE
+// Always include the memory leak detector for MSVC except for actual releases
+// Note: Although officially supported, VLD does not work with MSVC 9
+#if defined(ORXONOX_COMPILER_MSVC) && _MSC_VER < 1500 && !defined(ORXONOX_RELEASE)
 #  include <vld.h>
 #endif
 
+// Forward declare the everywhere used std::string
+namespace std
+{
+    template<class _Elem> struct char_traits;
+    template<class _Ty>   class  allocator;
+    template<class _Elem, class _Traits, class _Ax> class basic_string;
+    typedef basic_string<char, char_traits<char>, allocator<char> > string;
+}
+
 #endif /* _OrxonoxConfig_H__ */
Index: code/trunk/src/SpecialConfig.h.in
===================================================================
--- code/trunk/src/SpecialConfig.h.in	(revision 3110)
+++ code/trunk/src/SpecialConfig.h.in	(revision 3196)
@@ -28,12 +28,12 @@
 
 /**
- @file
- @brief
+@file
+@brief
     Various constants and options that only affect very little code.
- @note
+@note
     This is merely to avoid recompiling everything when only a path changes.
-
+@remarks
     @GENERATED_FILE_COMMENT@
- */
+*/
 
 #ifndef _SpecialConfig_H__
@@ -41,54 +41,75 @@
 
 #include "OrxonoxConfig.h"
+#include <boost/preprocessor/stringize.hpp>
 
-/* Set whether we must suffix "ceguilua/" for the CEGUILua.h include */
+/**
+@def CEGUILUA_USE_INTERNAL_LIBRARY
+    Set whether we must suffix "ceguilua/" for the CEGUILua.h include
+*/
 #cmakedefine CEGUILUA_USE_INTERNAL_LIBRARY
 
-/* Defined if a precompiled depdency package was used. We then copy all libraries
-   too when installing. */
+/**
+@def DEPENDENCY_PACKAGE_ENABLE
+    Defined if a precompiled depdency package was used. We then copy all libraries
+    too when installing.
+*/
 #cmakedefine DEPENDENCY_PACKAGE_ENABLE
 
-/* Orxonox either gets installed to the system or just into a folder.
-   The latter uses relative paths. */
+/**
+@def INSTALL_COPYABLE
+    Orxonox either gets installed to the system or just into a folder.
+    The latter uses relative paths.
+*/
 #cmakedefine INSTALL_COPYABLE
 
-/* Using MSVC or XCode IDE */
+/**
+@def CMAKE_CONFIGURATION_TYPES
+    Using MSVC or XCode IDE
+*/
 #cmakedefine CMAKE_CONFIGURATION_TYPES
 
-/* Handle default ConfigValues */
+// Handle default ConfigValues
 namespace orxonox
 {
-    const char* const ORXONOX_RUNTIME_INSTALL_PATH("@ORXONOX_RUNTIME_INSTALL_PATH@");
-    const char* const ORXONOX_MEDIA_INSTALL_PATH  ("@ORXONOX_MEDIA_INSTALL_PATH@");
+    // INSTALLATION PATHS
+    const char ORXONOX_RUNTIME_INSTALL_PATH[] = "@ORXONOX_RUNTIME_INSTALL_PATH@";
+    const char ORXONOX_MEDIA_INSTALL_PATH[]   = "@ORXONOX_MEDIA_INSTALL_PATH@";
     /* Config and Log path might be relative because they could be user and therefore runtime dependent */
-    const char* const ORXONOX_CONFIG_INSTALL_PATH ("@ORXONOX_CONFIG_INSTALL_PATH@");
-    const char* const ORXONOX_LOG_INSTALL_PATH    ("@ORXONOX_LOG_INSTALL_PATH@");
+    const char ORXONOX_CONFIG_INSTALL_PATH[]  = "@ORXONOX_CONFIG_INSTALL_PATH@";
+    const char ORXONOX_LOG_INSTALL_PATH[]     = "@ORXONOX_LOG_INSTALL_PATH@";
 
-    const char* const ORXONOX_MEDIA_DEV_PATH      ("@CMAKE_MEDIA_OUTPUT_DIRECTORY@");
+    // DEVELOPMENT RUN PATHS
+    const char ORXONOX_MEDIA_DEV_PATH[]       = "@CMAKE_MEDIA_OUTPUT_DIRECTORY@";
 #ifdef CMAKE_CONFIGURATION_TYPES
-    const char* const ORXONOX_CONFIG_DEV_PATH     ("@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" MACRO_QUOTEME(CMAKE_BUILD_TYPE));
-    const char* const ORXONOX_LOG_DEV_PATH        ("@CMAKE_LOG_OUTPUT_DIRECTORY@/"    MACRO_QUOTEME(CMAKE_BUILD_TYPE));
+    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@/" BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
+    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@/"    BOOST_PP_STRINGIZE(CMAKE_BUILD_TYPE);
 #else
-    const char* const ORXONOX_CONFIG_DEV_PATH     ("@CMAKE_CONFIG_OUTPUT_DIRECTORY@");
-    const char* const ORXONOX_LOG_DEV_PATH        ("@CMAKE_LOG_OUTPUT_DIRECTORY@");
+    const char ORXONOX_CONFIG_DEV_PATH[]      = "@CMAKE_CONFIG_OUTPUT_DIRECTORY@";
+    const char ORXONOX_LOG_DEV_PATH[]         = "@CMAKE_LOG_OUTPUT_DIRECTORY@";
 #endif
     
     /* OGRE Plugins */
 #ifdef NDEBUG
-    const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_RELEASE@");
+    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_RELEASE@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
+    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
 #  else
-    const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_RELEASE@");
+    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_RELEASE@";
 #  endif
 #else
-    const char* const ORXONOX_OGRE_PLUGINS("@OGRE_PLUGINS_DEBUG@");
+    const char ORXONOX_OGRE_PLUGINS[] = "@OGRE_PLUGINS_DEBUG@";
 #  ifdef DEPENDENCY_PACKAGE_ENABLE
-    const char* const ORXONOX_OGRE_PLUGINS_FOLDER(".");
+    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = ".";
 #  else
-    const char* const ORXONOX_OGRE_PLUGINS_FOLDER("@OGRE_PLUGINS_FOLDER_DEBUG@");
+    const char ORXONOX_OGRE_PLUGINS_FOLDER[] = "@OGRE_PLUGINS_FOLDER_DEBUG@";
 #  endif
 #endif
 }
 
+/**
+@def ORXONOX_USE_WINMAIN
+    Use main() or WinMain()?
+*/
+#cmakedefine ORXONOX_USE_WINMAIN
+
 #endif /* _SpecialConfig_H__ */
Index: code/trunk/src/bullet/CMakeLists.txt
===================================================================
--- code/trunk/src/bullet/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/bullet/CMakeLists.txt	(revision 3196)
@@ -27,16 +27,14 @@
 ADD_SUBDIRECTORY(LinearMath)
 
-GENERATE_SOURCE_GROUPS(${BULLET_FILES})
-
 # No warnings needed from third party libraries
 REMOVE_COMPILER_FLAGS("-W3 -W4" MSVC)
 ADD_COMPILER_FLAGS("-w")
 
-IF(MSVC)
-  ADD_LIBRARY(bullet_orxonox STATIC ${BULLET_FILES})
-ELSE(MSVC)
-  ADD_LIBRARY(bullet_orxonox SHARED ${BULLET_FILES})
-  ORXONOX_INSTALL(bullet_orxonox)
-ENDIF(MSVC)
-
-SET_TARGET_PROPERTIES(bullet_orxonox PROPERTIES VERSION 2.73)
+ORXONOX_ADD_LIBRARY(bullet_orxonox
+  ORXONOX_EXTERNAL
+  NO_DLL_INTERFACE
+  VERSION
+    2.74
+  SOURCE_FILES
+    ${BULLET_FILES}
+)
Index: code/trunk/src/ceguilua/CMakeLists.txt
===================================================================
--- code/trunk/src/ceguilua/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/ceguilua/CMakeLists.txt	(revision 3196)
@@ -75,13 +75,16 @@
 SET(CEGUILUA_LIBRARY ceguilua_orxonox)
 SET(CEGUILUA_LIBRARY ${CEGUILUA_LIBRARY} PARENT_SCOPE)
-ADD_LIBRARY(${CEGUILUA_LIBRARY} SHARED ${CEGUILUA_FILES})
-SET_TARGET_PROPERTIES(${CEGUILUA_LIBRARY} PROPERTIES DEFINE_SYMBOL "CEGUILUA_EXPORTS")
-TARGET_LINK_LIBRARIES(${CEGUILUA_LIBRARY}
-  tolua++_orxonox
-  ${LUA_LIBRARIES}
-  ${CEGUI_LIBRARY}
+ORXONOX_ADD_LIBRARY(${CEGUILUA_LIBRARY}
+  ORXONOX_EXTERNAL
+  NO_SOURCE_GROUPS
+  DEFINE_SYMBOL
+    "CEGUILUA_EXPORTS"
+  VERSION
+    ${CEGUI_VERSION}
+  LINK_LIBRARIES
+    tolua++_orxonox
+    ${LUA_LIBRARIES}
+    ${CEGUI_LIBRARY}
+  SOURCE_FILES
+    ${CEGUILUA_FILES}
 )
-
-SET_TARGET_PROPERTIES(ceguilua_orxonox PROPERTIES VERSION ${CEGUI_VERSION})
-
-ORXONOX_INSTALL(ceguilua_orxonox)
Index: code/trunk/src/core/ArgumentCompletionFunctions.cc
===================================================================
--- code/trunk/src/core/ArgumentCompletionFunctions.cc	(revision 3110)
+++ code/trunk/src/core/ArgumentCompletionFunctions.cc	(revision 3196)
@@ -29,15 +29,13 @@
 #include "ArgumentCompletionFunctions.h"
 
-#include <iostream>
 #include <map>
 #include <boost/version.hpp>
 #include <boost/filesystem.hpp>
 
-#include "CoreIncludes.h"
+#include "util/Convert.h"
+#include "util/String.h"
 #include "Identifier.h"
 #include "ConfigValueContainer.h"
 #include "TclThreadManager.h"
-#include "util/Convert.h"
-#include "util/String.h"
 
 // Boost 1.36 has some issues with deprecated functions that have been omitted
Index: code/trunk/src/core/ArgumentCompletionListElement.h
===================================================================
--- code/trunk/src/core/ArgumentCompletionListElement.h	(revision 3110)
+++ code/trunk/src/core/ArgumentCompletionListElement.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "CorePrereqs.h"
 
+#include <list>
 #include <string>
-#include <list>
-
 
 namespace orxonox
Index: code/trunk/src/core/BaseObject.cc
===================================================================
--- code/trunk/src/core/BaseObject.cc	(revision 3110)
+++ code/trunk/src/core/BaseObject.cc	(revision 3196)
@@ -36,13 +36,14 @@
 #include <tinyxml/tinyxml.h>
 
+#include "util/String.h"
 #include "CoreIncludes.h"
+#include "Event.h"
 #include "EventIncludes.h"
 #include "Functor.h"
-#include "XMLPort.h"
+#include "Iterator.h"
+#include "Template.h"
 #include "XMLFile.h"
 #include "XMLNameListener.h"
-#include "Template.h"
-#include "util/String.h"
-#include "util/mbool.h"
+#include "XMLPort.h"
 
 namespace orxonox
@@ -293,6 +294,6 @@
     void BaseObject::processEvent(Event& event)
     {
-        SetEvent(BaseObject, "activity", setActive, event);
-        SetEvent(BaseObject, "visibility", setVisible, event);
+        ORXONOX_SET_EVENT(BaseObject, "activity", setActive, event);
+        ORXONOX_SET_EVENT(BaseObject, "visibility", setVisible, event);
     }
 
Index: code/trunk/src/core/BaseObject.h
===================================================================
--- code/trunk/src/core/BaseObject.h	(revision 3110)
+++ code/trunk/src/core/BaseObject.h	(revision 3196)
@@ -44,13 +44,13 @@
     }
 
+
+#include "CorePrereqs.h"
+
 #include <map>
-
-#include "CorePrereqs.h"
-
+#include <list>
+
+#include "util/mbool.h"
+#include "OrxonoxClass.h"
 #include "Super.h"
-#include "OrxonoxClass.h"
-#include "XMLIncludes.h"
-#include "Event.h"
-#include "util/mbool.h"
 
 namespace orxonox
Index: code/trunk/src/core/CMakeLists.txt
===================================================================
--- code/trunk/src/core/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/core/CMakeLists.txt	(revision 3196)
@@ -63,26 +63,28 @@
 )
 ADD_SUBDIRECTORY(input)
-GET_ALL_HEADER_FILES(CORE_HDR_FILES)
-SET(CORE_FILES ${CORE_SRC_FILES} ${CORE_HDR_FILES})
 
-GENERATE_SOURCE_GROUPS(${CORE_FILES})
-GENERATE_TOLUA_BINDINGS(Core CORE_FILES INPUTFILES LuaBind.h CommandExecutor.h Game.h)
-
-ADD_LIBRARY(core SHARED ${CORE_FILES})
-
-SET_TARGET_PROPERTIES(core PROPERTIES DEFINE_SYMBOL "CORE_SHARED_BUILD")
-TARGET_LINK_LIBRARIES(core
-  ${OGRE_LIBRARY}
-  ${Boost_THREAD_LIBRARY}
-  ${Boost_FILESYSTEM_LIBRARY}
-  ${Boost_SYSTEM_LIBRARY}
-  ${Boost_DATE_TIME_LIBRARY} # MSVC only
-  ${LUA_LIBRARIES}
-  cpptcl_orxonox
-  ois_orxonox
-  tinyxml++_orxonox
-  tolua++_orxonox
-  util
+ORXONOX_ADD_LIBRARY(core
+  FIND_HEADER_FILES
+  TOLUA_FILES
+    CommandExecutor.h
+    Game.h
+    LuaBind.h
+  DEFINE_SYMBOL
+    "CORE_SHARED_BUILD"
+  PCH_FILE
+    CorePrecompiledHeaders.h
+  LINK_LIBRARIES
+    ${OGRE_LIBRARY}
+    ${Boost_THREAD_LIBRARY}
+    ${Boost_FILESYSTEM_LIBRARY}
+    ${Boost_SYSTEM_LIBRARY}
+    ${Boost_DATE_TIME_LIBRARY} # MSVC only
+    ${LUA_LIBRARIES}
+    cpptcl_orxonox
+    ois_orxonox
+    tinyxml++_orxonox
+    tolua++_orxonox
+    util
+  SOURCE_FILES
+    ${CORE_SRC_FILES}
 )
-
-ORXONOX_INSTALL(core)
Index: code/trunk/src/core/ClassFactory.h
===================================================================
--- code/trunk/src/core/ClassFactory.h	(revision 3110)
+++ code/trunk/src/core/ClassFactory.h	(revision 3196)
@@ -41,7 +41,7 @@
 #include <string>
 
+#include "util/Debug.h"
 #include "Factory.h"
 #include "Identifier.h"
-#include "util/Debug.h"
 
 namespace orxonox
@@ -88,5 +88,5 @@
     */
     template <class T>
-    BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
+    inline BaseObject* ClassFactory<T>::fabricate(BaseObject* creator)
     {
         return ClassFactory<T>::createNewObject(creator);
@@ -98,5 +98,5 @@
     */
     template <class T>
-    T* ClassFactory<T>::createNewObject(BaseObject* creator)
+    inline T* ClassFactory<T>::createNewObject(BaseObject* creator)
     {
         return new T(creator);
Index: code/trunk/src/core/ClassTreeMask.cc
===================================================================
--- code/trunk/src/core/ClassTreeMask.cc	(revision 3110)
+++ code/trunk/src/core/ClassTreeMask.cc	(revision 3196)
@@ -34,5 +34,4 @@
 #include "ClassTreeMask.h"
 #include "Identifier.h"
-#include "BaseObject.h"
 
 namespace orxonox
Index: code/trunk/src/core/ClassTreeMask.h
===================================================================
--- code/trunk/src/core/ClassTreeMask.h	(revision 3110)
+++ code/trunk/src/core/ClassTreeMask.h	(revision 3196)
@@ -75,7 +75,6 @@
 #include <list>
 #include <stack>
-
+#include "BaseObject.h"
 #include "Iterator.h"
-#include "BaseObject.h"
 
 namespace orxonox
Index: code/trunk/src/core/Clock.cc
===================================================================
--- code/trunk/src/core/Clock.cc	(revision 3110)
+++ code/trunk/src/core/Clock.cc	(revision 3196)
@@ -57,5 +57,5 @@
         tickTime_ = storedTime_ + timersTime;
         tickDt_ = timersTime - lastTimersTime_;
-        tickDtFloat_ = (float)tickDt_ / 1000000.0f;
+        tickDtFloat_ = static_cast<float>(tickDt_) / 1000000.0f;
 
         if (timersTime > 0x7FFFFFF0)
Index: code/trunk/src/core/Clock.h
===================================================================
--- code/trunk/src/core/Clock.h	(revision 3110)
+++ code/trunk/src/core/Clock.h	(revision 3196)
@@ -39,5 +39,5 @@
 
 #include "CorePrereqs.h"
-#include <OgrePrerequisites.h>
+#include "util/OgreForwardRefs.h"
 
 namespace orxonox
@@ -53,9 +53,9 @@
         unsigned long long getMicroseconds()   const { return tickTime_; }
         unsigned long long getMilliseconds()   const { return tickTime_ / 1000; }
-        int                getSeconds()        const { return tickTime_ / 1000000; }
-        float              getSecondsPrecise() const { return (float)tickTime_ / 1000000.0f; }
+        unsigned long      getSeconds()        const { return static_cast<long> (tickTime_ / 1000000); }
+        float              getSecondsPrecise() const { return static_cast<float>(tickTime_ / 1000000.0f); }
 
         float              getDeltaTime()      const { return tickDtFloat_; }
-        int                getDeltaTimeMicroseconds() const { return tickDt_; }
+        long               getDeltaTimeMicroseconds() const { return tickDt_; }
 
         unsigned long long getRealMicroseconds() const;
@@ -67,5 +67,5 @@
         unsigned long long storedTime_;
         unsigned long long tickTime_;
-        int                tickDt_;
+        long               tickDt_;
         float              tickDtFloat_;
         unsigned long      lastTimersTime_;
Index: code/trunk/src/core/CommandEvaluation.cc
===================================================================
--- code/trunk/src/core/CommandEvaluation.cc	(revision 3110)
+++ code/trunk/src/core/CommandEvaluation.cc	(revision 3196)
@@ -28,8 +28,9 @@
 
 #include "CommandEvaluation.h"
+
+#include "util/Debug.h"
+#include "util/String.h"
 #include "ConsoleCommand.h"
 #include "Identifier.h"
-#include "util/Debug.h"
-#include "util/String.h"
 
 namespace orxonox
Index: code/trunk/src/core/CommandExecutor.cc
===================================================================
--- code/trunk/src/core/CommandExecutor.cc	(revision 3110)
+++ code/trunk/src/core/CommandExecutor.cc	(revision 3196)
@@ -28,7 +28,8 @@
 
 #include "CommandExecutor.h"
+
+#include "util/Debug.h"
+#include "util/String.h"
 #include "ConsoleCommand.h"
-#include "util/String.h"
-#include "util/Debug.h"
 #include "Identifier.h"
 #include "Language.h"
Index: code/trunk/src/core/CommandExecutor.h
===================================================================
--- code/trunk/src/core/CommandExecutor.h	(revision 3110)
+++ code/trunk/src/core/CommandExecutor.h	(revision 3196)
@@ -33,5 +33,8 @@
 
 #include <map>
+#include <set>
+#include <string>
 
+#include "util/MultiType.h"
 #include "CommandEvaluation.h"
 
Index: code/trunk/src/core/CommandLine.cc
===================================================================
--- code/trunk/src/core/CommandLine.cc	(revision 3110)
+++ code/trunk/src/core/CommandLine.cc	(revision 3196)
@@ -30,4 +30,8 @@
 
 #include <boost/filesystem.hpp>
+
+#include "util/Convert.h"
+#include "util/Debug.h"
+#include "util/Exception.h"
 #include "util/String.h"
 #include "util/SubString.h"
Index: code/trunk/src/core/CommandLine.h
===================================================================
--- code/trunk/src/core/CommandLine.h	(revision 3110)
+++ code/trunk/src/core/CommandLine.h	(revision 3196)
@@ -31,8 +31,7 @@
 
 #include "CorePrereqs.h"
+
 #include <map>
-#include "util/Convert.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
 #include "util/MultiType.h"
 
Index: code/trunk/src/core/ConfigFileManager.cc
===================================================================
--- code/trunk/src/core/ConfigFileManager.cc	(revision 3110)
+++ code/trunk/src/core/ConfigFileManager.cc	(revision 3196)
@@ -29,8 +29,8 @@
 #include "ConfigFileManager.h"
 
-#include <cassert>
 #include <boost/filesystem.hpp>
 
 #include "util/Convert.h"
+#include "util/Math.h"
 #include "util/String.h"
 #include "ConsoleCommand.h"
@@ -312,5 +312,5 @@
                                 // There might be an array index
                                 unsigned int index = 0;
-                                if (ConvertValue(&index, line.substr(pos2 + 1, pos3 - pos2 - 1)))
+                                if (convertValue(&index, line.substr(pos2 + 1, pos3 - pos2 - 1)))
                                 {
                                     // New array
Index: code/trunk/src/core/ConfigFileManager.h
===================================================================
--- code/trunk/src/core/ConfigFileManager.h	(revision 3110)
+++ code/trunk/src/core/ConfigFileManager.h	(revision 3196)
@@ -32,10 +32,9 @@
 #include "CorePrereqs.h"
 
-#include <iostream>
+#include <cassert>
 #include <string>
 #include <list>
 #include <map>
 
-#include "util/Math.h"
 #include "util/OrxEnum.h"
 
Index: code/trunk/src/core/ConfigValueContainer.cc
===================================================================
--- code/trunk/src/core/ConfigValueContainer.cc	(revision 3110)
+++ code/trunk/src/core/ConfigValueContainer.cc	(revision 3196)
@@ -34,12 +34,7 @@
 #include "ConfigValueContainer.h"
 
-#include <fstream>
-
+#include "util/Convert.h"
 #include "util/SubString.h"
-#include "util/Convert.h"
 #include "Language.h"
-#include "Identifier.h"
-
-
 
 namespace orxonox
@@ -303,5 +298,5 @@
 
         if (token.size() > 0)
-            success = ConvertValue(&index, token[0]);
+            success = convertValue(&index, token[0]);
 
         if (!success || index < 0 || index > (signed int)MAX_VECTOR_INDEX)
Index: code/trunk/src/core/ConfigValueContainer.h
===================================================================
--- code/trunk/src/core/ConfigValueContainer.h	(revision 3110)
+++ code/trunk/src/core/ConfigValueContainer.h	(revision 3196)
@@ -49,5 +49,4 @@
 #include <vector>
 
-#include "util/Math.h"
 #include "util/MultiType.h"
 #include "ConfigFileManager.h"
Index: code/trunk/src/core/ConsoleCommand.h
===================================================================
--- code/trunk/src/core/ConsoleCommand.h	(revision 3110)
+++ code/trunk/src/core/ConsoleCommand.h	(revision 3196)
@@ -32,8 +32,8 @@
 #include "CorePrereqs.h"
 
+#include "ArgumentCompletionFunctions.h"
+#include "CommandExecutor.h"
 #include "Executor.h"
 #include "Identifier.h"
-#include "CommandExecutor.h"
-#include "ArgumentCompletionFunctions.h"
 
 
Index: code/trunk/src/core/ConsoleCommandCompilation.cc
===================================================================
--- code/trunk/src/core/ConsoleCommandCompilation.cc	(revision 3110)
+++ code/trunk/src/core/ConsoleCommandCompilation.cc	(revision 3196)
@@ -28,7 +28,12 @@
 
 #include "ConsoleCommandCompilation.h"
-#include "ConsoleCommand.h"
+
+#include <fstream>
+#include <set>
+#include <string>
+
 #include "util/Debug.h"
 #include "util/ExprParser.h"
+#include "ConsoleCommand.h"
 
 namespace orxonox
@@ -165,5 +170,5 @@
                 COUT(2) << "Warning: Expression could not be parsed to the end! Remains: '" << expr.getRemains() << "'" << std::endl;
             }
-            return expr.getResult();
+            return static_cast<float>(expr.getResult());
         }
         else
Index: code/trunk/src/core/ConsoleCommandCompilation.h
===================================================================
--- code/trunk/src/core/ConsoleCommandCompilation.h	(revision 3110)
+++ code/trunk/src/core/ConsoleCommandCompilation.h	(revision 3196)
@@ -32,6 +32,4 @@
 #include "CorePrereqs.h"
 
-#include <string>
-
 namespace orxonox
 {
Index: code/trunk/src/core/Core.cc
===================================================================
--- code/trunk/src/core/Core.cc	(revision 3110)
+++ code/trunk/src/core/Core.cc	(revision 3196)
@@ -29,6 +29,7 @@
 
 /**
-    @file
-    @brief Implementation of the Core class.
+@file
+@brief
+    Implementation of the Core singleton with its global variables (avoids boost include)
 */
 
@@ -81,4 +82,5 @@
     static boost::filesystem::path logPath_g;                   //!< Path to the log file folder
 
+    //! Static pointer to the singleton
     Core* Core::singletonRef_s  = 0;
 
@@ -365,5 +367,5 @@
         if (!bInitialized && this->bInitializeRandomNumberGenerator_)
         {
-            srand(time(0));
+            srand(static_cast<unsigned int>(time(0)));
             rand();
             bInitialized = true;
@@ -472,4 +474,6 @@
         If found it means that this is not an installed run, hence we
         don't write the logs and config files to ~/.orxonox
+    @throws
+        GeneralException
     */
     void Core::checkDevBuild()
@@ -532,12 +536,12 @@
         Checks for the log and the config directory and creates them
         if necessary. Otherwise me might have problems opening those files.
+    @throws
+        orxonox::GeneralException if the directory to be created is a file.
     */
     void Core::createDirectories()
     {
         std::vector<std::pair<boost::filesystem::path, std::string> > directories;
-        directories.push_back(std::pair<boost::filesystem::path, std::string>
-            (boost::filesystem::path(configPath_g), "config"));
-        directories.push_back(std::pair<boost::filesystem::path, std::string>
-            (boost::filesystem::path(logPath_g),    "log"));
+        directories.push_back(std::make_pair(boost::filesystem::path(configPath_g), "config"));
+        directories.push_back(std::make_pair(boost::filesystem::path(logPath_g), "log"));
 
         for (std::vector<std::pair<boost::filesystem::path, std::string> >::iterator it = directories.begin();
Index: code/trunk/src/core/Core.h
===================================================================
--- code/trunk/src/core/Core.h	(revision 3110)
+++ code/trunk/src/core/Core.h	(revision 3196)
@@ -29,7 +29,8 @@
 
 /**
-    @file
-    @brief Declaration of the Core class.
-
+@file
+@brief
+    Declaration of the Core class.
+@details
     The Core class is a singleton, only used to configure some variables
     in the core through the config-file.
@@ -45,18 +46,23 @@
 #include "util/OutputHandler.h"
 
-// boost::filesystem header has quite a large tail, use forward declaration
-namespace boost { namespace filesystem
-{
-    struct path_traits;
-    template<class String, class Traits> class basic_path;
-    typedef basic_path< std::string, path_traits> path;
-} }
-
 namespace orxonox
 {
-    //! The Core class is a singleton, only used to configure some config-values.
+    /**
+    @brief
+        The Core class is a singleton used to configure the program basics.
+    @details
+        The class provides information about the media, config and log path.
+        It determines those by the use of platform specific functions.
+    */
     class _CoreExport Core : public OrxonoxClass
     {
         public:
+            /**
+            @brief
+                Determines the executable path, checks for build directory runs, creates
+                the output directories and sets up the other core library singletons.
+            @throws
+                GeneralException
+            */
             Core();
             ~Core();
@@ -76,13 +82,19 @@
             static void tsetMediaPath(const std::string& path)
             { assert(singletonRef_s); singletonRef_s->_tsetMediaPath(path); }
+            //! Returns the path to the config files as boost::filesystem::path
             static const boost::filesystem::path& getMediaPath();
+            //! Returns the path to the config files as boost::filesystem::path
             static const boost::filesystem::path& getConfigPath();
+            //! Returns the path to the log files as boost::filesystem::path
             static const boost::filesystem::path& getLogPath();
+            //! Returns the path to the data files as std::string
             static std::string getMediaPathString();
+            //! Returns the path to the config files as std::string
             static std::string getConfigPathString();
+            //! Returns the path to the log files as std::string
             static std::string getLogPathString();
 
         private:
-            Core(const Core&);
+            Core(const Core&); //!< Don't use (undefined symbol)
 
             void checkDevBuild();
Index: code/trunk/src/core/CoreIncludes.h
===================================================================
--- code/trunk/src/core/CoreIncludes.h	(revision 3110)
+++ code/trunk/src/core/CoreIncludes.h	(revision 3196)
@@ -43,9 +43,9 @@
 #include "CorePrereqs.h"
 
+#include "util/Debug.h"
 #include "Identifier.h"
 #include "Factory.h"
 #include "ClassFactory.h"
-#include "Functor.h"
-#include "util/Debug.h"
+#include "ObjectList.h"
 
 
@@ -129,11 +129,3 @@
     orxonox::Factory::getIdentifier(networkID)
 
-/**
-    @brief Registers a member function as callback when an object of 'type' is created.
-    @param
-*/
-#define RegisterConstructionCallback(ThisClassName, TargetClassName, FunctionName) \
-    orxonox::ClassIdentifier<TargetClassName>::getIdentifier()->addConstructionCallback( \
-        orxonox::createFunctor(&ThisClassName::FunctionName)->setObject(this))
-
 #endif /* _CoreIncludes_H__ */
Index: code/trunk/src/core/CorePrecompiledHeaders.h
===================================================================
--- code/trunk/src/core/CorePrecompiledHeaders.h	(revision 3196)
+++ code/trunk/src/core/CorePrecompiledHeaders.h	(revision 3196)
@@ -0,0 +1,81 @@
+/*
+ *   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
+    Compilation of the most often used header files in the core library for MSVC
+*/
+
+#include "CorePrereqs.h"
+
+#include <fstream>
+#include <iostream>
+#include <list>
+#include <map>
+#include <set>
+#include <sstream>
+#include <string>
+#include <vector>
+
+
+#ifdef ORXONOX_COMPILER_MSVC
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef max
+#undef min
+
+#include <ois/OISKeyboard.h>
+#include <ois/OISMouse.h>
+#include <ois/OISJoyStick.h>
+#include <tinyxml/ticpp.h>
+// Included by both filesystem and thread but still relatively small
+#include <boost/iterator/iterator_facade.hpp>
+
+#endif /* ORXONOX_COMPILER_MSVC */
+
+
+#include "util/Convert.h"
+#include "util/Debug.h"
+#include "util/Exception.h"
+#include "util/Math.h"
+#include "util/mbool.h"
+#include "util/MultiType.h"
+#include "util/OrxAssert.h"
+#include "util/OrxEnum.h"
+#include "util/String.h"
+#include "util/SubString.h"
+
+
+#ifdef ORXONOX_COMPILER_MSVC
+
+// A change would trigger an 80% Core rebuild anyway
+#include "Identifier.h"
+
+#endif /*ORXONOX_COMPILER_MSVC */
Index: code/trunk/src/core/CorePrereqs.h
===================================================================
--- code/trunk/src/core/CorePrereqs.h	(revision 3110)
+++ code/trunk/src/core/CorePrereqs.h	(revision 3196)
@@ -36,6 +36,4 @@
 
 #include "OrxonoxConfig.h"
-
-#include <string>
 
 //-----------------------------------------------------------------------
@@ -64,129 +62,179 @@
 namespace orxonox
 {
-  namespace XMLPort
-  {
-    enum Mode
+    namespace XMLPort
     {
-      LoadObject,
-      SaveObject,
-      ExpandObject
+        enum Mode
+        {
+            LoadObject,
+            SaveObject,
+            ExpandObject
+        };
+    }
+
+    namespace KeybindMode
+    {
+        enum Enum
+        {
+            OnPress,
+            OnHold,
+            OnRelease,
+            None
+        };
     };
-  }
-
-  namespace KeybindMode
-  {
-    enum Enum
-    {
-      OnPress,
-      OnHold,
-      OnRelease,
-      None
-    };
-  };
-
-  typedef std::string LanguageEntryLabel;
-
-  class ArgumentCompleter;
-  class ArgumentCompletionListElement;
-  class BaseFactory;
-  class BaseMetaObjectListElement;
-  class BaseObject;
-  template <class T>
-  class ClassFactory;
-  template <class T>
-  class ClassIdentifier;
-  class ClassTreeMask;
-  class ClassTreeMaskIterator;
-  class ClassTreeMaskNode;
-  class ClassTreeMaskObjectIterator;
-  class Clock;
-  class CommandEvaluation;
-  class CommandExecutor;
-  class CommandLine;
-  class CommandLineArgument;
-  class ConfigFile;
-  class ConfigFileEntry;
-  class ConfigFileEntryComment;
-  class ConfigFileEntryValue;
-  class ConfigFileManager;
-  class ConfigFileSection;
-  class ConfigValueContainer;
-  class ConsoleCommand;
-  class Core;
-  struct Event;
-  class EventContainer;
-  class Executor;
-  template <class T>
-  class ExecutorMember;
-  class ExecutorStatic;
-  class Factory;
-  class Functor;
-  template <class T>
-  class FunctorMember;
-  class FunctorStatic;
-  class Identifier;
-  class IRC;
-  template <class T>
-  class Iterator;
-  class IteratorBase;
-  class Language;
-  class LanguageEntry;
-  class Loader;
-  class LuaBind;
-  class MetaObjectList;
-  class MetaObjectListElement;
-  class Namespace;
-  class NamespaceNode;
-  template <class T>
-  class ObjectList;
-  class ObjectListBase;
-  class ObjectListBaseElement;
-  template <class T>
-  class ObjectListElement;
-  template <class T>
-  class ObjectListIterator;
-  class OrxonoxClass;
-  class Shell;
-  class ShellListener;
-  template <class T>
-  class SubclassIdentifier;
-  class TclBind;
-  struct TclInterpreterBundle;
-  class TclThreadManager;
-  class Template;
-  class Tickable;
-  class XMLFile;
-  class XMLNameListener;
-  template <class T, class O>
-  class XMLPortClassObjectContainer;
-  template <class T>
-  class XMLPortClassParamContainer;
-  class XMLPortObjectContainer;
-  class XMLPortParamContainer;
-
-  // game states
-  class Game;
-  class GameState;
-  struct GameStateTreeNode;
-
-  // input
-  class BaseCommand;
-  class BufferedParamCommand;
-  class Button;
-  class CalibratorCallback;
-  class ExtendedInputState;
-  class HalfAxis;
-  class InputBuffer;
-  class InputManager;
-  class InputState;
-  class JoyStickHandler;
-  class MouseHandler;
-  class KeyBinder;
-  class KeyDetector;
-  class KeyHandler;
-  class ParamCommand;
-  class SimpleCommand;
-  class SimpleInputState;
-}
+
+    typedef std::string LanguageEntryLabel;
+
+    class ArgumentCompleter;
+    class ArgumentCompletionListElement;
+    class BaseFactory;
+    class BaseMetaObjectListElement;
+    class BaseObject;
+    template <class T>
+    class ClassFactory;
+    template <class T>
+    class ClassIdentifier;
+    class ClassTreeMask;
+    class ClassTreeMaskIterator;
+    class ClassTreeMaskNode;
+    class ClassTreeMaskObjectIterator;
+    class Clock;
+    class CommandEvaluation;
+    class CommandExecutor;
+    class CommandLine;
+    class CommandLineArgument;
+    class ConfigFile;
+    class ConfigFileEntry;
+    class ConfigFileEntryComment;
+    class ConfigFileEntryValue;
+    class ConfigFileManager;
+    class ConfigFileSection;
+    class ConfigValueContainer;
+    class ConsoleCommand;
+    class Core;
+    struct Event;
+    class EventContainer;
+    class Executor;
+    template <class T>
+    class ExecutorMember;
+    class ExecutorStatic;
+    class Factory;
+    class Functor;
+    template <class T>
+    class FunctorMember;
+    class FunctorStatic;
+    class Identifier;
+    class IRC;
+    template <class T>
+    class Iterator;
+    class IteratorBase;
+    class Language;
+    class LanguageEntry;
+    class Loader;
+    class LuaBind;
+    class MetaObjectList;
+    class MetaObjectListElement;
+    class Namespace;
+    class NamespaceNode;
+    template <class T>
+    class ObjectList;
+    class ObjectListBase;
+    class ObjectListBaseElement;
+    template <class T>
+    class ObjectListElement;
+    template <class T>
+    class ObjectListIterator;
+    class OrxonoxClass;
+    class Shell;
+    class ShellListener;
+    template <class T>
+    class SubclassIdentifier;
+    class TclBind;
+    struct TclInterpreterBundle;
+    class TclThreadManager;
+    class Template;
+    class Tickable;
+    class XMLFile;
+    class XMLNameListener;
+    template <class T, class O>
+    class XMLPortClassObjectContainer;
+    template <class T>
+    class XMLPortClassParamContainer;
+    class XMLPortObjectContainer;
+    class XMLPortParamContainer;
+
+    // game states
+    class Game;
+    class GameState;
+    struct GameStateTreeNode;
+
+    // input
+    class BaseCommand;
+    class BufferedParamCommand;
+    class Button;
+    class CalibratorCallback;
+    class ExtendedInputState;
+    class HalfAxis;
+    class InputBuffer;
+    class InputManager;
+    class InputState;
+    class JoyStickHandler;
+    class MouseHandler;
+    class KeyBinder;
+    class KeyDetector;
+    class KeyHandler;
+    class ParamCommand;
+    class SimpleCommand;
+    class SimpleInputState;
+}
+
+// CppTcl
+namespace Tcl
+{
+    class interpreter;
+    class object;
+}
+
+// Boost
+namespace boost { namespace filesystem
+{
+    struct path_traits;
+    template <class String, class Traits> class basic_path;
+    typedef basic_path<std::string, path_traits> path;
+} }
+
+// TinyXML and TinyXML++
+class TiXmlString;
+class TiXmlOutStream;
+class TiXmlNode;
+class TiXmlHandle;
+class TiXmlDocument;
+class TiXmlElement;
+class TiXmlComment;
+class TiXmlUnknown;
+class TiXmlAttribute;
+class TiXmlText;
+class TiXmlDeclaration;
+class TiXmlParsingData;
+namespace ticpp
+{
+    class Document;
+    class Element;
+    class Declaration;
+    class StylesheetReference;
+    class Text;
+    class Comment;
+    class Attribute;
+}
+namespace orxonox
+{
+    using ticpp::Document;
+    using ticpp::Element;
+    using ticpp::Declaration;
+    using ticpp::StylesheetReference;
+    using ticpp::Text;
+    using ticpp::Comment;
+    using ticpp::Attribute;
+}
+
 
 #endif /* _CorePrereqs_H__ */
Index: code/trunk/src/core/Event.cc
===================================================================
--- code/trunk/src/core/Event.cc	(revision 3110)
+++ code/trunk/src/core/Event.cc	(revision 3196)
@@ -28,4 +28,5 @@
 
 #include "Event.h"
+
 #include "BaseObject.h"
 #include "Executor.h"
Index: code/trunk/src/core/Event.h
===================================================================
--- code/trunk/src/core/Event.h	(revision 3110)
+++ code/trunk/src/core/Event.h	(revision 3196)
@@ -31,4 +31,5 @@
 
 #include "CorePrereqs.h"
+#include <string>
 
 namespace orxonox
Index: code/trunk/src/core/EventIncludes.h
===================================================================
--- code/trunk/src/core/EventIncludes.h	(revision 3110)
+++ code/trunk/src/core/EventIncludes.h	(revision 3196)
@@ -33,17 +33,17 @@
 #include "Executor.h"
 
-#define SetEvent(classname, eventname, functionname, event) \
-    SetEventGeneric(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject)
+#define ORXONOX_SET_EVENT(classname, eventname, functionname, event) \
+    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject)
 
-#define SetEventTemplate(classname, eventname, functionname, event, ...) \
-    SetEventGenericTemplate(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject, __VA_ARGS__)
+#define ORXONOX_SET_EVENT_TEMPLATE(classname, eventname, functionname, event, ...) \
+    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, BaseObject, __VA_ARGS__)
 
-#define SetSubclassEvent(classname, eventname, functionname, event, subclassname) \
-    SetEventGeneric(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname)
+#define ORXONOX_SET_SUBCLASS_EVENT(classname, eventname, functionname, event, subclassname) \
+    ORXONOX_SET_EVENT_GENERIC(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname)
 
-#define SetSubclassEventTemplate(classname, eventname, functionname, event, subclassname, ...) \
-    SetEventGenericTemplate(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname, __VA_ARGS__)
+#define ORXONOX_SET_SUBCLASS_EVENT_TEMPLATE(classname, eventname, functionname, event, subclassname, ...) \
+    ORXONOX_SET_EVENT_GENERIC_TEMPLATE(eventcontainer##classname##functionname, classname, eventname, functionname, event, subclassname, __VA_ARGS__)
 
-#define SetEventGeneric(containername, classname, eventname, functionname, event, subclassname) \
+#define ORXONOX_SET_EVENT_GENERIC(containername, classname, eventname, functionname, event, subclassname) \
     orxonox::EventContainer* containername = this->getEventContainer(eventname); \
     if (!containername) \
@@ -57,5 +57,5 @@
     containername->process(this, event)
 
-#define SetEventGenericTemplate(containername, classname, eventname, functionname, event, subclassname, ...) \
+#define ORXONOX_SET_EVENT_GENERIC_TEMPLATE(containername, classname, eventname, functionname, event, subclassname, ...) \
     orxonox::EventContainer* containername = this->getEventContainer(eventname); \
     if (!containername) \
Index: code/trunk/src/core/Executor.cc
===================================================================
--- code/trunk/src/core/Executor.cc	(revision 3110)
+++ code/trunk/src/core/Executor.cc	(revision 3196)
@@ -29,5 +29,5 @@
 
 #include "Executor.h"
-#include "util/Math.h"
+
 #include "util/Convert.h"
 #include "Language.h"
Index: code/trunk/src/core/Executor.h
===================================================================
--- code/trunk/src/core/Executor.h	(revision 3110)
+++ code/trunk/src/core/Executor.h	(revision 3196)
@@ -33,9 +33,9 @@
 #include "CorePrereqs.h"
 
+#include "util/Debug.h"
+#include "util/Math.h"
+#include "util/String.h"
 #include "util/SubString.h"
-#include "util/String.h"
-#include "util/Math.h"
 #include "Functor.h"
-#include "util/Debug.h"
 
 
Index: code/trunk/src/core/Factory.cc
===================================================================
--- code/trunk/src/core/Factory.cc	(revision 3110)
+++ code/trunk/src/core/Factory.cc	(revision 3196)
@@ -33,7 +33,8 @@
 
 #include "Factory.h"
+
+#include "util/Debug.h"
 #include "Identifier.h"
 #include "BaseObject.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: code/trunk/src/core/Functor.h
===================================================================
--- code/trunk/src/core/Functor.h	(revision 3110)
+++ code/trunk/src/core/Functor.h	(revision 3196)
@@ -33,8 +33,7 @@
 #include "CorePrereqs.h"
 
+#include "util/Debug.h"
 #include "util/MultiType.h"
 #include "util/String.h"
-#include "util/Debug.h"
-
 
 namespace orxonox
Index: code/trunk/src/core/Game.cc
===================================================================
--- code/trunk/src/core/Game.cc	(revision 3110)
+++ code/trunk/src/core/Game.cc	(revision 3196)
@@ -36,5 +36,5 @@
 
 #include <exception>
-#include <cassert>
+#include <boost/weak_ptr.hpp>
 
 #include "util/Debug.h"
@@ -51,4 +51,7 @@
 namespace orxonox
 {
+    using boost::shared_ptr;
+    using boost::weak_ptr;
+
     static void stop_game()
         { Game::getInstance().stop(); }
@@ -57,7 +60,7 @@
     struct _CoreExport GameStateTreeNode
     {
-        GameState*                      state_;
-        GameStateTreeNode*              parent_;
-        std::vector<GameStateTreeNode*> children_;
+        GameState* state_;
+        weak_ptr<GameStateTreeNode> parent_;
+        std::vector<shared_ptr<GameStateTreeNode> > children_;
     };
 
@@ -73,7 +76,4 @@
         assert(singletonRef_s == 0);
         singletonRef_s = this;
-
-        this->rootStateNode_ = 0;
-        this->activeStateNode_ = 0;
 
         this->abort_ = false;
@@ -105,8 +105,4 @@
         // Destroy pretty much everyhting left
         delete this->core_;
-
-        // Delete all the created nodes
-        for (std::vector<GameStateTreeNode*>::const_iterator it = this->allStateNodes_.begin(); it != this->allStateNodes_.end(); ++it)
-            delete *it;
 
         delete this->gameClock_;
@@ -172,6 +168,6 @@
             {
                 // Note: this->requestedStateNodes_.front() is the currently active state node
-                std::vector<GameStateTreeNode*>::iterator it = this->requestedStateNodes_.begin() + 1;
-                if (*it == this->activeStateNode_->parent_)
+                std::vector<shared_ptr<GameStateTreeNode> >::iterator it = this->requestedStateNodes_.begin() + 1;
+                if (*it == this->activeStateNode_->parent_.lock())
                     this->unloadState(this->activeStateNode_->state_);
                 else // has to be child
@@ -194,5 +190,5 @@
 
                 if ((*it)->getCountTickTime())
-                    this->addTickTime(this->gameClock_->getRealMicroseconds() - timeBeforeTick);
+                    this->addTickTime(static_cast<uint32_t>(this->gameClock_->getRealMicroseconds() - timeBeforeTick));
             }
 
@@ -216,6 +212,6 @@
 
                 uint32_t framesPerPeriod = this->statisticsTickTimes_.size();
-                this->avgFPS_ = (float)framesPerPeriod / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0;
-                this->avgTickTime_ = (float)this->periodTickTime_ / framesPerPeriod / 1000.0;
+                this->avgFPS_ = static_cast<float>(framesPerPeriod) / (currentTime - this->statisticsTickTimes_.front().tickTime) * 1000000.0f;
+                this->avgTickTime_ = static_cast<float>(this->periodTickTime_) / framesPerPeriod / 1000.0f;
 
                 this->periodTime_ -= this->statisticsRefreshCycle_;
@@ -226,5 +222,5 @@
         while (!this->activeStates_.empty())
             this->unloadState(this->activeStates_.back());
-        this->activeStateNode_ = 0;
+        this->activeStateNode_.reset();
         this->requestedStateNodes_.clear();
     }
@@ -251,8 +247,8 @@
             return;
 
-        GameStateTreeNode* requestedNode = 0;
+        shared_ptr<GameStateTreeNode> requestedNode;
 
         // this->requestedStateNodes_.back() is the currently active state
-        GameStateTreeNode* lastRequestedNode = this->requestedStateNodes_.back();
+        shared_ptr<GameStateTreeNode> lastRequestedNode = this->requestedStateNodes_.back();
 
         // Already the active node?
@@ -274,10 +270,10 @@
 
         // Check parent and all its grand parents
-        GameStateTreeNode* currentNode = lastRequestedNode;
+        shared_ptr<GameStateTreeNode> currentNode = lastRequestedNode;
         while (requestedNode == NULL && currentNode != NULL)
         {
             if (currentNode->state_ == state)
                 requestedNode = currentNode;
-            currentNode = currentNode->parent_;
+            currentNode = currentNode->parent_.lock();
         }
 
@@ -297,6 +293,6 @@
     void Game::popState()
     {
-        if (this->activeStateNode_ != NULL && this->requestedStateNodes_.back()->parent_)
-            this->requestState(this->requestedStateNodes_.back()->parent_->state_->getName());
+        if (this->activeStateNode_ != NULL && this->requestedStateNodes_.back()->parent_.lock())
+            this->requestState(this->requestedStateNodes_.back()->parent_.lock()->state_->getName());
         else
             COUT(2) << "Warning: Could not pop GameState. Ignoring." << std::endl;
@@ -333,5 +329,5 @@
         }
         unsigned int currentLevel = 0;
-        GameStateTreeNode* currentNode = 0;
+        shared_ptr<GameStateTreeNode> currentNode;
         for (std::vector<std::pair<std::string, unsigned> >::const_iterator it = stateStrings.begin(); it != stateStrings.end(); ++it)
         {
@@ -346,8 +342,6 @@
                 if (this->rootStateNode_ != NULL)
                     ThrowException(GameState, "No two root GameStates are allowed!");
-                GameStateTreeNode* newNode = new GameStateTreeNode;
-                this->allStateNodes_.push_back(newNode);
+                shared_ptr<GameStateTreeNode> newNode(new GameStateTreeNode);
                 newNode->state_ = newState;
-                newNode->parent_ = 0;
                 this->rootStateNode_ = newNode;
                 currentNode = this->rootStateNode_;
@@ -355,6 +349,5 @@
             else if (currentNode)
             {
-                GameStateTreeNode* newNode = new GameStateTreeNode;
-                this->allStateNodes_.push_back(newNode);
+                shared_ptr<GameStateTreeNode> newNode(new GameStateTreeNode);
                 newNode->state_ = newState;
                 if (newLevel < currentLevel)
@@ -362,5 +355,5 @@
                     // Get down the hierarchy
                     do
-                        currentNode = currentNode->parent_;
+                        currentNode = currentNode->parent_.lock();
                     while (newLevel < --currentLevel);
                 }
@@ -369,5 +362,5 @@
                     // same level
                     newNode->parent_ = currentNode->parent_;
-                    newNode->parent_->children_.push_back(newNode);
+                    newNode->parent_.lock()->children_.push_back(newNode);
                 }
                 else if (newLevel == currentLevel + 1)
Index: code/trunk/src/core/Game.h
===================================================================
--- code/trunk/src/core/Game.h	(revision 3110)
+++ code/trunk/src/core/Game.h	(revision 3196)
@@ -37,8 +37,13 @@
 
 #include "CorePrereqs.h"
+
 #include <cassert>
 #include <list>
 #include <map>
+#include <string>
 #include <vector>
+#include <boost/shared_ptr.hpp>
+#include <boost/preprocessor/cat.hpp>
+
 #include "OrxonoxClass.h"
 
@@ -49,5 +54,5 @@
 */
 #define AddGameState(classname, ...) \
-    static bool MACRO_CONCATENATE(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
+    static bool BOOST_PP_CAT(bGameStateDummy_##classname, __LINE__) = orxonox::Game::addGameState(new classname(__VA_ARGS__))
 
 // tolua_begin
@@ -106,8 +111,7 @@
 
         std::vector<GameState*>         activeStates_;
-        GameStateTreeNode*              rootStateNode_;
-        GameStateTreeNode*              activeStateNode_;
-        std::vector<GameStateTreeNode*> requestedStateNodes_;
-        std::vector<GameStateTreeNode*> allStateNodes_;
+        boost::shared_ptr<GameStateTreeNode> rootStateNode_;
+        boost::shared_ptr<GameStateTreeNode> activeStateNode_;
+        std::vector<boost::shared_ptr<GameStateTreeNode> > requestedStateNodes_;
 
         Core*                           core_;
Index: code/trunk/src/core/GameState.cc
===================================================================
--- code/trunk/src/core/GameState.cc	(revision 3110)
+++ code/trunk/src/core/GameState.cc	(revision 3196)
@@ -34,8 +34,8 @@
 
 #include "GameState.h"
-#include <cassert>
+
 #include "util/Debug.h"
 #include "util/Exception.h"
-#include "Clock.h"
+#include "util/OrxAssert.h"
 
 namespace orxonox
Index: code/trunk/src/core/GameState.h
===================================================================
--- code/trunk/src/core/GameState.h	(revision 3110)
+++ code/trunk/src/core/GameState.h	(revision 3196)
@@ -38,7 +38,6 @@
 #include "CorePrereqs.h"
 
+#include <map>
 #include <string>
-#include <map>
-#include "CorePrereqs.h"
 
 namespace orxonox
Index: code/trunk/src/core/IRC.cc
===================================================================
--- code/trunk/src/core/IRC.cc	(revision 3110)
+++ code/trunk/src/core/IRC.cc	(revision 3196)
@@ -29,10 +29,10 @@
 #include "IRC.h"
 
-#include <boost/thread/thread.hpp>
+#include <cpptcl/cpptcl.h>
+
+#include "util/Convert.h"
 #include "ConsoleCommand.h"
+#include "CoreIncludes.h"
 #include "TclThreadManager.h"
-#include "CoreIncludes.h"
-#include "util/Convert.h"
-
 
 namespace orxonox
Index: code/trunk/src/core/IRC.h
===================================================================
--- code/trunk/src/core/IRC.h	(revision 3110)
+++ code/trunk/src/core/IRC.h	(revision 3196)
@@ -32,5 +32,5 @@
 #include "CorePrereqs.h"
 
-#include <cpptcl/cpptcl.h>
+#include <string>
 #include "OrxonoxClass.h"
 
Index: code/trunk/src/core/Identifier.cc
===================================================================
--- code/trunk/src/core/Identifier.cc	(revision 3110)
+++ code/trunk/src/core/Identifier.cc	(revision 3196)
@@ -36,8 +36,8 @@
 #include <ostream>
 
-#include "Factory.h"
+#include "util/String.h"
 #include "ConfigValueContainer.h"
 #include "ConsoleCommand.h"
-#include "CommandExecutor.h"
+#include "Factory.h"
 #include "XMLPort.h"
 
@@ -63,5 +63,4 @@
         this->bHasConfigValues_ = false;
         this->bHasConsoleCommands_ = false;
-        this->bHasConstructionCallback_ = false;
 
         this->children_ = new std::set<const Identifier*>();
@@ -93,6 +92,4 @@
         for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
             delete (it->second);
-        for (std::vector<Functor*>::iterator it = this->constructionCallbacks_.begin(); it != this->constructionCallbacks_.end(); ++it)
-            delete *it;
     }
 
@@ -519,36 +516,4 @@
 
     /**
-        @brief Adds a construction callback functor that gets called every time an object is created.
-        @param functor Functor pointer to any function with no argument.
-    */
-    void Identifier::addConstructionCallback(Functor* functor)
-    {
-        for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
-        {
-            if (this->constructionCallbacks_[i] == functor)
-                return;
-        }
-        this->constructionCallbacks_.push_back(functor);
-        this->bHasConstructionCallback_ = true;
-    }
-
-    /**
-        @brief Removes a construction callback functor that gets called every time an object is created.
-        @param functor Functor pointer to any function with no argument.
-    */
-    void Identifier::removeConstructionCallback(Functor* functor)
-    {
-        for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
-        {
-            if (this->constructionCallbacks_[i] == functor)
-            {
-                this->constructionCallbacks_.erase(this->constructionCallbacks_.begin() + i);
-            }
-        }
-        if (constructionCallbacks_.empty())
-            this->bHasConstructionCallback_ = false;
-    }
-
-    /**
         @brief Lists the names of all Identifiers in a std::set<const Identifier*>.
         @param out The outstream
Index: code/trunk/src/core/Identifier.h
===================================================================
--- code/trunk/src/core/Identifier.h	(revision 3110)
+++ code/trunk/src/core/Identifier.h	(revision 3196)
@@ -55,19 +55,15 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
+#include <map>
 #include <set>
-#include <map>
-#include <vector>
 #include <string>
-#include <utility>
 #include <typeinfo>
-#include <cstdlib>
-#include <cassert>
-
+
+#include "util/Debug.h"
 #include "MetaObjectList.h"
-#include "Iterator.h"
+#include "ObjectList.h"
+#include "ObjectListBase.h"
 #include "Super.h"
-#include "Functor.h"
-#include "util/Debug.h"
-#include "util/String.h"
 
 namespace orxonox
@@ -223,6 +219,4 @@
             /** @brief Returns true if this class has at least one console command. @return True if this class has at least one console command */
             inline bool hasConsoleCommands() const { return this->bHasConsoleCommands_; }
-            /** @brief Returns true if this class has at least one construction callback Functor registered. */
-            inline bool hasConstructionCallback() const { return this->bHasConstructionCallback_; }
 
             /** @brief Returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. @return The status of the class-hierarchy creation */
@@ -251,7 +245,4 @@
             ConsoleCommand* getConsoleCommand(const std::string& name) const;
             ConsoleCommand* getLowercaseConsoleCommand(const std::string& name) const;
-
-            void addConstructionCallback(Functor* functor);
-            void removeConstructionCallback(Functor* functor);
 
             void initializeClassHierarchy(std::set<const Identifier*>* parents, bool bRootClass);
@@ -276,7 +267,4 @@
             /** @brief Returns the direct children of the class the Identifier belongs to. @return The list of all direct children */
             inline std::set<const Identifier*>& getDirectChildrenIntern() const { return (*this->directChildren_); }
-
-            bool bHasConstructionCallback_;                                //!< True if at least one Functor is registered to get informed when an object of type T is created.
-            std::vector<Functor*> constructionCallbacks_;                  //!< All construction callback Functors of this class.
 
             ObjectListBase* objects_;                                      //!< The list of all objects of this class
@@ -383,5 +371,5 @@
     */
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
     {
         // check if the static field has already been filled
@@ -398,5 +386,5 @@
     */
     template <class T>
-    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
+    inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier(const std::string& name)
     {
         ClassIdentifier<T>* identifier = ClassIdentifier<T>::getIdentifier();
@@ -435,15 +423,8 @@
     */
     template <class T>
-    void ClassIdentifier<T>::addObject(T* object)
+    inline void ClassIdentifier<T>::addObject(T* object)
     {
         COUT(5) << "*** ClassIdentifier: Added object to " << this->getName() << "-list." << std::endl;
         object->getMetaList().add(this->objects_, this->objects_->add(new ObjectListElement<T>(object)));
-        if (this->bHasConstructionCallback_)
-        {
-            // Call all registered callbacks that a new object of type T has been created.
-            // Do NOT deliver a T* pointer here because it's way too risky (object not yet fully created).
-            for (unsigned int i = 0; i < this->constructionCallbacks_.size(); ++i)
-                (*constructionCallbacks_[i])();
-        }
     }
 
Index: code/trunk/src/core/Iterator.h
===================================================================
--- code/trunk/src/core/Iterator.h	(revision 3110)
+++ code/trunk/src/core/Iterator.h	(revision 3196)
@@ -47,7 +47,6 @@
 #include "CorePrereqs.h"
 
+#include "Identifier.h"
 #include "ObjectListBase.h"
-#include "ObjectListIterator.h"
-#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -305,6 +304,3 @@
 }
 
-// Include ObjectList.h so the user only has to include one file: Iterator.h
-#include "ObjectList.h"
-
 #endif /* _Iterator_H__ */
Index: code/trunk/src/core/Language.cc
===================================================================
--- code/trunk/src/core/Language.cc	(revision 3110)
+++ code/trunk/src/core/Language.cc	(revision 3196)
@@ -37,6 +37,6 @@
 #include <boost/filesystem.hpp>
 
+#include "util/Debug.h"
 #include "Core.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: code/trunk/src/core/Loader.cc
===================================================================
--- code/trunk/src/core/Loader.cc	(revision 3110)
+++ code/trunk/src/core/Loader.cc	(revision 3196)
@@ -32,15 +32,13 @@
 #include <boost/filesystem.hpp>
 
-#include "XMLFile.h"
+#include "util/Debug.h"
+#include "util/Exception.h"
 #include "BaseObject.h"
-#include "Identifier.h"
+#include "Core.h"
 #include "Iterator.h"
 #include "ObjectList.h"
-#include "CoreIncludes.h"
 #include "LuaBind.h"
 #include "Namespace.h"
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "Core.h"
+#include "XMLFile.h"
 
 namespace orxonox
Index: code/trunk/src/core/Loader.h
===================================================================
--- code/trunk/src/core/Loader.h	(revision 3110)
+++ code/trunk/src/core/Loader.h	(revision 3196)
@@ -33,5 +33,4 @@
 
 #include <vector>
-
 #include "ClassTreeMask.h"
 
Index: code/trunk/src/core/LuaBind.cc
===================================================================
--- code/trunk/src/core/LuaBind.cc	(revision 3110)
+++ code/trunk/src/core/LuaBind.cc	(revision 3196)
@@ -31,7 +31,5 @@
 #include <fstream>
 #include <map>
-
 extern "C" {
-#include <lua.h>
 #include <lualib.h>
 }
@@ -39,6 +37,6 @@
 #include <boost/filesystem.hpp>
 
+#include "util/Debug.h"
 #include "util/String.h"
-#include "util/Debug.h"
 #include "ToluaBindCore.h"
 #include "Core.h"
@@ -72,5 +70,5 @@
   }
 
-  void LuaBind::luaPrint(std::string str)
+  void LuaBind::luaPrint(const std::string& str)
   {
     output_ += str;
@@ -84,5 +82,5 @@
       @param luaTags if true, the loaded file gets stripped off luaTags
   */
-  void LuaBind::loadFile(std::string filename, bool luaTags)
+  void LuaBind::loadFile(const std::string& filename, bool luaTags)
   {
     boost::filesystem::path filepath(filename);
@@ -117,5 +115,5 @@
   }
 
-  void LuaBind::loadString(std::string code)
+  void LuaBind::loadString(const std::string& code)
   {
     luaSource_ = code;
Index: code/trunk/src/core/LuaBind.h
===================================================================
--- code/trunk/src/core/LuaBind.h	(revision 3110)
+++ code/trunk/src/core/LuaBind.h	(revision 3196)
@@ -38,11 +38,9 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
+#include <string>
 extern "C" {
 #include <lua.h>
 }
-
-#include <cassert>
-#include <list>
-#include <string>
 
 // tolua_begin
@@ -64,10 +62,10 @@
       inline static LuaBind& getInstance() { assert(singletonRef_s); return *LuaBind::singletonRef_s; } // tolua_export
 
-    void loadFile(std::string filename, bool luaTags);
-    void loadString(std::string code);
+    void loadFile(const std::string& filename, bool luaTags);
+    void loadString(const std::string& code);
     //void init(lua_State *state_);
     //void xmlToLua();
     void run();
-    void luaPrint(std::string str); // tolua_export
+    void luaPrint(const std::string& str); // tolua_export
 
 #if LUA_VERSION_NUM != 501
@@ -76,5 +74,5 @@
 
     inline lua_State* getLuaState() { return luaState_; };
-    inline std::string getLuaOutput() { return output_; };
+    inline const std::string& getLuaOutput() { return output_; };
     //inline std::string* getFileString() { return &fileString_; };
     inline void clearLuaOutput() { output_ = ""; }
Index: code/trunk/src/core/MetaObjectList.cc
===================================================================
--- code/trunk/src/core/MetaObjectList.cc	(revision 3110)
+++ code/trunk/src/core/MetaObjectList.cc	(revision 3196)
@@ -33,7 +33,8 @@
 
 #include "MetaObjectList.h"
+
+#include "util/Debug.h"
+#include "Identifier.h"
 #include "ObjectListBase.h"
-#include "Identifier.h"
-#include "util/Debug.h"
 
 namespace orxonox
Index: code/trunk/src/core/Namespace.cc
===================================================================
--- code/trunk/src/core/Namespace.cc	(revision 3110)
+++ code/trunk/src/core/Namespace.cc	(revision 3196)
@@ -28,4 +28,7 @@
 
 #include "Namespace.h"
+
+#include <set>
+
 #include "NamespaceNode.h"
 #include "CoreIncludes.h"
Index: code/trunk/src/core/Namespace.h
===================================================================
--- code/trunk/src/core/Namespace.h	(revision 3110)
+++ code/trunk/src/core/Namespace.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "CorePrereqs.h"
 
-#include <map>
-
-#include "XMLIncludes.h"
+#include <set>
+#include <string>
 #include "BaseObject.h"
 
Index: code/trunk/src/core/ObjectListBase.cc
===================================================================
--- code/trunk/src/core/ObjectListBase.cc	(revision 3110)
+++ code/trunk/src/core/ObjectListBase.cc	(revision 3196)
@@ -35,11 +35,10 @@
 */
 
+#include "ObjectListBase.h"
+
 #include <set>
-
-#include "CorePrereqs.h"
-
-#include "ObjectListBase.h"
 #include "Identifier.h"
 #include "Iterator.h"
+#include "ObjectListIterator.h"
 
 namespace orxonox
Index: code/trunk/src/core/ObjectListBase.h
===================================================================
--- code/trunk/src/core/ObjectListBase.h	(revision 3110)
+++ code/trunk/src/core/ObjectListBase.h	(revision 3196)
@@ -38,7 +38,8 @@
 #define _ObjectListBase_H__
 
+#include "CorePrereqs.h"
+
 #include <vector>
-
-#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
 
 namespace orxonox
@@ -139,7 +140,7 @@
 
         private:
-            Identifier* identifier_;               //!< The Iterator owning this list
-            ObjectListBaseElement* first_;         //!< The first element in the list
-            ObjectListBaseElement* last_;          //!< The last element in the list
+            Identifier* identifier_;                 //!< The Iterator owning this list
+            ObjectListBaseElement* first_;           //!< The first element in the list
+            ObjectListBaseElement* last_;            //!< The last element in the list
             std::vector<void*> iterators_;           //!< A list of Iterators pointing on an element in this list
             std::vector<void*> objectListIterators_; //!< A list of ObjectListIterators pointing on an element in this list
Index: code/trunk/src/core/ObjectListIterator.h
===================================================================
--- code/trunk/src/core/ObjectListIterator.h	(revision 3110)
+++ code/trunk/src/core/ObjectListIterator.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file Iterator.h
+    @file
     @brief Definition and implementation of the Iterator class.
 
@@ -47,5 +47,6 @@
 
 #include "CorePrereqs.h"
-#include "ObjectListBase.h"
+#include "Identifier.h"
+#include "ObjectList.h"
 
 namespace orxonox
@@ -230,6 +231,3 @@
 }
 
-// Include ObjectList.h so the user only has to include one file: Iterator.h
-#include "ObjectList.h"
-
 #endif /* _ObjectListIterator_H__ */
Index: code/trunk/src/core/OrxonoxClass.cc
===================================================================
--- code/trunk/src/core/OrxonoxClass.cc	(revision 3110)
+++ code/trunk/src/core/OrxonoxClass.cc	(revision 3196)
@@ -33,4 +33,5 @@
 
 #include "OrxonoxClass.h"
+
 #include "MetaObjectList.h"
 #include "Identifier.h"
Index: code/trunk/src/core/OrxonoxClass.h
===================================================================
--- code/trunk/src/core/OrxonoxClass.h	(revision 3110)
+++ code/trunk/src/core/OrxonoxClass.h	(revision 3196)
@@ -39,7 +39,5 @@
 
 #include "CorePrereqs.h"
-
 #include <set>
-#include <string>
 
 namespace orxonox
Index: code/trunk/src/core/Shell.cc
===================================================================
--- code/trunk/src/core/Shell.cc	(revision 3110)
+++ code/trunk/src/core/Shell.cc	(revision 3196)
@@ -28,4 +28,6 @@
 
 #include "Shell.h"
+
+#include "util/OutputHandler.h"
 #include "CommandExecutor.h"
 #include "CoreIncludes.h"
@@ -33,5 +35,4 @@
 #include "Core.h"
 #include "ConsoleCommand.h"
-#include "util/OutputHandler.h"
 
 #define SHELL_UPDATE_LISTENERS(function) \
Index: code/trunk/src/core/Shell.h
===================================================================
--- code/trunk/src/core/Shell.h	(revision 3110)
+++ code/trunk/src/core/Shell.h	(revision 3196)
@@ -32,5 +32,7 @@
 #include "CorePrereqs.h"
 
+#include <cassert>
 #include <list>
+#include <string>
 #include <vector>
 
Index: code/trunk/src/core/Super.h
===================================================================
--- code/trunk/src/core/Super.h	(revision 3110)
+++ code/trunk/src/core/Super.h	(revision 3196)
@@ -67,10 +67,7 @@
 #define _Super_H__
 
-#include <iostream>
-
 #include "CorePrereqs.h"
 
 #include "util/Debug.h"
-#include "XMLIncludes.h"
 #include "Event.h"
 
Index: code/trunk/src/core/TclBind.cc
===================================================================
--- code/trunk/src/core/TclBind.cc	(revision 3110)
+++ code/trunk/src/core/TclBind.cc	(revision 3196)
@@ -29,11 +29,13 @@
 #include "TclBind.h"
 
-#include <iostream>
+#include <exception>
 #include <string>
-#include "ConsoleCommand.h"
-#include "CommandExecutor.h"
-#include "TclThreadManager.h"
+#include <cpptcl/cpptcl.h>
+
 #include "util/Debug.h"
 #include "util/String.h"
+#include "CommandExecutor.h"
+#include "ConsoleCommand.h"
+#include "TclThreadManager.h"
 
 namespace orxonox
Index: code/trunk/src/core/TclBind.h
===================================================================
--- code/trunk/src/core/TclBind.h	(revision 3110)
+++ code/trunk/src/core/TclBind.h	(revision 3196)
@@ -32,5 +32,6 @@
 #include "CorePrereqs.h"
 
-#include <cpptcl/cpptcl.h>
+#include <cassert>
+#include <string>
 
 namespace orxonox
Index: code/trunk/src/core/TclThreadManager.cc
===================================================================
--- code/trunk/src/core/TclThreadManager.cc	(revision 3110)
+++ code/trunk/src/core/TclThreadManager.cc	(revision 3196)
@@ -29,18 +29,15 @@
 #include "TclThreadManager.h"
 
-#include <iostream>
-#include <string>
-#include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
 #include <OgreTimer.h>
-
+#include <cpptcl/cpptcl.h>
+
+#include "util/Convert.h"
+#include "util/Debug.h"
 #include "Clock.h"
+#include "CommandExecutor.h"
+#include "ConsoleCommand.h"
 #include "CoreIncludes.h"
-#include "ConsoleCommand.h"
-#include "CommandExecutor.h"
 #include "TclBind.h"
-#include "util/Debug.h"
-#include "util/Convert.h"
-
 
 namespace orxonox
Index: code/trunk/src/core/TclThreadManager.h
===================================================================
--- code/trunk/src/core/TclThreadManager.h	(revision 3110)
+++ code/trunk/src/core/TclThreadManager.h	(revision 3196)
@@ -32,13 +32,11 @@
 #include "CorePrereqs.h"
 
-#include <queue>
+#include <list>
 #include <map>
-#include <list>
-
+#include <string>
+#include <boost/thread/condition.hpp>
 #include <boost/thread/mutex.hpp>
-#include <boost/thread/condition.hpp>
 #include <boost/thread/thread.hpp>
 
-#include <cpptcl/cpptcl.h>
 #include "core/OrxonoxClass.h"
 
Index: code/trunk/src/core/Template.cc
===================================================================
--- code/trunk/src/core/Template.cc	(revision 3110)
+++ code/trunk/src/core/Template.cc	(revision 3196)
@@ -29,9 +29,10 @@
 #include "Template.h"
 
+#include <tinyxml/tinyxml.h>
 #include <tinyxml/ticpp.h>
 
+#include "util/Debug.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Debug.h"
 
 namespace orxonox
@@ -39,6 +40,8 @@
     CreateFactory(Template);
 
-    Template::Template(BaseObject* creator) : BaseObject(creator), xmlelement_("")
+    Template::Template(BaseObject* creator) : BaseObject(creator)
     {
+        this->xmlelement_ = new TiXmlElement("");
+
         RegisterObject(Template);
 
@@ -52,4 +55,5 @@
     {
         Template::getTemplateMap().erase(this->getName());
+        delete this->xmlelement_;
     }
 
@@ -90,4 +94,9 @@
     }
 
+    void Template::setXMLElement(const TiXmlElement& xmlelement)
+    {
+        *this->xmlelement_ = xmlelement;
+    }
+
     const TiXmlElement& Template::getXMLElement() const
     {
@@ -115,5 +124,5 @@
         }
 
-        return this->xmlelement_;
+        return *this->xmlelement_;
     }
 
Index: code/trunk/src/core/Template.h
===================================================================
--- code/trunk/src/core/Template.h	(revision 3110)
+++ code/trunk/src/core/Template.h	(revision 3196)
@@ -30,9 +30,8 @@
 #define _Template_H__
 
-#include <map>
-
 #include "CorePrereqs.h"
 
-#include <tinyxml/tinyxml.h>
+#include <map>
+#include <string>
 #include "BaseObject.h"
 
@@ -58,6 +57,5 @@
                 { return this->bLoadDefaults_; }
 
-            inline void setXMLElement(const TiXmlElement& xmlelement)
-                { this->xmlelement_ = xmlelement; }
+            void setXMLElement(const TiXmlElement& xmlelement);
             const TiXmlElement& getXMLElement() const;
 
@@ -75,5 +73,5 @@
 
         private:
-            TiXmlElement xmlelement_;
+            TiXmlElement* xmlelement_;
             std::string link_;
             std::string baseclass_;
Index: code/trunk/src/core/XMLFile.h
===================================================================
--- code/trunk/src/core/XMLFile.h	(revision 3110)
+++ code/trunk/src/core/XMLFile.h	(revision 3196)
@@ -33,5 +33,4 @@
 
 #include <string>
-
 #include "ClassTreeMask.h"
 
Index: code/trunk/src/core/XMLIncludes.h
===================================================================
--- code/trunk/src/core/XMLIncludes.h	(revision 3110)
+++ 	(revision )
@@ -1,73 +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 Forward declarations of some XML classes.
-*/
-
-#include "CorePrereqs.h"
-
-//-----------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------
-
-class TiXmlString;
-class TiXmlOutStream;
-class TiXmlNode;
-class TiXmlHandle;
-class TiXmlDocument;
-class TiXmlElement;
-class TiXmlComment;
-class TiXmlUnknown;
-class TiXmlAttribute;
-class TiXmlText;
-class TiXmlDeclaration;
-class TiXmlParsingData;
-
-namespace ticpp
-{
-    class Document;
-    class Element;
-    class Declaration;
-    class StylesheetReference;
-    class Text;
-    class Comment;
-    class Attribute;
-}
-
-namespace orxonox
-{
-    using ticpp::Document;
-    using ticpp::Element;
-    using ticpp::Declaration;
-    using ticpp::StylesheetReference;
-    using ticpp::Text;
-    using ticpp::Comment;
-    using ticpp::Attribute;
-}
Index: code/trunk/src/core/XMLPort.cc
===================================================================
--- code/trunk/src/core/XMLPort.cc	(revision 3110)
+++ code/trunk/src/core/XMLPort.cc	(revision 3196)
@@ -28,8 +28,7 @@
 
 #include "XMLPort.h"
-#include "Language.h"
+
 #include "Loader.h"
 #include "Namespace.h"
-#include "CoreIncludes.h"
 
 namespace orxonox
@@ -40,5 +39,5 @@
     bool XMLPortObjectContainer::identifierIsIncludedInLoaderMask(const Identifier* identifier)
     {
-        return ((!this->bApplyLoaderMask_) || identifier->isA(Class(Namespace)) || Loader::currentMask_s.isIncluded(identifier));
+        return ((!this->bApplyLoaderMask_) || identifier->isA(ClassIdentifier<Namespace>::getIdentifier()) || Loader::currentMask_s.isIncluded(identifier));
     }
 }
Index: code/trunk/src/core/XMLPort.h
===================================================================
--- code/trunk/src/core/XMLPort.h	(revision 3110)
+++ code/trunk/src/core/XMLPort.h	(revision 3196)
@@ -44,11 +44,14 @@
 
 #include <cassert>
+#include <string>
 #include <tinyxml/ticpp.h>
+
 #include "util/Debug.h"
 #include "util/Exception.h"
 #include "util/MultiType.h"
-#include "XMLIncludes.h"
+#include "util/OrxAssert.h"
+#include "Factory.h"
+#include "Identifier.h"
 #include "Executor.h"
-#include "CoreIncludes.h"
 #include "BaseObject.h"
 
@@ -176,5 +179,5 @@
 */
 #define XMLPortParamGeneric(containername, classname, objectclass, object, paramname, loadexecutor, saveexecutor, xmlelement, mode) \
-    orxonox::XMLPortClassParamContainer<objectclass>* containername = (orxonox::XMLPortClassParamContainer<objectclass>*)(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
+    orxonox::XMLPortClassParamContainer<objectclass>* containername = static_cast<orxonox::XMLPortClassParamContainer<objectclass>*>(ClassIdentifier<classname>::getIdentifier()->getXMLPortParamContainer(paramname)); \
     if (!containername) \
     { \
@@ -545,8 +548,8 @@
                             for (ticpp::Iterator<ticpp::Element> child = xmlsubelement->FirstChildElement(false); child != child.end(); child++)
                             {
-                                Identifier* identifier = ClassByString(child->Value());
+                                Identifier* identifier = Factory::getIdentifier(child->Value());
                                 if (identifier)
                                 {
-                                    if (identifier->isA(Class(O)))
+                                    if (identifier->isA(ClassIdentifier<O>::getIdentifier()))
                                     {
                                         if (identifier->isLoadable())
@@ -606,5 +609,5 @@
                                     else
                                     {
-                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << Class(O)->getName() << "'." << std::endl;
+                                        COUT(2) << object->getLoaderIndentation() << "Warning: '" << child->Value() << "' is not a '" << ClassIdentifier<O>::getIdentifier()->getName() << "'." << std::endl;
                                     }
                                 }
@@ -626,5 +629,5 @@
                     {
                         COUT(1) << std::endl;
-                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << Class(O)->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
+                        COUT(1) << "An error occurred in XMLPort.h while loading a '" << ClassIdentifier<O>::getIdentifier()->getName() << "' in '" << this->sectionname_ << "' of '" << this->identifier_->getName() << "' (objectname: " << object->getName() << ") in " << object->getFilename() << ":" << std::endl;
                         COUT(1) << ex.what() << std::endl;
                     }
Index: code/trunk/src/core/input/CMakeLists.txt
===================================================================
--- code/trunk/src/core/input/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/core/input/CMakeLists.txt	(revision 3196)
@@ -1,5 +1,4 @@
 ADD_SOURCE_FILES(CORE_SRC_FILES
   Button.cc
-  CalibratorCallback.cc
   ExtendedInputState.cc
   HalfAxis.cc
Index: code/trunk/src/core/input/CalibratorCallback.cc
===================================================================
--- code/trunk/src/core/input/CalibratorCallback.cc	(revision 3110)
+++ 	(revision )
@@ -1,47 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Implementation of the different input handlers.
-*/
-
-#include "CalibratorCallback.h"
-#include "InputManager.h"
-
-namespace orxonox
-{
-    void CalibratorCallback::keyPressed(const orxonox::KeyEvent &evt)
-    {
-        if (evt.key == KeyCode::Return)
-        {
-            //InputManager::setInputState(InputManager::IS_NOCALIBRATE);
-        }
-    }
-}
Index: code/trunk/src/core/input/CalibratorCallback.h
===================================================================
--- code/trunk/src/core/input/CalibratorCallback.h	(revision 3110)
+++ 	(revision )
@@ -1,58 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-    Different definitions of input processing.
-*/
-
-#ifndef _CalibratorCallback_H__
-#define _CalibratorCallback_H__
-
-#include "core/CorePrereqs.h"
-#include "InputInterfaces.h"
-
-namespace orxonox
-{
-    class _CoreExport CalibratorCallback : public KeyHandler
-    {
-    public:
-        CalibratorCallback()  { }
-        ~CalibratorCallback() { }
-
-    private:
-        void keyPressed (const KeyEvent& evt);
-        void keyReleased(const KeyEvent& evt) { }
-        void keyHeld    (const KeyEvent& evt) { }
-
-        void updateInput(float dt) { }
-    };
-}
-
-#endif /* _CalibratorCallback_H__ */
Index: code/trunk/src/core/input/ExtendedInputState.cc
===================================================================
--- code/trunk/src/core/input/ExtendedInputState.cc	(revision 3110)
+++ code/trunk/src/core/input/ExtendedInputState.cc	(revision 3196)
@@ -36,5 +36,5 @@
 
 #include <cassert>
-#include "util/Debug.h"
+#include "core/Executor.h"
 
 namespace orxonox
@@ -457,3 +457,15 @@
         this->bHandlersChanged_ = true;
     }
+
+    void ExtendedInputState::onEnter()
+    {
+        if (executorOnEnter_)
+            (*executorOnEnter_)();
+    }
+
+    void ExtendedInputState::onLeave()
+    {
+        if (executorOnLeave_)
+            (*executorOnLeave_)();
+    }
 }
Index: code/trunk/src/core/input/ExtendedInputState.h
===================================================================
--- code/trunk/src/core/input/ExtendedInputState.h	(revision 3110)
+++ code/trunk/src/core/input/ExtendedInputState.h	(revision 3196)
@@ -38,5 +38,4 @@
 
 #include <vector>
-
 #include "InputInterfaces.h"
 #include "InputState.h"
@@ -89,4 +88,7 @@
         void update();
 
+        void onEnter();
+        void onLeave();
+
         std::vector<KeyHandler*>                    keyHandlers_;
         std::vector<MouseHandler*>                  mouseHandlers_;
Index: code/trunk/src/core/input/HalfAxis.h
===================================================================
--- code/trunk/src/core/input/HalfAxis.h	(revision 3110)
+++ code/trunk/src/core/input/HalfAxis.h	(revision 3196)
@@ -37,4 +37,5 @@
 
 #include "core/CorePrereqs.h"
+
 #include "Button.h"
 #include "InputCommands.h"
Index: code/trunk/src/core/input/InputBuffer.cc
===================================================================
--- code/trunk/src/core/input/InputBuffer.cc	(revision 3110)
+++ code/trunk/src/core/input/InputBuffer.cc	(revision 3196)
@@ -28,6 +28,4 @@
 
 #include "InputBuffer.h"
-
-#include <iostream>
 
 #include "util/Clipboard.h"
@@ -57,5 +55,5 @@
     }
 
-    InputBuffer::InputBuffer(const std::string allowedChars)
+    InputBuffer::InputBuffer(const std::string& allowedChars)
     {
         RegisterRootObject(InputBuffer);
Index: code/trunk/src/core/input/InputBuffer.h
===================================================================
--- code/trunk/src/core/input/InputBuffer.h	(revision 3110)
+++ code/trunk/src/core/input/InputBuffer.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "core/CorePrereqs.h"
 
+#include <list>
 #include <string>
-#include <list>
-
 #include "core/OrxonoxClass.h"
 #include "InputInterfaces.h"
@@ -80,5 +79,5 @@
             InputBuffer();
             ~InputBuffer();
-            InputBuffer(const std::string allowedChars);
+            InputBuffer(const std::string& allowedChars);
 
             void setConfigValues();
@@ -145,5 +144,5 @@
             void updated(const char& update, bool bSingleInput);
 
-            inline std::string get() const
+            inline const std::string& get() const
                 { return this->buffer_; }
             inline unsigned int getSize() const
Index: code/trunk/src/core/input/InputCommands.cc
===================================================================
--- code/trunk/src/core/input/InputCommands.cc	(revision 3110)
+++ code/trunk/src/core/input/InputCommands.cc	(revision 3196)
@@ -35,5 +35,4 @@
 #include "InputCommands.h"
 #include "util/Math.h"
-#include "core/CommandExecutor.h"
 
 namespace orxonox
Index: code/trunk/src/core/input/InputInterfaces.h
===================================================================
--- code/trunk/src/core/input/InputInterfaces.h	(revision 3110)
+++ code/trunk/src/core/input/InputInterfaces.h	(revision 3196)
@@ -38,7 +38,7 @@
 #include "core/CorePrereqs.h"
 
-#include "ois/OISKeyboard.h"
-#include "ois/OISMouse.h"
-#include "ois/OISJoyStick.h"
+#include <ois/OISKeyboard.h>
+#include <ois/OISMouse.h>
+#include <ois/OISJoyStick.h>
 #include "util/Math.h"
 
Index: code/trunk/src/core/input/InputManager.cc
===================================================================
--- code/trunk/src/core/input/InputManager.cc	(revision 3110)
+++ code/trunk/src/core/input/InputManager.cc	(revision 3196)
@@ -38,30 +38,27 @@
 #include <climits>
 #include <cassert>
-
-#include "ois/OISException.h"
-#include "ois/OISInputManager.h"
-#include "core/ConsoleCommand.h"
-
-// HACK
-#ifdef ORXONOX_PLATFORM_LINUX
-#  include "ois/linux/LinuxMouse.h"
-#endif
-
+#include <ois/OISException.h>
+#include <ois/OISInputManager.h>
+
+#include "util/Convert.h"
 #include "util/Exception.h"
+#include "util/Debug.h"
 #include "core/Clock.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
-#include "core/CommandExecutor.h"
+#include "core/ConsoleCommand.h"
 #include "core/CommandLine.h"
-#include "util/Debug.h"
 
 #include "InputBuffer.h"
-#include "KeyBinder.h"
 #include "KeyDetector.h"
-#include "CalibratorCallback.h"
 #include "InputState.h"
 #include "SimpleInputState.h"
 #include "ExtendedInputState.h"
 #include "JoyStickDeviceNumberListener.h"
+
+// HACK (include this as last, X11 seems to define some macros...)
+#ifdef ORXONOX_PLATFORM_LINUX
+#  include <ois/linux/LinuxMouse.h>
+#endif
 
 namespace orxonox
@@ -367,6 +364,6 @@
         for (unsigned int i = 0; i < configValueVectorSize; ++i)
         {
-            list[i] = omni_cast<int>(ConfigFileManager::getInstance().getValue(
-                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, omni_cast<std::string>(defaultValue), false));
+            list[i] = multi_cast<int>(ConfigFileManager::getInstance().getValue(
+                ConfigFileType::JoyStickCalibration, sectionName, valueName, i, multi_cast<std::string>(defaultValue), false));
         }
 
@@ -403,9 +400,9 @@
             // Generate some sort of execution unique id per joy stick
             std::string id = "JoyStick_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
-            id += omni_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Button))  + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Axis))    + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Slider))  + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_POV))     + "_";
+            id += multi_cast<std::string>(joySticks_[iJoyStick]->getNumberOfComponents(OIS::OIS_Vector3)) + "_";
             id += joySticks_[iJoyStick]->vendor();
             for (unsigned int i = 0; i < iJoyStick; ++i)
@@ -414,5 +411,5 @@
                 {
                     // Two joysticks are probably equal --> add the index as well
-                    id += "_" + omni_cast<std::string>(iJoyStick);
+                    id += "_" + multi_cast<std::string>(iJoyStick);
                 }
             }
@@ -497,5 +494,5 @@
                     joyStickMinValues_[iJoyStick][i] = -32768;
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MinValue", i, omni_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MinValue", i, multi_cast<std::string>(joyStickMinValues_[iJoyStick][i]), false);
 
                 // Maximum values
@@ -503,9 +500,9 @@
                     joyStickMaxValues_[iJoyStick][i] = 32767;
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MaxValue", i, omni_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MaxValue", i, multi_cast<std::string>(joyStickMaxValues_[iJoyStick][i]), false);
 
                 // Middle values
                 ConfigFileManager::getInstance().setValue(ConfigFileType::JoyStickCalibration,
-                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, omni_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
+                    this->joyStickIDs_[iJoyStick], "MiddleValue", i, multi_cast<std::string>(joyStickMiddleValues_[iJoyStick][i]), false);
             }
         }
@@ -1169,5 +1166,5 @@
         else
         {
-            float fValue = value - joyStickCalibrations_[iJoyStick].middleValue[axis];
+            float fValue = static_cast<float>(value - joyStickCalibrations_[iJoyStick].middleValue[axis]);
             if (fValue > 0.0f)
                 fValue *= joyStickCalibrations_[iJoyStick].positiveCoeff[axis];
Index: code/trunk/src/core/input/InputManager.h
===================================================================
--- code/trunk/src/core/input/InputManager.h	(revision 3110)
+++ code/trunk/src/core/input/InputManager.h	(revision 3196)
@@ -40,6 +40,11 @@
 
 #include <map>
+#include <set>
+#include <string>
 #include <vector>
-#include <stack>
+#include <ois/OISKeyboard.h>
+#include <ois/OISMouse.h>
+#include <ois/OISJoyStick.h>
+
 #include "util/Math.h"
 #include "util/OrxEnum.h"
Index: code/trunk/src/core/input/InputState.h
===================================================================
--- code/trunk/src/core/input/InputState.h	(revision 3110)
+++ code/trunk/src/core/input/InputState.h	(revision 3196)
@@ -39,5 +39,4 @@
 #include <string>
 #include <vector>
-#include "core/Executor.h"
 #include "InputInterfaces.h"
 
@@ -63,6 +62,6 @@
         void resetHandlersChanged() { bHandlersChanged_ = false; }
 
-        virtual void onEnter() { if (executorOnEnter_) (*executorOnEnter_)(); }
-        virtual void onLeave() { if (executorOnLeave_) (*executorOnLeave_)(); }
+        virtual void onEnter() = 0;
+        virtual void onLeave() = 0;
 
         virtual void registerOnEnter(Executor* executor)      { executorOnEnter_ = executor; }
@@ -92,9 +91,9 @@
         InputState()
             : bHandlersChanged_(false)
+            , executorOnEnter_(0)
+            , executorOnLeave_(0)
             , priority_(0)
             , bAlwaysGetsInput_(false)
             , bTransparent_(false)
-            , executorOnEnter_(0)
-            , executorOnLeave_(0)
         { }
         virtual ~InputState() { }
@@ -108,4 +107,6 @@
 
         bool bHandlersChanged_;
+        Executor*                                   executorOnEnter_;
+        Executor*                                   executorOnLeave_;
 
     private:
@@ -123,7 +124,4 @@
         bool                                        bAlwaysGetsInput_;
         bool                                        bTransparent_;
-
-        Executor*                                   executorOnEnter_;
-        Executor*                                   executorOnLeave_;
     };
 }
Index: code/trunk/src/core/input/KeyBinder.cc
===================================================================
--- code/trunk/src/core/input/KeyBinder.cc	(revision 3110)
+++ code/trunk/src/core/input/KeyBinder.cc	(revision 3196)
@@ -33,7 +33,4 @@
 
 #include "KeyBinder.h"
-
-#include <fstream>
-#include <string>
 
 #include "util/Convert.h"
@@ -320,5 +317,5 @@
                     {
                         mouseAxes_[2*i + 0].absVal_
-                            = -mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
+                            = -mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
                         mouseAxes_[2*i + 1].absVal_ = 0.0f;
                     }
@@ -327,5 +324,5 @@
                         mouseAxes_[2*i + 0].absVal_ = 0.0f;
                         mouseAxes_[2*i + 1].absVal_
-                            =  mouseRelative_[i] / deriveTime_ * 0.0005 * mouseSensitivityDerived_;
+                            =  mouseRelative_[i] / deriveTime_ * 0.0005f * mouseSensitivityDerived_;
                     }
                     else
Index: code/trunk/src/core/input/KeyBinder.h
===================================================================
--- code/trunk/src/core/input/KeyBinder.h	(revision 3110)
+++ code/trunk/src/core/input/KeyBinder.h	(revision 3196)
@@ -38,6 +38,7 @@
 #include "core/CorePrereqs.h"
 
+#include <cassert>
+#include <string>
 #include <vector>
-#include <cassert>
 
 #include "InputInterfaces.h"
Index: code/trunk/src/core/input/KeyDetector.cc
===================================================================
--- code/trunk/src/core/input/KeyDetector.cc	(revision 3110)
+++ code/trunk/src/core/input/KeyDetector.cc	(revision 3196)
@@ -34,9 +34,7 @@
 
 #include "KeyDetector.h"
+
 #include "util/Debug.h"
 #include "core/CoreIncludes.h"
-#include "core/CommandExecutor.h"
-#include "core/CommandEvaluation.h"
-#include "InputCommands.h"
 #include "Button.h"
 
Index: code/trunk/src/core/input/KeyDetector.h
===================================================================
--- code/trunk/src/core/input/KeyDetector.h	(revision 3110)
+++ code/trunk/src/core/input/KeyDetector.h	(revision 3196)
@@ -38,4 +38,5 @@
 #include "core/CorePrereqs.h"
 
+#include <string>
 #include "KeyBinder.h"
 
Index: code/trunk/src/core/input/SimpleInputState.cc
===================================================================
--- code/trunk/src/core/input/SimpleInputState.cc	(revision 3110)
+++ code/trunk/src/core/input/SimpleInputState.cc	(revision 3196)
@@ -34,4 +34,5 @@
 
 #include "SimpleInputState.h"
+#include "core/Executor.h"
 
 namespace orxonox
@@ -148,3 +149,15 @@
         bHandlersChanged_ = true;
     }
+
+    void SimpleInputState::onEnter()
+    {
+        if (executorOnEnter_)
+            (*executorOnEnter_)();
+    }
+
+    void SimpleInputState::onLeave()
+    {
+        if (executorOnLeave_)
+            (*executorOnLeave_)();
+    }
 }
Index: code/trunk/src/core/input/SimpleInputState.h
===================================================================
--- code/trunk/src/core/input/SimpleInputState.h	(revision 3110)
+++ code/trunk/src/core/input/SimpleInputState.h	(revision 3196)
@@ -79,4 +79,7 @@
         void update();
         void numberOfJoySticksChanged(unsigned int n);
+
+        void onEnter();
+        void onLeave();
 
         KeyHandler*                   keyHandler_;
Index: code/trunk/src/cpptcl/CMakeLists.txt
===================================================================
--- code/trunk/src/cpptcl/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/cpptcl/CMakeLists.txt	(revision 3196)
@@ -31,5 +31,4 @@
   details/methods_v.h
 )
-GENERATE_SOURCE_GROUPS(${CPPTCL_FILES})
 
 # No warnings needed from third party libraries
@@ -37,12 +36,12 @@
 ADD_COMPILER_FLAGS("-w")
 
-IF(MSVC)
-  ADD_LIBRARY(cpptcl_orxonox STATIC ${CPPTCL_FILES})
-ELSE()
-  ADD_LIBRARY(cpptcl_orxonox SHARED ${CPPTCL_FILES})
-  ORXONOX_INSTALL(cpptcl_orxonox)
-ENDIF()
-
-TARGET_LINK_LIBRARIES(cpptcl_orxonox ${TCL_LIBRARY})
-
-SET_TARGET_PROPERTIES(cpptcl_orxonox PROPERTIES VERSION 1.1.3)
+ORXONOX_ADD_LIBRARY(cpptcl_orxonox
+  ORXONOX_EXTERNAL
+  NO_DLL_INTERFACE
+  VERSION
+    1.1.3
+  LINK_LIBRARIES
+    ${TCL_LIBRARY}
+  SOURCE_FILES
+    ${CPPTCL_FILES}
+)
Index: code/trunk/src/network/CMakeLists.txt
===================================================================
--- code/trunk/src/network/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/network/CMakeLists.txt	(revision 3196)
@@ -37,18 +37,18 @@
 ADD_SUBDIRECTORY(packet)
 ADD_SUBDIRECTORY(synchronisable)
-GET_ALL_HEADER_FILES(NETWORK_HDR_FILES)
-SET(NETWORK_FILES ${NETWORK_SRC_FILES} ${NETWORK_HDR_FILES})
 
-GENERATE_SOURCE_GROUPS(${NETWORK_FILES})
-
-ADD_LIBRARY(network SHARED ${NETWORK_FILES})
-SET_TARGET_PROPERTIES(network PROPERTIES DEFINE_SYMBOL "NETWORK_SHARED_BUILD")
-TARGET_LINK_LIBRARIES(network
-  ${ZLIB_LIBRARY}
-  ${ENET_LIBRARY}
-  ${Boost_THREAD_LIBRARY}
-  util
-  core
+ORXONOX_ADD_LIBRARY(network
+  FIND_HEADER_FILES
+  DEFINE_SYMBOL
+    "NETWORK_SHARED_BUILD"
+  PCH_FILE
+    NetworkPrecompiledHeaders.h
+  LINK_LIBRARIES
+    ${ZLIB_LIBRARY}
+    ${ENET_LIBRARY}
+    ${Boost_THREAD_LIBRARY}
+    util
+    core
+  SOURCE_FILES
+    ${NETWORK_SRC_FILES}
 )
-
-ORXONOX_INSTALL(network)
Index: code/trunk/src/network/GamestateClient.cc
===================================================================
--- code/trunk/src/network/GamestateClient.cc	(revision 3110)
+++ code/trunk/src/network/GamestateClient.cc	(revision 3196)
@@ -34,5 +34,4 @@
 #include "core/CoreIncludes.h"
 #include "core/BaseObject.h"
-#include "core/Iterator.h"
 #include "synchronisable/Synchronisable.h"
 #include "synchronisable/NetworkCallbackManager.h"
Index: code/trunk/src/network/Host.h
===================================================================
--- code/trunk/src/network/Host.h	(revision 3110)
+++ code/trunk/src/network/Host.h	(revision 3196)
@@ -36,5 +36,5 @@
 namespace orxonox {
 
-  const int CLIENTID_SERVER = 0;
+  const unsigned int CLIENTID_SERVER = 0;
   const unsigned int NETWORK_FREQUENCY = 30;
   const float NETWORK_PERIOD = 1.0f/NETWORK_FREQUENCY;
Index: code/trunk/src/network/NetworkFunction.h
===================================================================
--- code/trunk/src/network/NetworkFunction.h	(revision 3110)
+++ code/trunk/src/network/NetworkFunction.h	(revision 3196)
@@ -36,5 +36,7 @@
 #include <map>
 #include <cassert>
+#include <boost/preprocessor/cat.hpp>
 #include "util/MultiType.h"
+#include "core/Functor.h"
 #include "synchronisable/Synchronisable.h"
 #include "OrxonoxConfig.h"
@@ -214,7 +216,7 @@
 
 #define registerStaticNetworkFunction( functionPointer ) \
-  static void* MACRO_CONCATENATE( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
+  static void* BOOST_PP_CAT( NETWORK_FUNCTION_, __LINE__ ) = registerStaticNetworkFunctionFct( functionPointer, #functionPointer );
 #define registerMemberNetworkFunction( class, function ) \
-  static void* MACRO_CONCATENATE( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
+  static void* BOOST_PP_CAT( NETWORK_FUNCTION_##class, __LINE__ ) = registerMemberNetworkFunctionFct<class>( &class::function, #class "_" #function);
   // call it with functionPointer, clientID, args
 #define callStaticNetworkFunction( functionPointer, ...) \
Index: code/trunk/src/network/NetworkPrecompiledHeaders.h
===================================================================
--- code/trunk/src/network/NetworkPrecompiledHeaders.h	(revision 3196)
+++ code/trunk/src/network/NetworkPrecompiledHeaders.h	(revision 3196)
@@ -0,0 +1,69 @@
+/*
+ *   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
+    Compilation of the most often used header files in the network library
+*/
+
+#include "NetworkPrereqs.h"
+
+#include <fstream>
+#include <iostream>
+#include <list>
+#include <map>
+#include <set>
+#include <sstream>
+#include <string>
+#include <vector>
+
+
+#ifdef ORXONOX_COMPILER_MSVC
+
+#define WIN32_LEAN_AND_MEAN
+#include <enet/enet.h>
+#undef max
+#undef min
+
+// Too larg PCH file if you include this and only 10% faster
+//#include <boost/thread/recursive_mutex.hpp>
+
+#include "util/CRC32.h"
+#include "util/Debug.h"
+#include "util/Math.h"
+#include "util/mbool.h"
+#include "util/MultiType.h"
+#include "util/String.h"
+
+#include "core/Core.h"
+#include "core/CoreIncludes.h"
+#include "core/Functor.h"
+#include "core/GameMode.h"
+
+#endif /* ORXONOX_COMPILER_MSVC */
Index: code/trunk/src/network/Server.cc
===================================================================
--- code/trunk/src/network/Server.cc	(revision 3110)
+++ code/trunk/src/network/Server.cc	(revision 3196)
@@ -54,5 +54,4 @@
 #include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
 #include "packet/Chat.h"
 #include "packet/Packet.h"
Index: code/trunk/src/network/TODO
===================================================================
--- code/trunk/src/network/TODO	(revision 3110)
+++ 	(revision )
@@ -1,15 +1,0 @@
-TODO:
-
-- change ConnectionManager clientlist [done]
-- change gamestatemanager clientlist [done]
-- put them together into ClientInformation [done]
-
-- do better gamestate-update/snapshot-handling [partially done]
-- integrate ClientInformation into gamestatemanager [done]
-
-- write dummyserver and dummyclient (chat system) [done]
-
-- include GameStateClient into Client and write processGamestate (also packetdecoder (virtual))
-- create object with worldentity .....
-
-- try and error ;)
Index: code/trunk/src/network/packet/Gamestate.cc
===================================================================
--- code/trunk/src/network/packet/Gamestate.cc	(revision 3110)
+++ code/trunk/src/network/packet/Gamestate.cc	(revision 3196)
@@ -36,5 +36,4 @@
 #include "core/GameMode.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
 
 
Index: code/trunk/src/ogreceguirenderer/CMakeLists.txt
===================================================================
--- code/trunk/src/ogreceguirenderer/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/ogreceguirenderer/CMakeLists.txt	(revision 3196)
@@ -27,5 +27,4 @@
   OgreCEGUITexture.cpp
 )
-GENERATE_SOURCE_GROUPS(${OCR_FILES})
 
 # No warnings needed from third party libraries
@@ -33,12 +32,14 @@
 ADD_COMPILER_FLAGS("-w")
 
-ADD_LIBRARY(ogreceguirenderer_orxonox SHARED ${OCR_FILES})
-SET_TARGET_PROPERTIES(ogreceguirenderer_orxonox PROPERTIES DEFINE_SYMBOL "OGRE_GUIRENDERER_EXPORTS")
-TARGET_LINK_LIBRARIES(ogreceguirenderer_orxonox
-  ${OGRE_LIBRARY}
-  ${CEGUI_LIBRARY}
+ORXONOX_ADD_LIBRARY(ogreceguirenderer_orxonox
+  ORXONOX_EXTERNAL
+  LINK_LIBRARIES
+    ${OGRE_LIBRARY}
+    ${CEGUI_LIBRARY}
+  DEFINE_SYMBOL
+    "OGRE_GUIRENDERER_EXPORTS"
+  VERSION
+    1.4.9
+  SOURCE_FILES
+    ${OCR_FILES}
 )
-
-SET_TARGET_PROPERTIES(ogreceguirenderer_orxonox PROPERTIES VERSION 1.4.9)
-
-ORXONOX_INSTALL(ogreceguirenderer_orxonox)
Index: code/trunk/src/ois/CMakeLists.txt
===================================================================
--- code/trunk/src/ois/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/ois/CMakeLists.txt	(revision 3196)
@@ -50,6 +50,4 @@
 ENDIF()
 
-GENERATE_SOURCE_GROUPS(${OIS_FILES})
-
 # No warnings needed from third party libraries
 REMOVE_COMPILER_FLAGS("-W3 -W4" MSVC)
@@ -58,12 +56,15 @@
 INCLUDE_DIRECTORIES(.)
 
-ADD_LIBRARY(ois_orxonox SHARED ${OIS_FILES})
-SET_TARGET_PROPERTIES(ois_orxonox PROPERTIES DEFINE_SYMBOL "OIS_NONCLIENT_BUILD")
+ORXONOX_ADD_LIBRARY(ois_orxonox
+  ORXONOX_EXTERNAL
+  DEFINE_SYMBOL
+    "OIS_NONCLIENT_BUILD"
+  VERSION
+    1.2
+  SOURCE_FILES
+    ${OIS_FILES}
+)
 
 IF(WIN32)
   TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
 ENDIF()
-
-SET_TARGET_PROPERTIES(ois_orxonox PROPERTIES VERSION 1.2)
-
-ORXONOX_INSTALL(ois_orxonox)
Index: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/CMakeLists.txt	(revision 3196)
@@ -28,40 +28,52 @@
 ADD_SUBDIRECTORY(gamestates)
 ADD_SUBDIRECTORY(gui)
+ADD_SUBDIRECTORY(interfaces)
 ADD_SUBDIRECTORY(objects)
 ADD_SUBDIRECTORY(overlays)
+ADD_SUBDIRECTORY(sound)
 ADD_SUBDIRECTORY(tools)
-ADD_SUBDIRECTORY(sound)
-GET_ALL_HEADER_FILES(ORXONOX_HDR_FILES)
-SET(ORXONOX_FILES ${ORXONOX_SRC_FILES} ${ORXONOX_HDR_FILES})
 
-GENERATE_SOURCE_GROUPS(${ORXONOX_FILES})
-GENERATE_TOLUA_BINDINGS(Orxonox ORXONOX_FILES INPUTFILES gui/GUIManager.h objects/quest/QuestManager.h objects/quest/QuestDescription.h objects/pickup/PickupInventory.h objects/pickup/BaseItem.h)
+# Translate argument
+IF(ORXONOX_USE_WINMAIN)
+  SET(ORXONOX_WIN32 WIN32)
+ENDIF()
 
-ADD_EXECUTABLE(orxonox ${ORXONOX_FILES})
+ORXONOX_ADD_EXECUTABLE(orxonox
+  FIND_HEADER_FILES
+  TOLUA_FILES
+    gui/GUIManager.h
+    objects/pickup/BaseItem.h
+    objects/pickup/PickupInventory.h
+    objects/quest/QuestDescription.h
+    objects/quest/QuestManager.h
+  PCH_FILE
+    OrxonoxPrecompiledHeaders.h
+  PCH_NO_DEFAULT
+  # When defined as WIN32 this removes the console window on Windows
+  ${ORXONOX_WIN32}
+  LINK_LIBRARIES
+    ${OGRE_LIBRARY}
+    ${CEGUI_LIBRARY}
+    ${LUA_LIBRARIES}
+    ${CEGUILUA_LIBRARY}
+    ${Boost_SYSTEM_LIBRARY}
+    ${OPENAL_LIBRARY}
+    ${ALUT_LIBRARY}
+    ${VORBISFILE_LIBRARY}
+    ${VORBIS_LIBRARY}
+    ${OGG_LIBRARY}
+    ogreceguirenderer_orxonox
+    tinyxml++_orxonox
+    tolua++_orxonox
+    bullet_orxonox
+    util
+    core
+    network
+  SOURCE_FILES ${ORXONOX_SRC_FILES}
+)
+
 GET_TARGET_PROPERTY(_exec_loc orxonox LOCATION)
 GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
 SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
-
-TARGET_LINK_LIBRARIES(orxonox
-  ${OGRE_LIBRARY}
-  ${CEGUI_LIBRARY}
-  ${LUA_LIBRARIES}
-  ${CEGUILUA_LIBRARY}
-  ${Boost_SYSTEM_LIBRARY}
-  ${OPENAL_LIBRARY}
-  ${ALUT_LIBRARY}
-  ${VORBISFILE_LIBRARY}
-  ${VORBIS_LIBRARY}
-  ${OGG_LIBRARY}
-  ogreceguirenderer_orxonox
-  tinyxml++_orxonox
-  tolua++_orxonox
-  bullet_orxonox
-  util
-  core
-  network
-)
-
-ORXONOX_INSTALL(orxonox)
 
 
@@ -81,4 +93,4 @@
   STRING(REGEX REPLACE "^Visual Studio ([0-9][0-9]?) .*$" "\\1"
          VISUAL_STUDIO_VERSION_SIMPLE "${CMAKE_GENERATOR}")
-  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
+  CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/orxonox.vcproj.user.in" "${CMAKE_CURRENT_BINARY_DIR}/orxonox.vcproj.user")
 ENDIF(MSVC)
Index: code/trunk/src/orxonox/CameraManager.cc
===================================================================
--- code/trunk/src/orxonox/CameraManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/CameraManager.cc	(revision 3196)
@@ -30,14 +30,12 @@
 #include <OgreSceneManager.h>
 #include <OgreViewport.h>
-#include <OgreCamera.h>
 #include <OgreCompositorManager.h>
-#include <OgreResource.h>
 
+#include "util/String.h"
 #include "core/GameMode.h"
-#include "core/Iterator.h"
+#include "core/ObjectList.h"
+#include "tools/Shader.h"
 #include "objects/worldentities/Camera.h"
 #include "objects/Scene.h"
-#include "tools/Shader.h"
-#include "util/String.h"
 #include "gui/GUIManager.h"
 
Index: code/trunk/src/orxonox/CameraManager.h
===================================================================
--- code/trunk/src/orxonox/CameraManager.h	(revision 3110)
+++ code/trunk/src/orxonox/CameraManager.h	(revision 3196)
@@ -40,5 +40,5 @@
 #include <cassert>
 #include <list>
-#include <OgrePrerequisites.h>
+#include "util/OgreForwardRefs.h"
 
 namespace orxonox
@@ -55,15 +55,15 @@
             void releaseFocus(Camera* camera);
 
+            void useCamera(Ogre::Camera* camera);
+
             static CameraManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
             static CameraManager* getInstancePtr() { return singletonRef_s; }
 
-            void useCamera(Ogre::Camera* camera);
+        private:
+            CameraManager(const CameraManager&); // don't use
 
-        private:
-            CameraManager(const CameraManager&);
-
-            std::list<Camera*> cameraList_;
-            Ogre::Viewport* viewport_;
-            Ogre::Camera* fallbackCamera_;
+            std::list<Camera*>    cameraList_;
+            Ogre::Viewport*       viewport_;
+            Ogre::Camera*         fallbackCamera_;
 
             static CameraManager* singletonRef_s;
Index: code/trunk/src/orxonox/GraphicsManager.cc
===================================================================
--- code/trunk/src/orxonox/GraphicsManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/GraphicsManager.cc	(revision 3196)
@@ -52,5 +52,4 @@
 
 #include "SpecialConfig.h"
-#include "util/Debug.h"
 #include "util/Exception.h"
 #include "util/String.h"
@@ -63,6 +62,9 @@
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "tools/WindowEventListener.h"
 #include "tools/ParticleInterface.h"
+#include "interfaces/WindowEventListener.h"
+
+// HACK!
+#include "overlays/map/Map.h"
 
 namespace orxonox
@@ -88,6 +90,4 @@
         , viewport_(0)
         , ogreWindowEventListener_(0)
-        , avgTickTime_(0.0f)
-        , avgFramesPerSecond_(0.0f)
     {
         RegisterObject(GraphicsManager);
@@ -144,4 +144,7 @@
 //            Ogre::RenderSystem* renderer = this->ogreRoot_->getRenderSystem();
 //            renderer->destroyRenderWindow("Orxonox");
+
+            // HACK! This fixes an exit crash
+            Map::hackDestroyMap();
 
             // unload all compositors
Index: code/trunk/src/orxonox/GraphicsManager.h
===================================================================
--- code/trunk/src/orxonox/GraphicsManager.h	(revision 3110)
+++ code/trunk/src/orxonox/GraphicsManager.h	(revision 3196)
@@ -39,8 +39,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include <cassert>
 #include <string>
-#include <cassert>
 #include <OgreLog.h>
-
 #include "core/OrxonoxClass.h"
 
@@ -66,5 +65,5 @@
             { return this->detailLevelParticle_; }
 
-        inline Ogre::Viewport* getViewport() const
+        inline Ogre::Viewport* getViewport()
             { return this->viewport_; }
         inline Ogre::RenderWindow* getRenderWindow()
@@ -73,5 +72,6 @@
         void setCamera(Ogre::Camera* camera);
 
-        static GraphicsManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
+        inline static GraphicsManager& getInstance()
+            { assert(singletonRef_s); return *singletonRef_s; }
 
     private:
@@ -101,8 +101,4 @@
         OgreWindowEventListener* ogreWindowEventListener_;
 
-        // stats (Hack)
-        float               avgTickTime_;              //!< time in ms to tick() one frame
-        float               avgFramesPerSecond_;       //!< number of frames processed in one second
-
         // config values
         unsigned int        detailLevelParticle_;      //!< Detail level of particle effects (0: off, 1: low, 2: normal, 3: high)
Index: code/trunk/src/orxonox/LevelManager.cc
===================================================================
--- code/trunk/src/orxonox/LevelManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/LevelManager.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "LevelManager.h"
 
+#include <map>
 #include "PlayerManager.h"
 #include "objects/Level.h"
Index: code/trunk/src/orxonox/LevelManager.h
===================================================================
--- code/trunk/src/orxonox/LevelManager.h	(revision 3110)
+++ code/trunk/src/orxonox/LevelManager.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <cassert>
 #include <list>
-#include <map>
-#include <cassert>
 
 namespace orxonox
@@ -57,4 +56,5 @@
 
             std::list<Level*> levels_s;
+
             static LevelManager* singletonRef_s;
     };
Index: code/trunk/src/orxonox/Main.cc
===================================================================
--- code/trunk/src/orxonox/Main.cc	(revision 3110)
+++ code/trunk/src/orxonox/Main.cc	(revision 3196)
@@ -28,14 +28,11 @@
  */
  
- /**
- @mainpage Orxonox Documentation
- */
+/**
+@file
+@brief
+    Entry point of the program.
+*/
 
- /**
- @file
- @brief Entry point of the program.
-  */
-
-#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
 
 #include "util/Debug.h"
@@ -47,5 +44,9 @@
     Main method. Game starts here (except for static initialisations).
 */
+#ifdef ORXONOX_USE_WINMAIN
+INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
+#else
 int main(int argc, char** argv)
+#endif
 {
     {
Index: code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h	(revision 3196)
+++ code/trunk/src/orxonox/OrxonoxPrecompiledHeaders.h	(revision 3196)
@@ -0,0 +1,100 @@
+/*
+ *   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
+    Compilation of the most often used header files in the orxonox executable
+*/
+
+#include "OrxonoxPrereqs.h"
+
+#include <deque>
+#include <fstream>
+#include <iostream>
+#include <list>
+#include <map>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <string>
+#include <vector>
+
+// Prevent headers from including winsock.h that messes with winsock2.h from ENet
+#define WIN32_LEAN_AND_MEAN
+
+
+#ifdef ORXONOX_COMPILER_MSVC
+
+// Note: Numbers after the include specify the number of times included (2009-06-19)
+// The sizes in MB was just to see how much the MSVC9 PCH file increases for Ogre includes
+#include <OgreMaterial.h> // 33, 2.7MB
+#include <OgreRenderable.h> // 32, 2.6MB
+#include <OgreSingleton.h> // 28, 0.0MB
+#include <OgreSceneNode.h> // 25, 1.1MB
+#include <OgreTexture.h> // 25, 0.2MB (1.1MB)
+#include <OgreMovableObject.h> // 22, 1.3MB
+#include <OgreResourceGroupManager.h> // 21, 1.4MB
+#include <OgreTechnique.h> // 18, 1.2MB
+//#include <OgreSceneManager.h> // 16, 7.4MB
+
+#endif
+
+
+//#include <boost/preprocessor/cat.hpp> // 15
+//#include <boost/shared_ptr.hpp> // 13
+#include <LinearMath/btMotionState.h>
+#include <tinyxml/ticpp.h>
+
+// Just in case some header included windows.h
+#undef min
+#undef max
+
+//--------- Orxonox files --------
+//--------------------------------
+
+//#include "util/Convert.h" // 24
+#include "util/Debug.h"
+#include "util/Exception.h"
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "util/OrxAssert.h"
+#include "util/String.h"
+#include "util/SubString.h"
+
+#include "core/BaseObject.h"
+//#include "core/ConfigValueIncludes.h" // 19
+//#include "core/ConsoleCommand.h" // 15
+#include "core/Core.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
+
+#include "network/synchronisable/Synchronisable.h"
+//#include "network/ClientInformation.h" // 26
+//#include "network/ClientConnectionListener.h" // 24
Index: code/trunk/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 3110)
+++ code/trunk/src/orxonox/OrxonoxPrereqs.h	(revision 3196)
@@ -247,6 +247,4 @@
     template <class T>
     class Timer;
-    class DynamicLines;
-    class DynamicRenderable;
 
     // overlays
@@ -254,4 +252,5 @@
     class DebugFPSText;
     class DebugRTRText;
+    class GUIOverlay;
     class HUDBar;
     class HUDNavigation;
@@ -288,12 +287,12 @@
 namespace Ogre
 {
-    // some got forgotten in OgrePrerequisites
-    class BorderPanelOverlayElement;
-    class PanelOverlayElement;
-    class TextAreaOverlayElement;
+    // OGRE Wiki adapted code
+    class DynamicLines;
+    class DynamicRenderable;
 }
 
 namespace CEGUI
 {
+    class DefaultLogger;
     class LuaScriptModule;
 
@@ -304,5 +303,4 @@
 
 // Bullet Physics Engine
-
 class btTransform;
 class btVector3;
@@ -324,5 +322,11 @@
 class btSequentialImpulseConstraintSolver;
 
-// lua
+// ALUT
+typedef struct ALCcontext_struct ALCcontext;
+typedef struct ALCdevice_struct ALCdevice;
+typedef unsigned int ALuint;
+typedef int ALint;
+
+// Lua
 struct lua_State;
 
Index: code/trunk/src/orxonox/PawnManager.cc
===================================================================
--- code/trunk/src/orxonox/PawnManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/PawnManager.cc	(revision 3196)
@@ -31,5 +31,4 @@
 #include "core/CoreIncludes.h"
 #include "objects/worldentities/pawns/Pawn.h"
-
 
 namespace orxonox
Index: code/trunk/src/orxonox/PawnManager.h
===================================================================
--- code/trunk/src/orxonox/PawnManager.h	(revision 3110)
+++ code/trunk/src/orxonox/PawnManager.h	(revision 3196)
@@ -31,5 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-#include "objects/Tickable.h"
+#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/PlayerManager.cc
===================================================================
--- code/trunk/src/orxonox/PlayerManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/PlayerManager.cc	(revision 3196)
@@ -29,9 +29,9 @@
 #include "PlayerManager.h"
 
-#include "LevelManager.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "objects/Level.h"
 #include "objects/infos/HumanPlayer.h"
+#include "LevelManager.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/PlayerManager.h
===================================================================
--- code/trunk/src/orxonox/PlayerManager.h	(revision 3110)
+++ code/trunk/src/orxonox/PlayerManager.h	(revision 3196)
@@ -44,6 +44,6 @@
             virtual ~PlayerManager();
 
-            static PlayerManager& getInstance()
-            { assert(singletonRef_s); return *singletonRef_s; }
+            inline static PlayerManager& getInstance()
+                { assert(singletonRef_s); return *singletonRef_s; }
 
             PlayerInfo* getClient(unsigned int clientID) const;
Index: code/trunk/src/orxonox/gamestates/GSClient.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSClient.cc	(revision 3196)
@@ -29,5 +29,5 @@
 #include "GSClient.h"
 
-#include "core/input/InputManager.h"
+#include "util/Exception.h"
 #include "core/Clock.h"
 #include "core/CommandLine.h"
Index: code/trunk/src/orxonox/gamestates/GSClient.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSClient.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSClient.h	(revision 3196)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
Index: code/trunk/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSDedicated.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSDedicated.cc	(revision 3196)
@@ -29,12 +29,11 @@
 #include "GSDedicated.h"
 
+#include "util/Debug.h"
+#include "util/Sleep.h"
 #include "core/Clock.h"
 #include "core/CommandLine.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "core/Iterator.h"
 #include "network/Server.h"
-#include "objects/Tickable.h"
-#include "util/Sleep.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/gamestates/GSDedicated.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSDedicated.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSDedicated.h	(revision 3196)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
Index: code/trunk/src/orxonox/gamestates/GSGraphics.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.cc	(revision 3196)
@@ -28,6 +28,7 @@
 
 /**
-    @file
-    @brief Implementation of Graphics GameState class.
+@file
+@brief
+    Implementation of Graphics GameState class.
  */
 
@@ -37,5 +38,4 @@
 #include <OgreRenderWindow.h>
 
-#include "util/Debug.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/Clock.h"
@@ -52,4 +52,5 @@
 #include "overlays/console/InGameConsole.h"
 #include "gui/GUIManager.h"
+#include "sound/SoundManager.h"
 #include "GraphicsManager.h"
 
@@ -64,4 +65,5 @@
         , guiManager_(0)
         , graphicsManager_(0)
+        , soundManager_(0)
         , masterKeyBinder_(0)
         , masterInputState_(0)
@@ -95,4 +97,5 @@
         \li creates input manager
         \li loads master key bindings
+        \li loads the SoundManager
         \li loads ingame console
         \li loads GUI interface (GUIManager)
@@ -128,4 +131,7 @@
         masterKeyBinder_->loadBindings("masterKeybindings.ini");
         masterInputState_->setKeyHandler(masterKeyBinder_);
+
+        // Load the SoundManager
+        soundManager_ = new SoundManager();
 
         // Load the InGameConsole
@@ -173,4 +179,6 @@
         delete this->debugOverlay_;
 
+        delete this->soundManager_;
+
         delete this->inputManager_;
         this->inputManager_ = 0;
Index: code/trunk/src/orxonox/gamestates/GSGraphics.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSGraphics.h	(revision 3196)
@@ -27,8 +27,9 @@
  */
 
- /**
-    @file
-    @brief Declaration of the Graphics GameState class.
-  */
+/**
+@file
+@brief
+    Declaration of the Graphics GameState class.
+*/
 
 #ifndef _GSGraphics_H__
@@ -36,13 +37,13 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/GameState.h"
-#include "tools/WindowEventListener.h"
+#include "interfaces/WindowEventListener.h"
 
 namespace orxonox
 {
     /**
-    @class GSGraphics
     @brief
-        Game state used when displaying graphics of any kind
+        Game state used when displaying graphics of any kind. Another blubb resides here.
 
         This game state is only left out if we start a dedicated server where no graphics are present.
@@ -71,4 +72,5 @@
         GUIManager*           guiManager_;          //!< Interface to GUI
         GraphicsManager*      graphicsManager_;     //!< Interface to Ogre
+        SoundManager*         soundManager_;        //!< Keeps track of SoundBase objects
 
         KeyBinder*            masterKeyBinder_;     //!< Key binder for master key bindings
Index: code/trunk/src/orxonox/gamestates/GSIOConsole.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSIOConsole.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSIOConsole.cc	(revision 3196)
@@ -30,7 +30,4 @@
 
 #include <iostream>
-#include <OgreFrameListener.h>
-#include <OgreRoot.h>
-#include <OgreTimer.h>
 
 #include "core/ConsoleCommand.h"
Index: code/trunk/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSLevel.cc	(revision 3196)
@@ -33,23 +33,24 @@
 #include "core/input/SimpleInputState.h"
 #include "core/input/KeyBinder.h"
-#include "core/Loader.h"
-#include "core/XMLFile.h"
-#include "core/CommandExecutor.h"
+#include "core/Clock.h"
+#include "core/CommandLine.h"
 #include "core/ConsoleCommand.h"
-#include "core/CommandLine.h"
 #include "core/ConfigValueIncludes.h"
-#include "core/Core.h"
 #include "core/CoreIncludes.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "objects/Tickable.h"
+#include "core/Core.h"
+#include "core/Loader.h"
+#include "core/XMLFile.h"
+
+#include "interfaces/Tickable.h"
 #include "objects/Radar.h"
+#include "objects/quest/QuestManager.h"
+#include "overlays/notifications/NotificationManager.h"
+#include "gui/GUIManager.h"
 #include "CameraManager.h"
 #include "GraphicsManager.h"
 #include "LevelManager.h"
 #include "PlayerManager.h"
-#include "gui/GUIManager.h"
-#include "objects/quest/QuestManager.h"
-#include "overlays/notifications/NotificationManager.h"
 
 namespace orxonox
@@ -148,12 +149,12 @@
         if (show)
         {
-            GUIManager::getInstancePtr()->showGUI("inGameTest");
-            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            GUIManager::getInstance().showGUI("inGameTest");
+            GUIManager::getInstance().executeCode("showCursor()");
             InputManager::getInstance().requestEnterState("guiMouseOnly");
         }
         else
         {
-            GUIManager::getInstancePtr()->executeCode("hideGUI(\"inGameTest\")");
-            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
             InputManager::getInstance().requestLeaveState("guiMouseOnly");
         }
Index: code/trunk/src/orxonox/gamestates/GSLevel.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSLevel.h	(revision 3196)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
 #include "core/OrxonoxClass.h"
 #include "core/GameState.h"
@@ -48,5 +50,4 @@
 
         static void showIngameGUI(bool show);
-        static void setLevel(std::string levelName);
 
         static XMLFile* startFile_s;
@@ -69,5 +70,5 @@
         LevelManager*         levelManager_;            //!< global level manager
         PlayerManager*        playerManager_;           //!< player manager for this level
-        QuestManager*          questManager_;
+        QuestManager*         questManager_;
         NotificationManager*  notificationManager_;
 
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.cc	(revision 3196)
@@ -29,15 +29,15 @@
 #include "GSMainMenu.h"
 
-//#include <OgreViewport.h>
 #include <OgreSceneManager.h>
+
+#include "core/input/InputManager.h"
+#include "core/input/SimpleInputState.h"
+#include "core/Game.h"
 #include "core/Clock.h"
 #include "core/ConsoleCommand.h"
-#include "core/Game.h"
-#include "core/input/InputManager.h"
-#include "core/input/SimpleInputState.h"
+#include "objects/Scene.h"
 #include "gui/GUIManager.h"
-#include "objects/Scene.h"
+#include "sound/SoundMainMenu.h"
 #include "GraphicsManager.h"
-#include "sound/SoundMainMenu.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/gamestates/GSMainMenu.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSMainMenu.h	(revision 3196)
@@ -31,5 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
+
+#include "util/OgreForwardRefs.h"
 #include "core/GameState.h"
 
Index: code/trunk/src/orxonox/gamestates/GSRoot.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSRoot.cc	(revision 3196)
@@ -29,14 +29,12 @@
 #include "GSRoot.h"
 
-#include "util/Exception.h"
-#include "util/Debug.h"
 #include "core/Clock.h"
+#include "core/CommandLine.h"
+#include "core/ConsoleCommand.h"
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "core/CommandLine.h"
-#include "core/ConsoleCommand.h"
-#include "tools/TimeFactorListener.h"
 #include "tools/Timer.h"
-#include "objects/Tickable.h"
+#include "interfaces/TimeFactorListener.h"
+#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/gamestates/GSRoot.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSRoot.h	(revision 3196)
@@ -32,5 +32,4 @@
 #include "OrxonoxPrereqs.h"
 #include "core/GameState.h"
-#include "core/OrxonoxClass.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSServer.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "GSServer.h"
 
+#include "util/Debug.h"
 #include "core/CommandLine.h"
 #include "core/Game.h"
Index: code/trunk/src/orxonox/gamestates/GSServer.h
===================================================================
--- code/trunk/src/orxonox/gamestates/GSServer.h	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSServer.h	(revision 3196)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/GameState.h"
 #include "network/NetworkPrereqs.h"
Index: code/trunk/src/orxonox/gamestates/GSStandalone.cc
===================================================================
--- code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 3110)
+++ code/trunk/src/orxonox/gamestates/GSStandalone.cc	(revision 3196)
@@ -29,11 +29,6 @@
 #include "GSStandalone.h"
 
-#include <OgreViewport.h>
-#include <OgreCamera.h>
 #include "core/Game.h"
 #include "core/GameMode.h"
-#include "core/ConsoleCommand.h"
-#include "gui/GUIManager.h"
-#include "GraphicsManager.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/gui/GUIManager.cc
===================================================================
--- code/trunk/src/orxonox/gui/GUIManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/gui/GUIManager.cc	(revision 3196)
@@ -24,21 +24,26 @@
  *      Benjamin Knecht
  *   Co-authors:
- *
+ *      ...
  *
  */
 
 /**
-    @file
-    @brief
-        Implementation of the GUIManager class.
+@file
+@brief
+    Implementation of the GUIManager class.
 */
 
 #include "GUIManager.h"
 
-#include <boost/filesystem/path.hpp>
-#include <OgreRenderWindow.h>
-#include <CEGUI.h>
+extern "C" {
+#include <lua.h>
+}
 #include <CEGUIDefaultLogger.h>
+#include <CEGUIExceptions.h>
+#include <CEGUIInputEvent.h>
+#include <CEGUIResourceProvider.h>
+#include <CEGUISystem.h>
 #include <ogreceguirenderer/OgreCEGUIRenderer.h>
+
 #include "SpecialConfig.h" // Configures the macro below
 #ifdef CEGUILUA_USE_INTERNAL_LIBRARY
@@ -49,5 +54,4 @@
 
 #include "util/Exception.h"
-#include "core/ConsoleCommand.h"
 #include "core/Core.h"
 #include "core/Clock.h"
@@ -56,10 +60,7 @@
 #include "core/Loader.h"
 
-extern "C" {
-#include <lua.h>
-}
-
 namespace orxonox
 {
+    static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
     GUIManager* GUIManager::singletonRef_s = 0;
 
@@ -139,7 +140,6 @@
 
                 // Create our own logger to specify the filepath
-                boost::filesystem::path ceguiLogFilepath(Core::getLogPath() / "cegui.log");
                 this->ceguiLogger_ = new DefaultLogger();
-                this->ceguiLogger_->setLogFilename(ceguiLogFilepath.string());
+                this->ceguiLogger_->setLogFilename(Core::getLogPathString() + "cegui.log");
                 // set the log level according to ours (translate by subtracting 1)
                 this->ceguiLogger_->setLoggingLevel(
@@ -271,5 +271,5 @@
         Returns false if the Overlay was already present.
     */
-    bool GUIManager::registerOverlay(std::string name, GUIOverlay* overlay)
+    bool GUIManager::registerOverlay(const std::string& name, GUIOverlay* overlay)
     {
         return (this->guiOverlays_.insert(std::pair<std::string, GUIOverlay*>(name, overlay))).second;
@@ -284,5 +284,5 @@
         Returns a pointer to the GUIOverlay.
     */
-    GUIOverlay* GUIManager::getOverlay(std::string name)
+    GUIOverlay* GUIManager::getOverlay(const std::string& name)
     {
         return (this->guiOverlays_.find(name))->second;
@@ -340,4 +340,13 @@
     }
 
+    void GUIManager::keyPressed(const KeyEvent& evt)
+    {
+        guiSystem_->injectKeyDown(evt.key); guiSystem_->injectChar(evt.text);
+    }
+    void GUIManager::keyReleased(const KeyEvent& evt)
+    {
+        guiSystem_->injectKeyUp(evt.key);
+    }
+
     /**
     @brief
@@ -382,4 +391,13 @@
             COUT(1) << ex.getMessage() << std::endl;
         }
+    }
+
+    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
+    {
+        guiSystem_->injectMouseMove(static_cast<float>(rel.x), static_cast<float>(rel.y));
+    }
+    void GUIManager::mouseScrolled(int abs, int rel)
+    {
+        guiSystem_->injectMouseWheelChange(static_cast<float>(rel));
     }
 
@@ -394,5 +412,5 @@
         Simple convertion from mouse event code in Orxonox to the one used in CEGUI.
      */
-    inline CEGUI::MouseButton GUIManager::convertButton(MouseButtonCode::ByEnum button)
+    static inline CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button)
     {
         switch (button)
Index: code/trunk/src/orxonox/gui/GUIManager.h
===================================================================
--- code/trunk/src/orxonox/gui/GUIManager.h	(revision 3110)
+++ code/trunk/src/orxonox/gui/GUIManager.h	(revision 3196)
@@ -22,12 +22,14 @@
  *   Author:
  *      Reto Grieder
+ *      Benjamin Knecht
  *   Co-authors:
- *      Benjamin Knecht
+ *      ...
  *
  */
 
 /**
-    @file
-    @brief Declaration of the GUIManager class.
+@file
+@brief
+    Declaration of the GUIManager class.
 */
 
@@ -36,14 +38,11 @@
 
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
+
+#include <map>
+#include <string>
 #include <CEGUIForwardRefs.h>
-#include <CEGUIInputEvent.h>
-#include <CEGUISystem.h>
+
+#include "util/OgreForwardRefs.h"
 #include "core/input/InputInterfaces.h"
-#include <map>
-#include "overlays/GUIOverlay.h"
-
-// Forward declaration
-namespace CEGUI { class DefaultLogger; }
 
 // tolua_begin
@@ -89,6 +88,6 @@
         void executeCode(const std::string& str);
 
-        bool registerOverlay(std::string name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.
-        GUIOverlay* getOverlay(std::string name); // Get the GUIOverlay of the GUI with the given name.
+        bool registerOverlay(const std::string& name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.
+        GUIOverlay* getOverlay(const std::string& name); // Get the GUIOverlay of the GUI with the given name.
 
         void setCamera(Ogre::Camera* camera);
@@ -105,8 +104,6 @@
 
         // keyHandler functions
-        void keyPressed (const KeyEvent& evt)
-            { guiSystem_->injectKeyDown(evt.key); guiSystem_->injectChar(evt.text); }
-        void keyReleased(const KeyEvent& evt)
-            { guiSystem_->injectKeyUp(evt.key); }
+        void keyPressed (const KeyEvent& evt);
+        void keyReleased(const KeyEvent& evt);
         void keyHeld    (const KeyEvent& evt) { }
 
@@ -115,14 +112,10 @@
         void mouseButtonReleased(MouseButtonCode::ByEnum id);
         void mouseButtonHeld    (MouseButtonCode::ByEnum id) { }
-        void mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
-            { guiSystem_->injectMouseMove(rel.x, rel.y); }
-        void mouseScrolled      (int abs, int rel)
-            { guiSystem_->injectMouseWheelChange(rel);}
+        void mouseMoved         (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
+        void mouseScrolled      (int abs, int rel);
 
         void updateInput(float dt)  { }
         void updateKey  (float dt)  { }
         void updateMouse(float dt)  { }
-
-        static CEGUI::MouseButton convertButton(MouseButtonCode::ByEnum button);
 
         Ogre::RenderWindow*         renderWindow_;      //!< Ogre's render window to give CEGUI access to it
Index: code/trunk/src/orxonox/interfaces/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/interfaces/CMakeLists.txt	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/CMakeLists.txt	(revision 3196)
@@ -0,0 +1,4 @@
+ADD_SOURCE_FILES(ORXONOX_SRC_FILES
+  InterfaceCompilation.cc
+  RadarViewable.cc
+)
Index: code/trunk/src/orxonox/interfaces/GametypeMessageListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/GametypeMessageListener.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/GametypeMessageListener.h	(revision 3196)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _GametypeMessageListener_H__
+#define _GametypeMessageListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport GametypeMessageListener : virtual public OrxonoxClass
+    {
+        public:
+            GametypeMessageListener();
+            virtual ~GametypeMessageListener() {}
+
+            virtual void announcemessage(const GametypeInfo* gtinfo, const std::string& message) {}
+            virtual void killmessage(const GametypeInfo* gtinfo, const std::string& message) {}
+            virtual void deathmessage(const GametypeInfo* gtinfo, const std::string& message) {}
+    };
+}
+
+#endif /* _GametypeMessageListener_H__ */
Index: code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc	(revision 3196)
@@ -0,0 +1,122 @@
+/*
+ *   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
+    Compiles all the interfaces (except RadarViewable) with mostly just a constructor.
+*/
+
+#include "GametypeMessageListener.h"
+#include "PawnListener.h"
+#include "RadarListener.h"
+#include "Rewardable.h"
+#include "TeamColourable.h"
+#include "Tickable.h"
+#include "TimeFactorListener.h"
+#include "WindowEventListener.h"
+
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    //----------------------------
+    // GametypeMessageListener
+    //----------------------------
+    GametypeMessageListener::GametypeMessageListener()
+    {
+        RegisterRootObject(GametypeMessageListener);
+    }
+
+    //----------------------------
+    // PawnListener
+    //----------------------------
+    /**
+        @brief Constructor for the PawnListener.
+    */
+    PawnListener::PawnListener()
+    {
+        RegisterRootObject(PawnListener);
+    }
+
+    //----------------------------
+    // RadarListener
+    //----------------------------
+    RadarListener::RadarListener()
+    {
+        RegisterRootObject(RadarListener);
+    }
+
+    //----------------------------
+    // TeamColourable
+    //----------------------------
+    TeamColourable::TeamColourable()
+    {
+        RegisterRootObject(TeamColourable);
+    }
+
+    //----------------------------
+    // TimeFactorListener
+    //----------------------------
+    float TimeFactorListener::timefactor_s = 1.0f;
+
+    TimeFactorListener::TimeFactorListener()
+    {
+        RegisterRootObject(TimeFactorListener);
+    }
+
+    //----------------------------
+    // Tickable
+    //----------------------------
+    /**
+        @brief Constructor: Registers the object in the Tickable-list
+    */
+    Tickable::Tickable()
+    {
+        RegisterRootObject(Tickable);
+    }
+
+    //----------------------------
+    // WindowEventListener
+    //----------------------------
+    /**
+        @brief Constructor for the WindowEventListener.
+    */
+    WindowEventListener::WindowEventListener()
+    {
+        RegisterRootObject(WindowEventListener);
+    }
+
+    //----------------------------
+    // Rewardable
+    //----------------------------
+    Rewardable::Rewardable()
+    {
+        RegisterObject(Rewardable);
+    }
+}
Index: code/trunk/src/orxonox/interfaces/PawnListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PawnListener.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/PawnListener.h	(revision 3196)
@@ -0,0 +1,47 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _PawnListener_H__
+#define _PawnListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PawnListener : virtual public OrxonoxClass
+    {
+        public:
+            PawnListener();
+            virtual ~PawnListener() {}
+
+            virtual void destroyedPawn(Pawn* pawn) = 0;
+    };
+}
+
+#endif /* _PawnListener_H__ */
Index: code/trunk/src/orxonox/interfaces/RadarListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarListener.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/RadarListener.h	(revision 3196)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _RadarListener_H__
+#define _RadarListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport RadarListener : virtual public OrxonoxClass
+    {
+    public:
+        RadarListener();
+        virtual ~RadarListener() { }
+
+        virtual void displayObject(RadarViewable* viewable, bool bIsMarked) = 0;
+        virtual float getRadarSensitivity() const = 0;
+        virtual void radarTick(float dt) = 0;
+    };
+}
+
+#endif /* _RadarListener_H__ */
Index: code/trunk/src/orxonox/interfaces/RadarViewable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarViewable.cc	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/RadarViewable.cc	(revision 3196)
@@ -0,0 +1,169 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#include "RadarViewable.h"
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreEntity.h>
+
+#include "util/String.h"
+#include "core/CoreIncludes.h"
+#include "tools/DynamicLines.h"
+#include "objects/worldentities/WorldEntity.h"
+#include "objects/Radar.h"
+#include "overlays/map/Map.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor.
+    */
+    RadarViewable::RadarViewable()
+        : MapNode_(NULL)
+        , MapEntity_(NULL)
+        , line_(NULL)
+        , LineNode_(NULL)
+        , radarObjectCamouflage_(0.0f)
+        , radarObjectShape_(Dot)
+        , radarObjectDescription_("staticObject")
+    {
+        RegisterRootObject(RadarViewable);
+
+        this->bVisibility_ = true;
+        this->isHumanShip_ = false;
+
+        this->uniqueId_=getUniqueNumberString();
+/*
+        if(Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr())
+        {
+            this->addEntity();
+        }
+
+        */
+    }
+
+
+    RadarViewable::~RadarViewable()
+    {
+        if (this->isHumanShip_ && MapNode_)
+            MapNode_->removeAllChildren();
+
+        if (MapNode_)
+            delete MapNode_;
+
+        if (MapEntity_)
+            delete MapEntity_;
+
+        if (line_)
+            delete line_;
+
+        if (LineNode_)
+            delete LineNode_;
+    }
+
+    void RadarViewable::addMapEntity()
+    { //TODO Check shape and add accordantly
+        if( this->MapNode_ && !this->MapEntity_ && Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr() )
+        {
+            COUT(0) << "Adding " << this->uniqueId_ << " to Map.\n";
+            this->MapEntity_ = Map::getSingletonPtr()->getMapSceneManagerPtr()->createEntity( this->uniqueId_, "drone.mesh");
+            /*this->line_ =  Map::getSingletonPtr()->getMapSceneManagerPtr()->createManualObject(this->uniqueId_ + "_l");
+            this->line_->begin("Map/line_", Ogre::RenderOperation::OT_LINE_STRIP);
+            //line_->position(0, -it->getRVWorldPosition().y, 0);
+            //this->line_->position(0, -20, 0);
+            this->line_->position(0, 0, -10); //Front Arrow
+            this->line_->position(0, 0, 0);
+
+            this->line_->end(); */
+            this->line_ = new Ogre::DynamicLines(Ogre::RenderOperation::OT_LINE_LIST);
+            this->line_->addPoint( Vector3(0,0,0) );
+            this->line_->addPoint( Vector3(0,0,0) );
+
+            this->MapNode_->attachObject( this->MapEntity_ );
+
+            this->LineNode_ = this->MapNode_->createChildSceneNode();
+            this->LineNode_->attachObject( this->line_ );
+        }
+        else
+        {
+            COUT(0) << "Unable to load " << this->uniqueId_ << " to Map.\n";
+        }
+    }
+
+    void RadarViewable::updateMapPosition()
+    {
+        if( this->MapNode_ )
+        {
+            this->MapNode_->setPosition( this->getRVWorldPosition() );
+            this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 );
+            this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() );
+//Vector3 v = this->getRVWorldPosition();
+            //this->line_->setPoint(1, Vector3(0,v.y,0) );
+            this->line_->setPoint(1, Vector3( 0, static_cast<float>(static_cast<int>( -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ) ) ,0 ));
+            this->line_->update();
+            if( Map::getSingletonPtr()->playerShipNode_ )
+                this->LineNode_->setDirection( Map::getSingletonPtr()->playerShipNode_->getLocalAxes().GetColumn(1) ,Ogre::Node::TS_WORLD,Vector3::UNIT_Y);
+        }
+    }
+
+    void RadarViewable::setRadarObjectDescription(const std::string& str)
+    {
+        Radar* radar = Radar::getInstancePtr();
+        if (radar)
+            this->radarObjectShape_ = radar->addObjectDescription(str);
+        else
+        {
+            CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl;
+        }
+        this->radarObjectDescription_ = str;
+    }
+
+    const Vector3& RadarViewable::getRVWorldPosition() const
+    {
+        const WorldEntity* object = this->getWorldEntity();
+        validate(object);
+        return object->getWorldPosition();
+    }
+
+    Vector3 RadarViewable::getRVOrientedVelocity() const
+    {
+        const WorldEntity* object = this->getWorldEntity();
+        validate(object);
+        return object->getWorldOrientation() * object->getVelocity();
+    }
+
+    void RadarViewable::validate(const WorldEntity* object) const
+    {
+        if (!object)
+        {
+            COUT(1) << "Assertation: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl;
+            assert(0);
+        }
+    }
+}
Index: code/trunk/src/orxonox/interfaces/RadarViewable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/RadarViewable.h	(revision 3196)
@@ -0,0 +1,130 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _RadarViewable_H__
+#define _RadarViewable_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include <cassert>
+
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    /**
+    @brief Interface for receiving window events.
+    */
+    class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
+    {
+    public:
+        enum Shape
+        {
+            Square,
+            Dot,
+            Triangle
+        };
+
+
+    public:
+        RadarViewable();
+        virtual ~RadarViewable();
+
+        inline void setRadarObjectCamouflage(float camouflage)
+            { this->radarObjectCamouflage_ = camouflage; }
+        inline float getRadarObjectCamouflage() const
+            { return this->radarObjectCamouflage_; }
+
+        inline void setRadarObjectColour(const ColourValue& colour)
+            { this->radarObjectColour_ = colour; }
+        inline const ColourValue& getRadarObjectColour() const
+            { return this->radarObjectColour_; }
+
+        void setRadarObjectDescription(const std::string& str);
+        inline const std::string& getRadarObjectDescription() const
+            { return this->radarObjectDescription_; }
+
+        inline void setRadarVisibility(bool b)
+            { this->bVisibility_ = b; }
+        inline bool getRadarVisibility() const
+            { return this->bVisibility_; }
+
+        virtual const WorldEntity* getWorldEntity() const = 0;
+
+        const Vector3& getRVWorldPosition() const;
+        Vector3 getRVOrientedVelocity() const;
+
+        inline void setRadarObjectShape(Shape shape)
+            { this->radarObjectShape_ = shape; }
+        inline Shape getRadarObjectShape() const
+            { return this->radarObjectShape_; }
+
+/*
+        inline void setMapNode(Ogre::SceneNode * node)
+            { this->MapNode_ = node; }
+        inline Ogre::SceneNode * getMapNode() const
+            { return this->MapNode_; }
+        inline void setMapEntity(Ogre::Entity * ent)
+            { this->MapEntity_ = ent; }
+        inline Ogre::Entity * getMapEntity() const
+            { return this->MapEntity_; }
+*/
+        //Used for Map
+        Ogre::SceneNode * MapNode_;
+        Ogre::Entity * MapEntity_;
+        Ogre::DynamicLines* line_;
+        Ogre::SceneNode * LineNode_;
+        void addMapEntity();
+        void updateMapPosition();
+        bool isHumanShip_;
+        inline const std::string& getUniqueId()
+        {
+            return this->uniqueId_;
+        }
+        //friend class Map;
+
+    private:
+        void validate(const WorldEntity* object) const;
+        bool bVisibility_;
+        //Map
+        std::string uniqueId_;
+
+
+        //Radar
+        float radarObjectCamouflage_;
+        Shape radarObjectShape_;
+        std::string radarObjectDescription_;
+        ColourValue radarObjectColour_;
+
+    };
+}
+
+#endif /* _RadarViewable_H__ */
Index: code/trunk/src/orxonox/interfaces/Rewardable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Rewardable.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/Rewardable.h	(revision 3196)
@@ -0,0 +1,70 @@
+/*
+ *   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:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the Rewardable class.
+*/
+
+#ifndef _Rewardable_H__
+#define _Rewardable_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    /**
+    @brief
+        Rewardable is an Interface, that can be implemented by any object to enable it to be given as reward to a player through QuestEffects. (With the AddReward effect.)
+        
+        It just needs to inherit form Rewardable, and implement the reward() method.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport Rewardable : public OrxonoxClass
+    {
+        public:
+            Rewardable();
+            virtual ~Rewardable() {}
+
+            /**
+            @brief
+                Method to transcribe a rewardable object to the player.
+                Must be implemented by every class inheriting from Rewardable.
+            @param player
+                A pointer to the ControllableEntity, do whatever you want with it.
+            @return
+                Return true if successful.
+            */
+            virtual bool reward(PlayerInfo* player) = 0;
+
+    };
+}
+
+#endif /* _Rewardable_H__ */
Index: code/trunk/src/orxonox/interfaces/TeamColourable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/TeamColourable.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/TeamColourable.h	(revision 3196)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _TeamColourable_H__
+#define _TeamColourable_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/UtilPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamColourable : virtual public OrxonoxClass
+    {
+        public:
+            virtual void setTeamColour(const ColourValue& colour) = 0;
+
+        protected:
+            TeamColourable();
+    };
+}
+
+#endif /* _TeamColourable_H__ */
Index: code/trunk/src/orxonox/interfaces/Tickable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Tickable.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/Tickable.h	(revision 3196)
@@ -0,0 +1,68 @@
+/*
+ *   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 Declaration of the Tickable interface.
+
+    The Tickable interface provides a tick(dt) function, that gets called every frame.
+    float dt is the time since the last frame in seconds.
+
+    Attention:
+    Classes derived from a Tickable that want to have a tick(dt) function on their part, MUST call the
+    parent::tick(dt) function explicitly in their implementation of tick(dt) because it's a virtual function.
+*/
+
+#ifndef _Tickable_H__
+#define _Tickable_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/OrxonoxClass.h"
+#include "core/Super.h"
+
+namespace orxonox
+{
+    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
+    class _OrxonoxExport Tickable : virtual public OrxonoxClass
+    {
+        public:
+            /**
+                @brief Gets called every frame.
+                @param dt The time since the last frame in seconds
+            */
+            virtual void tick(float dt) = 0;
+
+        protected:
+            Tickable();
+    };
+
+    SUPER_FUNCTION(1, Tickable, tick, true);
+}
+
+#endif /* _Tickable_H__ */
Index: code/trunk/src/orxonox/interfaces/TimeFactorListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/TimeFactorListener.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/TimeFactorListener.h	(revision 3196)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _TimeFactorListener_H__
+#define _TimeFactorListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TimeFactorListener : virtual public OrxonoxClass
+    {
+        friend class GSRoot;
+
+        public:
+            TimeFactorListener();
+            virtual ~TimeFactorListener() {}
+
+        protected:
+            virtual void changedTimeFactor(float factor_new, float factor_old) {}
+            inline float getTimeFactor() const
+                { return TimeFactorListener::timefactor_s; }
+
+        private:
+            static float timefactor_s;
+    };
+}
+
+#endif /* _TimeFactorListener_H__ */
Index: code/trunk/src/orxonox/interfaces/WindowEventListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/WindowEventListener.h	(revision 3196)
+++ code/trunk/src/orxonox/interfaces/WindowEventListener.h	(revision 3196)
@@ -0,0 +1,57 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _WindowEventListener_H__
+#define _WindowEventListener_H__
+
+#include "OrxonoxPrereqs.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    /**
+        @brief Interface for receiving window events.
+    */
+    class _OrxonoxExport WindowEventListener : virtual public OrxonoxClass
+    {
+        public:
+            WindowEventListener();
+            virtual ~WindowEventListener() { }
+
+            /** Window has moved position */
+            virtual void windowMoved() { }
+
+            /** Window has resized */
+            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
+
+            /** Window has lost/gained focus */
+            virtual void windowFocusChanged() { }
+    };
+}
+
+#endif /* _WindowEventListener_H__ */
Index: code/trunk/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/objects/CMakeLists.txt	(revision 3196)
@@ -3,12 +3,7 @@
   EventDispatcher.cc
   EventTarget.cc
-  GametypeMessageListener.cc
   GlobalShader.cc
   Level.cc
   Radar.cc
-  RadarListener.cc
-  RadarViewable.cc
-  Teamcolourable.cc
-  Tickable.cc
   Scene.cc
   Script.cc
Index: code/trunk/src/orxonox/objects/EventDispatcher.cc
===================================================================
--- code/trunk/src/orxonox/objects/EventDispatcher.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventDispatcher.cc	(revision 3196)
@@ -32,5 +32,4 @@
 #include "core/EventIncludes.h"
 #include "core/XMLPort.h"
-#include "core/EventIncludes.h"
 #include "EventTarget.h"
 
Index: code/trunk/src/orxonox/objects/EventDispatcher.h
===================================================================
--- code/trunk/src/orxonox/objects/EventDispatcher.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventDispatcher.h	(revision 3196)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <list>
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/EventListener.cc
===================================================================
--- code/trunk/src/orxonox/objects/EventListener.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventListener.cc	(revision 3196)
@@ -30,5 +30,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/EventIncludes.h"
 #include "core/XMLPort.h"
 
Index: code/trunk/src/orxonox/objects/EventListener.h
===================================================================
--- code/trunk/src/orxonox/objects/EventListener.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventListener.h	(revision 3196)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
 #include "core/BaseObject.h"
 #include "core/XMLNameListener.h"
Index: code/trunk/src/orxonox/objects/EventTarget.cc
===================================================================
--- code/trunk/src/orxonox/objects/EventTarget.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventTarget.cc	(revision 3196)
@@ -28,7 +28,5 @@
 
 #include "EventTarget.h"
-
 #include "core/CoreIncludes.h"
-#include "core/EventIncludes.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/EventTarget.h
===================================================================
--- code/trunk/src/orxonox/objects/EventTarget.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/EventTarget.h	(revision 3196)
@@ -31,4 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/BaseObject.h"
 #include "core/XMLNameListener.h"
Index: code/trunk/src/orxonox/objects/GametypeMessageListener.cc
===================================================================
--- code/trunk/src/orxonox/objects/GametypeMessageListener.cc	(revision 3110)
+++ 	(revision )
@@ -1,41 +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:
- *      ...
- *
- */
-
-#include "GametypeMessageListener.h"
-
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    GametypeMessageListener::GametypeMessageListener()
-    {
-        RegisterRootObject(GametypeMessageListener);
-    }
-}
-
-
Index: code/trunk/src/orxonox/objects/GametypeMessageListener.h
===================================================================
--- code/trunk/src/orxonox/objects/GametypeMessageListener.h	(revision 3110)
+++ 	(revision )
@@ -1,50 +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:
- *      ...
- *
- */
-
-#ifndef _GametypeMessageListener_H__
-#define _GametypeMessageListener_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport GametypeMessageListener : virtual public OrxonoxClass
-    {
-        public:
-            GametypeMessageListener();
-            virtual ~GametypeMessageListener() {}
-
-            virtual void announcemessage(const GametypeInfo* gtinfo, const std::string& message) {}
-            virtual void killmessage(const GametypeInfo* gtinfo, const std::string& message) {}
-            virtual void deathmessage(const GametypeInfo* gtinfo, const std::string& message) {}
-    };
-}
-
-#endif /* _GametypeMessageListener_H__ */
Index: code/trunk/src/orxonox/objects/GlobalShader.cc
===================================================================
--- code/trunk/src/orxonox/objects/GlobalShader.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/GlobalShader.cc	(revision 3196)
@@ -29,8 +29,8 @@
 #include "GlobalShader.h"
 
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
-#include "util/Exception.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Level.cc
===================================================================
--- code/trunk/src/orxonox/objects/Level.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/Level.cc	(revision 3196)
@@ -29,18 +29,17 @@
 #include "Level.h"
 
+#include "util/Math.h"
+#include "core/Core.h"
 #include "core/CoreIncludes.h"
+#include "core/Loader.h"
+#include "core/Template.h"
+#include "core/XMLFile.h"
 #include "core/XMLPort.h"
-#include "core/Loader.h"
-#include "core/XMLFile.h"
-#include "core/Template.h"
-#include "core/Core.h"
 
-#include "LevelManager.h"
 #include "objects/infos/PlayerInfo.h"
 #include "objects/gametypes/Gametype.h"
 #include "overlays/OverlayGroup.h"
 #include "sound/SoundBase.h"
-
-#include "util/Math.h"
+#include "LevelManager.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Level.h
===================================================================
--- code/trunk/src/orxonox/objects/Level.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/Level.h	(revision 3196)
@@ -32,6 +32,8 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
+#include <string>
+#include "core/BaseObject.h"
 #include "network/synchronisable/Synchronisable.h"
-#include "core/BaseObject.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Radar.cc
===================================================================
--- code/trunk/src/orxonox/objects/Radar.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/Radar.cc	(revision 3196)
@@ -28,15 +28,16 @@
 
 /**
-    @file
-    @brief
+@file
+@brief
 */
 
 #include "Radar.h"
-#include <cfloat>
+
 #include <cassert>
-#include "core/CoreIncludes.h"
+
+//#include "util/Math.h"
 #include "core/ConsoleCommand.h"
-#include "core/Iterator.h"
-#include "RadarListener.h"
+#include "core/ObjectList.h"
+#include "interfaces/RadarListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Radar.h
===================================================================
--- code/trunk/src/orxonox/objects/Radar.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/Radar.h	(revision 3196)
@@ -28,6 +28,6 @@
 
 /**
-    @file
-    @brief
+@file
+@brief
 */
 
@@ -39,8 +39,8 @@
 #include <map>
 #include <string>
-#include "core/Iterator.h"
-#include "core/OrxonoxClass.h"
-#include "objects/Tickable.h"
-#include "RadarViewable.h"
+
+#include "core/ObjectListIterator.h"
+#include "interfaces/RadarViewable.h"
+#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/RadarListener.cc
===================================================================
--- code/trunk/src/orxonox/objects/RadarListener.cc	(revision 3110)
+++ 	(revision )
@@ -1,38 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "RadarListener.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    RadarListener::RadarListener()
-    {
-        RegisterRootObject(RadarListener);
-    }
-}
Index: code/trunk/src/orxonox/objects/RadarListener.h
===================================================================
--- code/trunk/src/orxonox/objects/RadarListener.h	(revision 3110)
+++ 	(revision )
@@ -1,49 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _RadarListener_H__
-#define _RadarListener_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport RadarListener : virtual public OrxonoxClass
-    {
-    public:
-        RadarListener();
-        virtual ~RadarListener() { }
-
-        virtual void displayObject(RadarViewable* viewable, bool bIsMarked) = 0;
-        virtual float getRadarSensitivity() const = 0;
-        virtual void radarTick(float dt) = 0;
-    };
-}
-
-#endif /* _RadarListener_H__ */
Index: code/trunk/src/orxonox/objects/RadarViewable.cc
===================================================================
--- code/trunk/src/orxonox/objects/RadarViewable.cc	(revision 3110)
+++ 	(revision )
@@ -1,159 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "RadarViewable.h"
-
-#include "util/Debug.h"
-#include "util/Exception.h"
-#include "core/CoreIncludes.h"
-#include "objects/worldentities/WorldEntity.h"
-#include "objects/Radar.h"
-#include "util/String.h"
-#include <OgreManualObject.h>
-#include "overlays/map/Map.h"
-#include "orxonox/tools/DynamicLines.h"
-
-namespace orxonox
-{
-    /**
-        @brief Constructor.
-    */
-    RadarViewable::RadarViewable()
-        : MapNode_(NULL)
-        , MapEntity_(NULL)
-        , line_(NULL)
-        , LineNode_(NULL)
-        , radarObjectCamouflage_(0.0f)
-        , radarObjectShape_(Dot)
-        , radarObjectDescription_("staticObject")
-    {
-        RegisterRootObject(RadarViewable);
-
-        this->bVisibility_ = true;
-        this->isHumanShip_ = false;
-
-        this->uniqueId_=getUniqueNumberString();
-/*
-        if(Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr())
-        {
-            this->addEntity();
-        }
-
-        */
-    }
-
-
-    RadarViewable::~RadarViewable()
-    {
-        if (this->isHumanShip_ && MapNode_)
-            MapNode_->removeAllChildren();
-
-        if (MapNode_)
-            delete MapNode_;
-
-        if (MapEntity_)
-            delete MapEntity_;
-
-        if (line_)
-            delete line_;
-
-        if (LineNode_)
-            delete LineNode_;
-    }
-
-    void RadarViewable::addMapEntity()
-    { //TODO Check shape and add accordantly
-        if( this->MapNode_ && !this->MapEntity_ && Map::getSingletonPtr() && Map::getSingletonPtr()->getMapSceneManagerPtr() )
-        {
-            COUT(0) << "Adding " << this->uniqueId_ << " to Map.\n";
-            this->MapEntity_ = Map::getSingletonPtr()->getMapSceneManagerPtr()->createEntity( this->uniqueId_, "drone.mesh");
-            /*this->line_ =  Map::getSingletonPtr()->getMapSceneManagerPtr()->createManualObject(this->uniqueId_ + "_l");
-            this->line_->begin("Map/line_", Ogre::RenderOperation::OT_LINE_STRIP);
-            //line_->position(0, -it->getRVWorldPosition().y, 0);
-            //this->line_->position(0, -20, 0);
-            this->line_->position(0, 0, -10); //Front Arrow
-            this->line_->position(0, 0, 0);
-
-            this->line_->end(); */
-            this->line_ = new DynamicLines(Ogre::RenderOperation::OT_LINE_LIST);
-            this->line_->addPoint( Vector3(0,0,0) );
-            this->line_->addPoint( Vector3(0,0,0) );
-
-            this->MapNode_->attachObject( this->MapEntity_ );
-
-            this->LineNode_ = this->MapNode_->createChildSceneNode();
-            this->LineNode_->attachObject( this->line_ );
-        }
-        else
-        {
-            COUT(0) << "Unable to load " << this->uniqueId_ << " to Map.\n";
-        }
-    }
-
-    void RadarViewable::updateMapPosition()
-    {
-        if( this->MapNode_ )
-        {
-            this->MapNode_->setPosition( this->getRVWorldPosition() );
-            this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 );
-            this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() );
-//Vector3 v = this->getRVWorldPosition();
-            //this->line_->setPoint(1, Vector3(0,v.y,0) );
-            this->line_->setPoint(1, Vector3( 0, (int) -Map::getSingletonPtr()->movablePlane_->getDistance( this->getRVWorldPosition() ) ,0 ));
-            this->line_->update();
-            if( Map::getSingletonPtr()->playerShipNode_ )
-                this->LineNode_->setDirection( Map::getSingletonPtr()->playerShipNode_->getLocalAxes().GetColumn(1) ,Ogre::Node::TS_WORLD,Vector3::UNIT_Y);
-        }
-    }
-
-    void RadarViewable::setRadarObjectDescription(const std::string& str)
-    {
-        Radar* radar = Radar::getInstancePtr();
-        if (radar)
-            this->radarObjectShape_ = radar->addObjectDescription(str);
-        else
-        {
-            CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl;
-        }
-        this->radarObjectDescription_ = str;
-    }
-
-    const Vector3& RadarViewable::getRVWorldPosition() const
-    {
-        const WorldEntity* object = this->getWorldEntity();
-        validate(object);
-        return object->getWorldPosition();
-    }
-
-    Vector3 RadarViewable::getRVOrientedVelocity() const
-    {
-        const WorldEntity* object = this->getWorldEntity();
-        validate(object);
-        return object->getWorldOrientation() * object->getVelocity();
-    }
-}
Index: code/trunk/src/orxonox/objects/RadarViewable.h
===================================================================
--- code/trunk/src/orxonox/objects/RadarViewable.h	(revision 3110)
+++ 	(revision )
@@ -1,142 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _RadarViewable_H__
-#define _RadarViewable_H__
-
-#include "OrxonoxPrereqs.h"
-#include <string>
-#include <cassert>
-#include "util/Math.h"
-#include "util/Debug.h"
-#include "core/OrxonoxClass.h"
-
-#include <string>
-#include <OgreSceneNode.h>
-#include <OgreEntity.h>
-#include <OgreManualObject.h>
-#include "orxonox/tools/DynamicLines.h"
-
-namespace orxonox
-{
-    /**
-    @brief Interface for receiving window events.
-    */
-    class _OrxonoxExport RadarViewable : virtual public OrxonoxClass
-    {
-    public:
-        enum Shape
-        {
-            Square,
-            Dot,
-            Triangle
-        };
-
-
-    public:
-        RadarViewable();
-        virtual ~RadarViewable();
-
-        inline void setRadarObjectCamouflage(float camouflage)
-            { this->radarObjectCamouflage_ = camouflage; }
-        inline float getRadarObjectCamouflage() const
-            { return this->radarObjectCamouflage_; }
-
-        inline void setRadarObjectColour(const ColourValue& colour)
-            { this->radarObjectColour_ = colour; }
-        inline const ColourValue& getRadarObjectColour() const
-            { return this->radarObjectColour_; }
-
-        void setRadarObjectDescription(const std::string& str);
-        inline const std::string& getRadarObjectDescription() const
-            { return this->radarObjectDescription_; }
-
-        inline void setRadarVisibility(bool b)
-            { this->bVisibility_ = b; }
-        inline bool getRadarVisibility() const
-            { return this->bVisibility_; }
-
-        virtual const WorldEntity* getWorldEntity() const = 0;
-
-        const Vector3& getRVWorldPosition() const;
-        Vector3 getRVOrientedVelocity() const;
-
-        inline void setRadarObjectShape(Shape shape)
-            { this->radarObjectShape_ = shape; }
-        inline Shape getRadarObjectShape() const
-            { return this->radarObjectShape_; }
-
-/*
-        inline void setMapNode(Ogre::SceneNode * node)
-            { this->MapNode_ = node; }
-        inline Ogre::SceneNode * getMapNode() const
-            { return this->MapNode_; }
-        inline void setMapEntity(Ogre::Entity * ent)
-            { this->MapEntity_ = ent; }
-        inline Ogre::Entity * getMapEntity() const
-            { return this->MapEntity_; }
-*/
-        //Used for Map
-        Ogre::SceneNode * MapNode_;
-        Ogre::Entity * MapEntity_;
-        DynamicLines* line_;
-        Ogre::SceneNode * LineNode_;
-        void addMapEntity();
-        void updateMapPosition();
-        bool isHumanShip_;
-        inline std::string getUniqueId()
-        {
-            return this->uniqueId_;
-        }
-        //friend class Map;
-
-    private:
-        void validate(const WorldEntity* object) const
-        {
-            if (!object)
-            {
-                COUT(1) << "Assertation: Every RadarViewable has to be assigned a WorldEntity pointer!" << std::endl;
-                assert(0);
-            }
-        }
-
-        bool bVisibility_;
-        //Map
-        std::string uniqueId_;
-
-
-        //Radar
-        float radarObjectCamouflage_;
-        Shape radarObjectShape_;
-        std::string radarObjectDescription_;
-        ColourValue radarObjectColour_;
-
-    };
-}
-
-#endif /* _RadarViewable_H__ */
Index: code/trunk/src/orxonox/objects/Scene.cc
===================================================================
--- code/trunk/src/orxonox/objects/Scene.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/Scene.cc	(revision 3196)
@@ -31,11 +31,12 @@
 
 #include <OgreRoot.h>
+#include <OgreSceneManager.h>
 #include <OgreSceneManagerEnumerator.h>
 #include <OgreSceneNode.h>
 
-#include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"
-#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
-#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
-#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
+#include <BulletCollision/BroadphaseCollision/btAxisSweep3.h>
+#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
+#include <BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h>
+#include <BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h>
 
 #include "core/CoreIncludes.h"
@@ -58,14 +59,7 @@
         if (GameMode::showsGraphics())
         {
-            if (Ogre::Root::getSingletonPtr())
-            {
-                this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
-                this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
-            }
-            else
-            {
-                this->sceneManager_ = 0;
-                this->rootSceneNode_ = 0;
-            }
+            assert(Ogre::Root::getSingletonPtr());
+            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
+            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
         }
         else
@@ -94,12 +88,8 @@
         if (this->isInitialized())
         {
-            if (Ogre::Root::getSingletonPtr())
-            {
+            if (GameMode::showsGraphics())
                 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
-            }
-            else if (!GameMode::showsGraphics())
-            {
+            else
                 delete this->sceneManager_;
-            }
 
             this->setPhysicalWorld(false);
@@ -112,5 +102,5 @@
 
         XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
-        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2, 0.2, 0.2, 1));
+        XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
         XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
 
@@ -139,5 +129,5 @@
         {
             CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
-                     << omni_cast<std::string>(range) << std::endl;
+                     << multi_cast<std::string>(range) << std::endl;
         }
         if (this->hasPhysics())
@@ -158,5 +148,5 @@
         {
             CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
-                     << omni_cast<std::string>(range) << std::endl;
+                     << multi_cast<std::string>(range) << std::endl;
         }
         if (this->hasPhysics())
@@ -176,5 +166,5 @@
         this->gravity_ = gravity;
         if (this->hasPhysics())
-            this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
+            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
     }
 
@@ -187,5 +177,5 @@
             //       It would require further investigation to properly dertermine the right choices.
             this->broadphase_      = new bt32BitAxisSweep3(
-                omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));
+                multi_cast<btVector3>(this->negativeWorldRange_), multi_cast<btVector3>(this->positiveWorldRange_));
             this->collisionConfig_ = new btDefaultCollisionConfiguration();
             this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
@@ -193,5 +183,5 @@
 
             this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
-            this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
+            this->physicalWorld_->setGravity(multi_cast<btVector3>(this->gravity_));
 
             // also set the collision callback variable.
Index: code/trunk/src/orxonox/objects/Scene.h
===================================================================
--- code/trunk/src/orxonox/objects/Scene.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/Scene.h	(revision 3196)
@@ -33,8 +33,13 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
+#include <set>
+#include <string>
+
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/BaseObject.h"
 #include "network/synchronisable/Synchronisable.h"
-#include "core/BaseObject.h"
-#include "util/Math.h"
-#include "objects/Tickable.h"
+#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/Script.cc
===================================================================
--- code/trunk/src/orxonox/objects/Script.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/Script.cc	(revision 3196)
@@ -29,7 +29,6 @@
 #include "Script.h"
 
-#include "util/Debug.h"
+#include <tinyxml/ticpp.h>
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "core/LuaBind.h"
 
Index: code/trunk/src/orxonox/objects/Script.h
===================================================================
--- code/trunk/src/orxonox/objects/Script.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/Script.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/Teamcolourable.cc
===================================================================
--- code/trunk/src/orxonox/objects/Teamcolourable.cc	(revision 3110)
+++ 	(revision )
@@ -1,38 +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:
- *      ...
- *
- */
-
-#include "Teamcolourable.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    Teamcolourable::Teamcolourable()
-    {
-        RegisterRootObject(Teamcolourable);
-    }
-}
Index: code/trunk/src/orxonox/objects/Teamcolourable.h
===================================================================
--- code/trunk/src/orxonox/objects/Teamcolourable.h	(revision 3110)
+++ 	(revision )
@@ -1,49 +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:
- *      ...
- *
- */
-
-#ifndef _Teamcolourable_H__
-#define _Teamcolourable_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "util/Math.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Teamcolourable : virtual public OrxonoxClass
-    {
-        public:
-            virtual void setTeamColour(const ColourValue& colour) = 0;
-
-        protected:
-            Teamcolourable();
-    };
-}
-
-#endif /* _Teamcolourable_H__ */
Index: code/trunk/src/orxonox/objects/Test.h
===================================================================
--- code/trunk/src/orxonox/objects/Test.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/Test.h	(revision 3196)
@@ -33,5 +33,5 @@
 #include "core/BaseObject.h"
 #include "network/synchronisable/Synchronisable.h"
-#include "Tickable.h"
+#include "interfaces/Tickable.h"
 
 
Index: code/trunk/src/orxonox/objects/Tickable.cc
===================================================================
--- code/trunk/src/orxonox/objects/Tickable.cc	(revision 3110)
+++ 	(revision )
@@ -1,42 +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:
- *      ...
- *
- */
-
-#include "Tickable.h"
-#include "core/CoreIncludes.h"
-#include "core/ConsoleCommand.h"
-
-namespace orxonox
-{
-    /**
-        @brief Constructor: Registers the object in the Tickable-list
-    */
-    Tickable::Tickable()
-    {
-        RegisterRootObject(Tickable);
-    }
-}
Index: code/trunk/src/orxonox/objects/Tickable.h
===================================================================
--- code/trunk/src/orxonox/objects/Tickable.h	(revision 3110)
+++ 	(revision )
@@ -1,68 +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 Declaration of the Tickable interface.
-
-    The Tickable interface provides a tick(dt) function, that gets called every frame.
-    float dt is the time since the last frame in seconds.
-
-    Attention:
-    Classes derived from a Tickable that want to have a tick(dt) function on their part, MUST call the
-    parent::tick(dt) function explicitly in their implementation of tick(dt) because it's a virtual function.
-*/
-
-#ifndef _Tickable_H__
-#define _Tickable_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "core/OrxonoxClass.h"
-#include "core/Super.h"
-
-namespace orxonox
-{
-    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
-    class _OrxonoxExport Tickable : virtual public OrxonoxClass
-    {
-        public:
-            /**
-                @brief Gets called every frame.
-                @param dt The time since the last frame in seconds
-            */
-            virtual void tick(float dt) = 0;
-
-        protected:
-            Tickable();
-    };
-
-    SUPER_FUNCTION(1, Tickable, tick, true);
-}
-
-#endif /* _Tickable_H__ */
Index: code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc	(revision 3196)
@@ -29,5 +29,5 @@
 #include "BoxCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include <BulletCollision/CollisionShapes/btBoxShape.h>
 
 #include "core/CoreIncludes.h"
@@ -72,5 +72,5 @@
     btCollisionShape* BoxCollisionShape::createNewShape() const
     {
-        return new btBoxShape(omni_cast<btVector3>(this->halfExtents_));
+        return new btBoxShape(multi_cast<btVector3>(this->halfExtents_));
     }
 }
Index: code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/BoxCollisionShape.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "CollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 3196)
@@ -29,11 +29,8 @@
 #include "CollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include <BulletCollision/CollisionShapes/btCollisionShape.h>
 
-#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "tools/BulletConversions.h"
-
 #include "objects/worldentities/WorldEntity.h"
 #include "CompoundCollisionShape.h"
@@ -129,6 +126,6 @@
     bool CollisionShape::hasTransform() const
     {
-        return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001) ||
-                !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1)));
+        return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001f) ||
+                !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1f)));
     }
 
Index: code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 3196)
@@ -29,7 +29,6 @@
 #include "CompoundCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include <BulletCollision/CollisionShapes/btCompoundShape.h>
 
-#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
@@ -89,5 +88,5 @@
         {
             // Only actually attach if we didn't pick a CompoundCollisionShape with no content
-            btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
+            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
             this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
 
@@ -134,5 +133,5 @@
         {
             // Only actually attach if we didn't pick a CompoundCollisionShape with no content
-            btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
+            btTransform transf(multi_cast<btQuaternion>(shape->getOrientation()), multi_cast<btVector3>(shape->getPosition()));
             this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
             it->second = shape->getCollisionShape();
Index: code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
-#include <vector>
 #include <cassert>
+#include <map>
 #include "CollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc	(revision 3196)
@@ -29,9 +29,8 @@
 #include "ConeCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btConeShape.h"
+#include <BulletCollision/CollisionShapes/btConeShape.h>
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "tools/BulletConversions.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/ConeCollisionShape.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "CollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 3196)
@@ -29,5 +29,5 @@
 #include "PlaneCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+#include <BulletCollision/CollisionShapes/btStaticPlaneShape.h>
 
 #include "core/CoreIncludes.h"
@@ -72,5 +72,5 @@
     btCollisionShape* PlaneCollisionShape::createNewShape() const
     {
-        return new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
+        return new btStaticPlaneShape(multi_cast<btVector3>(this->normal_), this->offset_);
     }
 }
Index: code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "CollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 3196)
@@ -29,9 +29,8 @@
 #include "SphereCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include <BulletCollision/CollisionShapes/btSphereShape.h>
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "tools/BulletConversions.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "CollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.cc	(revision 3196)
@@ -29,7 +29,7 @@
 #include "WorldEntityCollisionShape.h"
 
-#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include <BulletCollision/CollisionShapes/btCompoundShape.h>
 
-#include "util/Exception.h"
+#include "util/OrxAssert.h"
 #include "core/CoreIncludes.h"
 #include "objects/worldentities/WorldEntity.h"
Index: code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.h
===================================================================
--- code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/collisionshapes/WorldEntityCollisionShape.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "CompoundCollisionShape.h"
 
Index: code/trunk/src/orxonox/objects/controllers/AIController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/AIController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/AIController.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "AIController.h"
 
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/Executor.h"
@@ -107,5 +108,5 @@
             this->moveToTargetPosition();
 
-        if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0))
+        if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(1000) && this->isLookingAtTarget(Ogre::Math::PI / 20.0f))
             this->getControllableEntity()->fire(0);
 
Index: code/trunk/src/orxonox/objects/controllers/AIController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/AIController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/AIController.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "ArtificialController.h"
-#include "objects/Tickable.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/ArtificialController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/ArtificialController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/ArtificialController.cc	(revision 3196)
@@ -32,8 +32,7 @@
 #include "objects/worldentities/ControllableEntity.h"
 #include "objects/worldentities/pawns/Pawn.h"
-
+#include "objects/worldentities/pawns/TeamBaseMatchBase.h"
 #include "objects/gametypes/TeamDeathmatch.h"
 #include "objects/controllers/WaypointPatrolController.h"
-#include "objects/worldentities/pawns/TeamBaseMatchBase.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/ArtificialController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/ArtificialController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/ArtificialController.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "interfaces/PawnListener.h"
 #include "Controller.h"
-#include "objects/worldentities/pawns/Pawn.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/Controller.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/Controller.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/Controller.cc	(revision 3196)
@@ -28,7 +28,5 @@
 
 #include "Controller.h"
-
 #include "core/CoreIncludes.h"
-#include "overlays/OverlayGroup.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/Controller.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/Controller.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/Controller.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/controllers/HumanController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/HumanController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/HumanController.cc	(revision 3196)
@@ -192,3 +192,11 @@
             HumanController::localController_s->controllableEntity_->dropItems();
     }
+
+    Pawn* HumanController::getLocalControllerEntityAsPawn()
+    {
+        if (HumanController::localController_s)
+            return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
+        else
+            return NULL;
+    }
 }
Index: code/trunk/src/orxonox/objects/controllers/HumanController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/HumanController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/HumanController.h	(revision 3196)
@@ -31,8 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include "util/Math.h"
 #include "Controller.h"
-#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -69,13 +66,5 @@
             static inline HumanController* getLocalControllerSingleton()
                 { return HumanController::localController_s; }
-            static inline Pawn* getLocalControllerEntityAsPawn()
-            {
-                if (HumanController::localController_s) {
-                    return dynamic_cast<Pawn*>(HumanController::localController_s->getControllableEntity());
-                } else {
-                    return NULL;
-                }
-            }
-
+            static Pawn* getLocalControllerEntityAsPawn();
             //friend class, for mouselook
             friend class Map;
Index: code/trunk/src/orxonox/objects/controllers/PongAI.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/PongAI.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/PongAI.cc	(revision 3196)
@@ -31,7 +31,7 @@
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
+#include "tools/Timer.h"
 #include "objects/worldentities/ControllableEntity.h"
 #include "objects/worldentities/PongBall.h"
-#include "tools/Timer.h"
 
 namespace orxonox
@@ -39,5 +39,5 @@
     CreateUnloadableFactory(PongAI);
 
-    const static float MAX_REACTION_TIME = 0.4;
+    const static float MAX_REACTION_TIME = 0.4f;
 
     PongAI::PongAI(BaseObject* creator) : Controller(creator)
@@ -49,6 +49,6 @@
         this->ballEndPosition_ = 0;
         this->randomOffset_ = 0;
-        this->relHysteresisOffset_ = 0.02;
-        this->strength_ = 0.5;
+        this->relHysteresisOffset_ = 0.02f;
+        this->strength_ = 0.5f;
         this->movement_ = 0;
         this->oldMove_ = 0;
@@ -171,5 +171,5 @@
 
         // The position shouln't be larger than 0.5 (50% of the bat-length from the middle is the end)
-        position *= 0.48;
+        position *= 0.48f;
 
         // Both sides are equally probable
@@ -190,5 +190,5 @@
 
         // Calculate bounces
-        for (float limit = 0.35; limit < this->strength_ || this->strength_ > 0.99; limit += 0.4)
+        for (float limit = 0.35f; limit < this->strength_ || this->strength_ > 0.99f; limit += 0.4f)
         {
             // Calculate a random prediction error, based on the vertical speed of the ball and the strength of the AI
Index: code/trunk/src/orxonox/objects/controllers/PongAI.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/PongAI.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/PongAI.h	(revision 3196)
@@ -33,8 +33,7 @@
 
 #include <list>
-
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
 #include "Controller.h"
-#include "objects/Tickable.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/ScriptController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/ScriptController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/ScriptController.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "ScriptController.h"
-
 #include "core/CoreIncludes.h"
 
@@ -39,7 +38,3 @@
         RegisterObject(ScriptController);
     }
-
-    ScriptController::~ScriptController()
-    {
-    }
 }
Index: code/trunk/src/orxonox/objects/controllers/ScriptController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/ScriptController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/ScriptController.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "ArtificialController.h"
 
@@ -40,7 +39,5 @@
         public:
             ScriptController(BaseObject* creator);
-            virtual ~ScriptController();
-
-        protected:
+            virtual ~ScriptController() { }
 
         private:
Index: code/trunk/src/orxonox/objects/controllers/WaypointController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/WaypointController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/WaypointController.cc	(revision 3196)
@@ -31,4 +31,5 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "objects/worldentities/ControllableEntity.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/WaypointController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/WaypointController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/WaypointController.h	(revision 3196)
@@ -33,7 +33,6 @@
 
 #include <vector>
-
+#include "interfaces/Tickable.h"
 #include "ArtificialController.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc
===================================================================
--- code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.cc	(revision 3196)
@@ -29,6 +29,8 @@
 #include "WaypointPatrolController.h"
 
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.h
===================================================================
--- code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/controllers/WaypointPatrolController.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "WaypointController.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/gametypes/Asteroids.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Asteroids.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Asteroids.cc	(revision 3196)
@@ -30,8 +30,6 @@
 
 #include "core/CoreIncludes.h"
-#include "objects/infos/PlayerInfo.h"
+#include "network/Host.h"
 #include "objects/worldentities/pawns/Pawn.h"
-
-#include "network/Host.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/gametypes/Asteroids.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Asteroids.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Asteroids.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "Gametype.h"
 
Index: code/trunk/src/orxonox/objects/gametypes/Deathmatch.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Deathmatch.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Deathmatch.cc	(revision 3196)
@@ -30,8 +30,7 @@
 
 #include "core/CoreIncludes.h"
+#include "network/Host.h"
 #include "objects/infos/PlayerInfo.h"
 #include "objects/worldentities/pawns/Pawn.h"
-
-#include "network/Host.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/gametypes/Deathmatch.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Deathmatch.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Deathmatch.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "Gametype.h"
 
Index: code/trunk/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Gametype.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Gametype.cc	(revision 3196)
@@ -29,17 +29,17 @@
 #include "Gametype.h"
 
-#include <cstdlib>
-#include <ctime>
-
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
-#include "core/Template.h"
 #include "core/GameMode.h"
-#include "overlays/OverlayGroup.h"
+
 #include "objects/infos/PlayerInfo.h"
 #include "objects/infos/Bot.h"
+#include "objects/worldentities/Camera.h"
+#include "objects/worldentities/ControllableEntity.h"
+#include "objects/worldentities/SpawnPoint.h"
 #include "objects/worldentities/pawns/Spectator.h"
-#include "objects/worldentities/SpawnPoint.h"
-#include "objects/worldentities/Camera.h"
+#include "objects/worldentities/pawns/Pawn.h"
+#include "overlays/OverlayGroup.h"
 
 namespace orxonox
@@ -287,5 +287,5 @@
         if (this->spawnpoints_.size() > 0)
         {
-            unsigned int randomspawn = (unsigned int)rnd(this->spawnpoints_.size());
+            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
             unsigned int index = 0;
             for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
Index: code/trunk/src/orxonox/objects/gametypes/Gametype.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Gametype.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Gametype.h	(revision 3196)
@@ -33,9 +33,10 @@
 
 #include <map>
+#include <set>
+#include <string>
 
 #include "core/BaseObject.h"
 #include "core/Identifier.h"
-#include "objects/worldentities/ControllableEntity.h"
-#include "objects/Tickable.h"
+#include "interfaces/Tickable.h"
 #include "objects/infos/GametypeInfo.h"
 
Index: code/trunk/src/orxonox/objects/gametypes/Pong.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Pong.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Pong.cc	(revision 3196)
@@ -30,11 +30,8 @@
 
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
 #include "core/Executor.h"
-#include "objects/worldentities/Model.h"
 #include "objects/worldentities/PongCenterpoint.h"
 #include "objects/worldentities/PongBall.h"
 #include "objects/worldentities/PongBat.h"
-#include "objects/infos/HumanPlayer.h"
 #include "objects/infos/PongBot.h"
 #include "objects/controllers/PongAI.h"
Index: code/trunk/src/orxonox/objects/gametypes/Pong.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/Pong.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/Pong.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "Deathmatch.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.cc	(revision 3196)
@@ -29,6 +29,7 @@
 #include "TeamBaseMatch.h"
 
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
 #include "objects/worldentities/pawns/TeamBaseMatchBase.h"
-#include "core/CoreIncludes.h"
 #include "objects/infos/PlayerInfo.h"
 
Index: code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/TeamBaseMatch.h	(revision 3196)
@@ -33,6 +33,6 @@
 
 #include <set>
+#include "tools/Timer.h"
 #include "TeamDeathmatch.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.cc	(revision 3196)
@@ -31,6 +31,7 @@
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
-#include "objects/Teamcolourable.h"
+#include "interfaces/TeamColourable.h"
 #include "objects/worldentities/TeamSpawnPoint.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -53,8 +54,8 @@
         static ColourValue colours[] =
         {
-            ColourValue(1.0, 0.3, 0.3),
-            ColourValue(0.3, 0.3, 1.0),
-            ColourValue(0.3, 1.0, 0.3),
-            ColourValue(1.0, 1.0, 0.0)
+            ColourValue(1.0f, 0.3f, 0.3f),
+            ColourValue(0.3f, 0.3f, 1.0f),
+            ColourValue(0.3f, 1.0f, 0.3f),
+            ColourValue(1.0f, 1.0f, 0.0f)
         };
         static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
@@ -138,5 +139,5 @@
         if (teamSpawnPoints.size() > 0)
         {
-            unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
+            unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
             unsigned int index = 0;
             for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
@@ -168,7 +169,7 @@
                 for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
                 {
-                    if ((*it)->isA(Class(Teamcolourable)))
+                    if ((*it)->isA(Class(TeamColourable)))
                     {
-                        Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
+                        TeamColourable* tc = dynamic_cast<TeamColourable*>(*it);
                         tc->setTeamColour(this->teamcolours_[it_player->second]);
                     }
Index: code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/TeamDeathmatch.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <map>
 #include <vector>
-
 #include "Deathmatch.h"
 
Index: code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/UnderAttack.cc	(revision 3196)
@@ -29,9 +29,8 @@
 #include "UnderAttack.h"
 
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
-#include "util/Convert.h"
 #include "network/Host.h"
-
 #include "objects/worldentities/pawns/Destroyer.h"
 #include "objects/infos/PlayerInfo.h"
Index: code/trunk/src/orxonox/objects/gametypes/UnderAttack.h
===================================================================
--- code/trunk/src/orxonox/objects/gametypes/UnderAttack.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/gametypes/UnderAttack.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/PawnListener.h"
 #include "TeamDeathmatch.h"
-#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/infos/Bot.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/Bot.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/Bot.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "Bot.h"
 
+#include "util/Math.h"
 #include "core/GameMode.h"
 #include "core/CoreIncludes.h"
@@ -34,5 +35,4 @@
 #include "objects/gametypes/Gametype.h"
 #include "objects/controllers/AIController.h"
-#include "util/Math.h"
 
 namespace orxonox
@@ -66,5 +66,5 @@
     void Bot::setConfigValues()
     {
-        static std::string names[] =
+        static const std::string names[] =
         {
             "Dr. Julius No",
Index: code/trunk/src/orxonox/objects/infos/Bot.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/Bot.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/Bot.h	(revision 3196)
@@ -31,6 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include <vector>
-
 #include "PlayerInfo.h"
 
Index: code/trunk/src/orxonox/objects/infos/GametypeInfo.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/GametypeInfo.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/GametypeInfo.cc	(revision 3196)
@@ -33,5 +33,5 @@
 #include "network/NetworkFunction.h"
 #include "network/Host.h"
-#include "objects/GametypeMessageListener.h"
+#include "interfaces/GametypeMessageListener.h"
 
 namespace orxonox
@@ -68,5 +68,5 @@
     }
 
-    void GametypeInfo::sendAnnounceMessage(const std::string& message) const
+    void GametypeInfo::sendAnnounceMessage(const std::string& message)
     {
         if (GameMode::isMaster())
@@ -77,5 +77,5 @@
     }
 
-    void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID) const
+    void GametypeInfo::sendAnnounceMessage(const std::string& message, unsigned int clientID)
     {
         if (GameMode::isMaster())
@@ -88,5 +88,5 @@
     }
 
-    void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID) const
+    void GametypeInfo::sendKillMessage(const std::string& message, unsigned int clientID)
     {
         if (GameMode::isMaster())
@@ -99,5 +99,5 @@
     }
 
-    void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID) const
+    void GametypeInfo::sendDeathMessage(const std::string& message, unsigned int clientID)
     {
         if (GameMode::isMaster())
@@ -110,5 +110,5 @@
     }
 
-    void GametypeInfo::dispatchAnnounceMessage(const std::string& message) const
+    void GametypeInfo::dispatchAnnounceMessage(const std::string& message)
     {
         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
@@ -116,5 +116,5 @@
     }
 
-    void GametypeInfo::dispatchKillMessage(const std::string& message) const
+    void GametypeInfo::dispatchKillMessage(const std::string& message)
     {
         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
@@ -122,5 +122,5 @@
     }
 
-    void GametypeInfo::dispatchDeathMessage(const std::string& message) const
+    void GametypeInfo::dispatchDeathMessage(const std::string& message)
     {
         for (ObjectList<GametypeMessageListener>::iterator it = ObjectList<GametypeMessageListener>::begin(); it != ObjectList<GametypeMessageListener>::end(); ++it)
Index: code/trunk/src/orxonox/objects/infos/GametypeInfo.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/GametypeInfo.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/GametypeInfo.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "Info.h"
 
@@ -59,12 +60,12 @@
                 { return this->hudtemplate_; }
 
-            void sendAnnounceMessage(const std::string& message) const;
-            void sendAnnounceMessage(const std::string& message, unsigned int clientID) const;
-            void sendKillMessage(const std::string& message, unsigned int clientID) const;
-            void sendDeathMessage(const std::string& message, unsigned int clientID) const;
+            void sendAnnounceMessage(const std::string& message);
+            void sendAnnounceMessage(const std::string& message, unsigned int clientID);
+            void sendKillMessage(const std::string& message, unsigned int clientID);
+            void sendDeathMessage(const std::string& message, unsigned int clientID);
 
-            void dispatchAnnounceMessage(const std::string& message) const;
-            void dispatchKillMessage(const std::string& message) const;
-            void dispatchDeathMessage(const std::string& message) const;
+            void dispatchAnnounceMessage(const std::string& message);
+            void dispatchKillMessage(const std::string& message);
+            void dispatchDeathMessage(const std::string& message);
 
         private:
Index: code/trunk/src/orxonox/objects/infos/HumanPlayer.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/HumanPlayer.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/HumanPlayer.cc	(revision 3196)
@@ -29,7 +29,7 @@
 #include "HumanPlayer.h"
 
-#include "core/GameMode.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
+#include "core/GameMode.h"
 #include "network/ClientInformation.h"
 #include "network/Host.h"
@@ -143,10 +143,10 @@
     float HumanPlayer::getPing() const
     {
-        return ClientInformation::findClient(this->getClientID())->getRTT();
+        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getRTT());
     }
 
     float HumanPlayer::getPacketLossRatio() const
     {
-        return ClientInformation::findClient(this->getClientID())->getPacketLoss();
+        return static_cast<float>(ClientInformation::findClient(this->getClientID())->getPacketLoss());
     }
 
Index: code/trunk/src/orxonox/objects/infos/HumanPlayer.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/HumanPlayer.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/HumanPlayer.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "PlayerInfo.h"
 
Index: code/trunk/src/orxonox/objects/infos/Info.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/Info.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/Info.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "Info.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- code/trunk/src/orxonox/objects/infos/PlayerInfo.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/PlayerInfo.cc	(revision 3196)
@@ -34,4 +34,5 @@
 #include "network/ClientInformation.h"
 #include "objects/gametypes/Gametype.h"
+#include "objects/worldentities/ControllableEntity.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/infos/PongBot.h
===================================================================
--- code/trunk/src/orxonox/objects/infos/PongBot.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/infos/PongBot.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "Bot.h"
 
Index: code/trunk/src/orxonox/objects/items/Engine.cc
===================================================================
--- code/trunk/src/orxonox/objects/items/Engine.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/Engine.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "Engine.h"
 
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
@@ -34,4 +35,5 @@
 #include "objects/Scene.h"
 #include "objects/worldentities/pawns/SpaceShip.h"
+#include "objects/pickup/ModifierType.h"
 #include "tools/Shader.h"
 #include "sound/SoundBase.h"
Index: code/trunk/src/orxonox/objects/items/Engine.h
===================================================================
--- code/trunk/src/orxonox/objects/items/Engine.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/Engine.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "Item.h"
-#include "objects/Tickable.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/items/Item.cc
===================================================================
--- code/trunk/src/orxonox/objects/items/Item.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/Item.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "Item.h"
-
 #include "core/CoreIncludes.h"
 
@@ -37,7 +36,3 @@
         RegisterObject(Item);
     }
-
-    Item::~Item()
-    {
-    }
 }
Index: code/trunk/src/orxonox/objects/items/Item.h
===================================================================
--- code/trunk/src/orxonox/objects/items/Item.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/Item.h	(revision 3196)
@@ -41,5 +41,5 @@
         public:
             Item(BaseObject* creator);
-            virtual ~Item();
+            virtual ~Item() {}
     };
 }
Index: code/trunk/src/orxonox/objects/items/MultiStateEngine.cc
===================================================================
--- code/trunk/src/orxonox/objects/items/MultiStateEngine.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/MultiStateEngine.cc	(revision 3196)
@@ -29,6 +29,6 @@
 #include "MultiStateEngine.h"
 
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/worldentities/pawns/SpaceShip.h"
Index: code/trunk/src/orxonox/objects/items/MultiStateEngine.h
===================================================================
--- code/trunk/src/orxonox/objects/items/MultiStateEngine.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/items/MultiStateEngine.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
 #include "Engine.h"
 
Index: code/trunk/src/orxonox/objects/pickup/BaseItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/BaseItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/BaseItem.cc	(revision 3196)
@@ -34,6 +34,4 @@
 #include "BaseItem.h"
 
-#include "PickupCollection.h"
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
@@ -55,5 +53,5 @@
         this->setGUIText("");
     }
-    //! Deconstructor.
+    //! Destructor.
     BaseItem::~BaseItem()
     {
@@ -105,4 +103,7 @@
     }
 
-    const std::string& BaseItem::getGUIText() const { return this->guiText_; }
+    const std::string& BaseItem::getGUIText() const
+    {
+        return this->guiText_;
+    }
 }
Index: code/trunk/src/orxonox/objects/pickup/BaseItem.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/BaseItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/BaseItem.h	(revision 3196)
@@ -37,4 +37,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/pickup/DroppedItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/DroppedItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/DroppedItem.cc	(revision 3196)
@@ -29,10 +29,11 @@
 #include "DroppedItem.h"
 
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/Executor.h"
 #include "BaseItem.h"
+#include "objects/worldentities/Billboard.h"
+#include "objects/worldentities/Model.h"
 #include "objects/worldentities/pawns/Pawn.h"
-#include "objects/worldentities/Model.h"
-#include "objects/worldentities/Billboard.h"
-
-#include "core/CoreIncludes.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/DroppedItem.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/DroppedItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/DroppedItem.h	(revision 3196)
@@ -29,5 +29,5 @@
 /**
     @file
-    @brief Definition of BaseItem (base-class for items/pickups).
+    @brief Definition of DroppedItem
 */
 
@@ -37,7 +37,7 @@
 #include "OrxonoxPrereqs.h"
 
-#include "objects/Tickable.h"
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/EquipmentItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/EquipmentItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/EquipmentItem.cc	(revision 3196)
@@ -33,5 +33,4 @@
 
 #include "EquipmentItem.h"
-
 #include "core/CoreIncludes.h"
 
@@ -46,7 +45,3 @@
         RegisterObject(EquipmentItem);
     }
-    //! Deconstructor.
-    EquipmentItem::~EquipmentItem()
-    {
-    }
 }
Index: code/trunk/src/orxonox/objects/pickup/EquipmentItem.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/EquipmentItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/EquipmentItem.h	(revision 3196)
@@ -38,5 +38,4 @@
 
 #include "BaseItem.h"
-
 namespace orxonox
 {
@@ -49,5 +48,5 @@
     public:
         EquipmentItem(BaseObject* creator);
-        virtual ~EquipmentItem();
+        virtual ~EquipmentItem() {}
     };
 }
Index: code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/ModifierPickup.cc	(revision 3196)
@@ -33,9 +33,7 @@
 
 #include "ModifierPickup.h"
-#include "PickupCollection.h"
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/worldentities/pawns/Pawn.h"
 
Index: code/trunk/src/orxonox/objects/pickup/ModifierPickup.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/ModifierPickup.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/ModifierPickup.h	(revision 3196)
@@ -35,11 +35,12 @@
 #define _ModifierPickup_H__
 
-#include <climits>
-
 #include "OrxonoxPrereqs.h"
 
+#include <climits>
+#include <map>
+
+#include "orxonox/tools/Timer.h"
+#include "ModifierType.h"
 #include "PassiveItem.h"
-#include "ModifierType.h"
-#include "orxonox/tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/ModifierType.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/ModifierType.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/ModifierType.h	(revision 3196)
@@ -35,4 +35,6 @@
 #define _ModifierType_H__
 
+#include "OrxonoxPrereqs.h"
+
 namespace orxonox
 {
Index: code/trunk/src/orxonox/objects/pickup/PassiveItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PassiveItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PassiveItem.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "PassiveItem.h"
-
 #include "core/CoreIncludes.h"
 
@@ -41,7 +40,3 @@
         RegisterObject(PassiveItem);
     }
-    //! Deconstructor.
-    PassiveItem::~PassiveItem()
-    {
-    }
 }
Index: code/trunk/src/orxonox/objects/pickup/PassiveItem.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PassiveItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PassiveItem.h	(revision 3196)
@@ -36,5 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "BaseItem.h"
 
@@ -49,5 +48,5 @@
     public:
         PassiveItem(BaseObject* creator);
-        virtual ~PassiveItem();
+        virtual ~PassiveItem() {}
     };
 }
Index: code/trunk/src/orxonox/objects/pickup/PickupCollection.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupCollection.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupCollection.cc	(revision 3196)
@@ -34,10 +34,8 @@
 #include "PickupCollection.h"
 
-#include "BaseItem.h"
+#include "core/CoreIncludes.h"
 #include "EquipmentItem.h"
 #include "PassiveItem.h"
 #include "UsableItem.h"
-
-#include "core/CoreIncludes.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/PickupCollection.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupCollection.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupCollection.h	(revision 3196)
@@ -37,10 +37,9 @@
 #include "OrxonoxPrereqs.h"
 
+#include <deque>
 #include <map>
-#include <deque>
 #include <string>
 
 #include "util/Math.h"
-
 #include "ModifierType.h"
 
Index: code/trunk/src/orxonox/objects/pickup/PickupInventory.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupInventory.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupInventory.cc	(revision 3196)
@@ -28,15 +28,4 @@
 
 #include "PickupInventory.h"
-
-#include "EquipmentItem.h"
-#include "PassiveItem.h"
-#include "UsableItem.h"
-
-#include "core/ConsoleCommand.h"
-#include "core/input/InputManager.h"
-
-#include "gui/GUIManager.h"
-#include "objects/controllers/HumanController.h"
-#include "objects/worldentities/pawns/Pawn.h"
 
 #include <CEGUIImage.h>
@@ -47,4 +36,15 @@
 #include <elements/CEGUITabControl.h>
 
+#include "core/ConsoleCommand.h"
+#include "core/input/InputManager.h"
+#include "gui/GUIManager.h"
+#include "objects/controllers/HumanController.h"
+#include "objects/worldentities/pawns/Pawn.h"
+
+#include "EquipmentItem.h"
+#include "PassiveItem.h"
+#include "UsableItem.h"
+
+
 namespace orxonox
 {
@@ -86,12 +86,12 @@
     {
         if(PickupInventory::getSingleton()->isVisible()) {
-            GUIManager::getInstancePtr()->executeCode("hideGUI(\"PickupInventory\")");
-            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
             InputManager::getInstance().requestLeaveState("guiMouseOnly");
         }
         else
         {
-            GUIManager::getInstancePtr()->showGUI("PickupInventory");
-            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            GUIManager::getInstance().showGUI("PickupInventory");
+            GUIManager::getInstance().executeCode("showCursor()");
             InputManager::getInstance().requestEnterState("guiMouseOnly");
         }
Index: code/trunk/src/orxonox/objects/pickup/PickupInventory.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupInventory.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupInventory.h	(revision 3196)
@@ -37,7 +37,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <CEGUIForwardRefs.h>
 #include "core/BaseObject.h"
-
-namespace CEGUI { class Window; class WindowManager; class Image; }
 
 // tolua_begin
Index: code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupSpawner.cc	(revision 3196)
@@ -33,13 +33,14 @@
 
 #include "PickupSpawner.h"
+
 #include "BaseItem.h"
-#include "PickupInventory.h"    // HACK; Only for hack, remove later
-#include "gui/GUIManager.h"     // HACK; see above
 
 #include "core/CoreIncludes.h"
+#include "core/Template.h"
 #include "core/XMLPort.h"
-#include "core/Template.h"
+#include "gui/GUIManager.h"     // HACK; see below
+#include "objects/worldentities/pawns/Pawn.h"
+#include "PickupInventory.h"    // HACK; Only for hack, remove later
 
-#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -95,6 +96,6 @@
         //  & load the GUI itself too, along with some empty windows
         //   = even less delays
-        GUIManager::getInstancePtr()->showGUI("PickupInventory");
-        GUIManager::getInstancePtr()->executeCode("hideGUI(\"PickupInventory\")");
+        GUIManager::getInstance().showGUI("PickupInventory");
+        GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
         PickupInventory::getSingleton();
     }
Index: code/trunk/src/orxonox/objects/pickup/PickupSpawner.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/PickupSpawner.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/PickupSpawner.h	(revision 3196)
@@ -37,7 +37,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include "objects/Tickable.h"
+#include <string>
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/UsableItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/UsableItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/UsableItem.cc	(revision 3196)
@@ -33,5 +33,4 @@
 
 #include "UsableItem.h"
-
 #include "core/CoreIncludes.h"
 
@@ -46,7 +45,3 @@
         RegisterObject(UsableItem);
     }
-    //! Deconstructor.
-    UsableItem::~UsableItem()
-    {
-    }
 }
Index: code/trunk/src/orxonox/objects/pickup/UsableItem.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/UsableItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/UsableItem.h	(revision 3196)
@@ -36,5 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "BaseItem.h"
 
@@ -49,5 +48,5 @@
     public:
         UsableItem(BaseObject* creator);
-        virtual ~UsableItem();
+        virtual ~UsableItem() { }
 
         /**
Index: code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.cc	(revision 3196)
@@ -34,8 +34,7 @@
 #include "HealthImmediate.h"
 
-#include "objects/worldentities/pawns/Pawn.h"
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/HealthImmediate.h	(revision 3196)
@@ -36,5 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "objects/pickup/PassiveItem.h"
 
Index: code/trunk/src/orxonox/objects/pickup/items/HealthUsable.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/HealthUsable.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/HealthUsable.cc	(revision 3196)
@@ -33,10 +33,10 @@
 
 #include "HealthUsable.h"
-#include "objects/pickup/DroppedItem.h"
 
-#include "objects/worldentities/pawns/Pawn.h"
-
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "objects/pickup/DroppedItem.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/items/HealthUsable.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/HealthUsable.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/HealthUsable.h	(revision 3196)
@@ -35,10 +35,8 @@
 #define _HealthUsable_H__
 
-#include <climits>
-
 #include "OrxonoxPrereqs.h"
 
+#include <climits>
 #include "objects/pickup/UsableItem.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/items/Jump.cc
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/Jump.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/Jump.cc	(revision 3196)
@@ -33,10 +33,9 @@
 
 #include "Jump.h"
-#include "objects/pickup/DroppedItem.h"
-
-#include "objects/worldentities/pawns/Pawn.h"
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
+#include "objects/pickup/DroppedItem.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/pickup/items/Jump.h
===================================================================
--- code/trunk/src/orxonox/objects/pickup/items/Jump.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/pickup/items/Jump.h	(revision 3196)
@@ -39,6 +39,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include <climits>
+#include "util/Math.h"
 #include "objects/pickup/UsableItem.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/quest/AddQuest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddQuest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddQuest.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddQuest.cc
+    @file
     @brief Implementation of the AddQuest class.
 */
@@ -34,12 +34,7 @@
 #include "AddQuest.h"
 
-#include <string>
-
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
 #include "QuestManager.h"
-#include "QuestDescription.h"
 #include "Quest.h"
 
Index: code/trunk/src/orxonox/objects/quest/AddQuest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddQuest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddQuest.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddQuest.h
+    @file
     @brief Definition of the AddQuest class.
 */
@@ -36,8 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include <string>
-
-#include "core/XMLPort.h"
 #include "ChangeQuestStatus.h"
 
Index: code/trunk/src/orxonox/objects/quest/AddQuestHint.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddQuestHint.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddQuestHint.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddQuestHint.cc
+    @file
     @brief Implementation of the AddQuestHint class.
 */
@@ -34,8 +34,7 @@
 #include "AddQuestHint.h"
 
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestManager.h"
 #include "QuestItem.h"
Index: code/trunk/src/orxonox/objects/quest/AddQuestHint.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddQuestHint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddQuestHint.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddQuestHint.h
+    @file
     @brief Definition of the AddQuestHint class.
 */
@@ -38,5 +38,4 @@
 
 #include <string>
-
 #include "QuestEffect.h"
 
Index: code/trunk/src/orxonox/objects/quest/AddReward.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddReward.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddReward.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddReward.cc
+    @file
     @brief Implementation of the AddReward class.
 */
@@ -35,7 +35,6 @@
 
 #include "core/CoreIncludes.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
-#include "Rewardable.h"
+#include "core/XMLPort.h"
+#include "interfaces/Rewardable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/quest/AddReward.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/AddReward.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/AddReward.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file AddReward.h
+    @file
     @brief Definition of the AddReward class.
 */
@@ -38,6 +38,4 @@
 
 #include <list>
-
-#include "core/XMLPort.h"
 #include "QuestEffect.h"
 
Index: code/trunk/src/orxonox/objects/quest/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/objects/quest/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/CMakeLists.txt	(revision 3196)
@@ -17,4 +17,3 @@
   QuestManager.cc
   QuestNotification.cc
-  Rewardable.cc
 )
Index: code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file ChangeQuestStatus.cc
+    @file
     @brief Implementation of the ChangeQuestStatus class.
 */
@@ -35,5 +35,5 @@
 
 #include "core/CoreIncludes.h"
-
+#include "core/XMLPort.h"
 #include "QuestItem.h"
 
Index: code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file ChangeQuestStatus.h
+    @file
     @brief Definition of the ChangeQuestStatus class.
 */
@@ -38,6 +38,4 @@
 
 #include <string>
-
-#include "core/XMLPort.h"
 #include "QuestEffect.h"
 
Index: code/trunk/src/orxonox/objects/quest/CompleteQuest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/CompleteQuest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/CompleteQuest.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file CompleteQuest.cc
+    @file
     @brief Implementation of the CompleteQuest class.
 */
@@ -35,7 +35,5 @@
 
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestManager.h"
 #include "Quest.h"
Index: code/trunk/src/orxonox/objects/quest/CompleteQuest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/CompleteQuest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/CompleteQuest.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file CompleteQuest.h
+    @file
     @brief Definition of the CompleteQuest class.
 */
@@ -36,8 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include <string>
-
-#include "core/XMLPort.h"
 #include "ChangeQuestStatus.h"
 
Index: code/trunk/src/orxonox/objects/quest/FailQuest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/FailQuest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/FailQuest.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file FailQuest.cc
+    @file
     @brief Implementation of the FailQuest class.
 */
@@ -35,7 +35,5 @@
 
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestManager.h"
 #include "Quest.h"
Index: code/trunk/src/orxonox/objects/quest/FailQuest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/FailQuest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/FailQuest.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file FailQuest.h
+    @file
     @brief Definition of the FailQuest class.
 */
@@ -36,8 +36,4 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include <string>
-
-#include "core/XMLPort.h"
 #include "ChangeQuestStatus.h"
 
Index: code/trunk/src/orxonox/objects/quest/GlobalQuest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/GlobalQuest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/GlobalQuest.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file GlobalQuest.cc
+    @file
     @brief Implementation of the GlobalQuest class.
 */
@@ -34,9 +34,6 @@
 #include "GlobalQuest.h"
 
-#include "orxonox/objects/infos/PlayerInfo.h"
 #include "core/CoreIncludes.h"
-#include "core/Super.h"
-#include "util/Exception.h"
-
+#include "core/XMLPort.h"
 #include "QuestEffect.h"
 
Index: code/trunk/src/orxonox/objects/quest/GlobalQuest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/GlobalQuest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/GlobalQuest.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file GlobalQuest.h
+    @file
     @brief Definition of the GlobalQuest class.
 */
@@ -37,8 +37,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
 #include <set>
-#include <list>
-
-#include "core/XMLPort.h"
 #include "Quest.h"
 
Index: code/trunk/src/orxonox/objects/quest/LocalQuest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/LocalQuest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/LocalQuest.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file LocalQuest.cc
+    @file
     @brief Implementation of the LocalQuest class.
 */
@@ -35,8 +35,5 @@
 
 #include "core/CoreIncludes.h"
-#include "core/Super.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestEffect.h"
 
Index: code/trunk/src/orxonox/objects/quest/LocalQuest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/LocalQuest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/LocalQuest.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file LocalQuest.h
+    @file
     @brief Definition of the LocalQuest class.
 */
@@ -38,7 +38,4 @@
 
 #include <map>
-#include <string>
-
-#include "core/XMLPort.h"
 #include "Quest.h"
 
Index: code/trunk/src/orxonox/objects/quest/Quest.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/Quest.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/Quest.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file Quest.cc
+    @file
     @brief Implementation of the Quest class.
 */
@@ -35,6 +35,5 @@
 
 #include "core/CoreIncludes.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestManager.h"
 #include "QuestDescription.h"
Index: code/trunk/src/orxonox/objects/quest/Quest.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/Quest.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/Quest.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file Quest.h
+    @file
     @brief Definition of the Quest class.
         The Quest is the parent class of LocalQuest and GlobalQuest.
@@ -39,8 +39,4 @@
 
 #include <list>
-#include <string>
-
-#include "core/XMLPort.h"
-
 #include "QuestItem.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestDescription.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestDescription.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestDescription.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestDescription.cc
+    @file
     @brief Implementation of the QuestDescription class.
 */
@@ -36,4 +36,5 @@
 
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 #include "QuestNotification.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestDescription.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestDescription.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestDescription.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestDescription.h
+    @file
     @brief Definition of the QuestDescription class.
 */
@@ -38,7 +38,5 @@
 
 #include <string>
-
 #include "core/BaseObject.h"
-#include "core/XMLPort.h"
 
 // tolua_begin
Index: code/trunk/src/orxonox/objects/quest/QuestEffect.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestEffect.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestEffect.cc	(revision 3196)
@@ -28,13 +28,10 @@
 
 /**
-    @file QuestEffect.cc
+    @file
     @brief Implementation of the QuestEffect class.
 */
 
 #include "QuestEffect.h"
-
 #include "core/CoreIncludes.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/quest/QuestEffect.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestEffect.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestEffect.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file QuestEffect.h
+    @file
     @brief Definition of the QuestEffect class.
 */
@@ -38,5 +38,4 @@
 
 #include <list>
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestEffectBeacon.cc
+    @file
     @brief Implementation of the QuestEffectBeacon class.
 */
@@ -36,8 +36,5 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "core/Event.h"
 #include "core/EventIncludes.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
 #include "orxonox/objects/worldentities/pawns/Pawn.h"
 #include "orxonox/objects/worldentities/triggers/PlayerTrigger.h"
@@ -89,5 +86,5 @@
         SUPER(QuestEffectBeacon, processEvent, event);
     
-        SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
+        ORXONOX_SET_SUBCLASS_EVENT(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
     }
     
Index: code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestEffectBeacon.h
+    @file
     @brief Definition of the QuestEffectBeacon class.
 */
@@ -37,4 +37,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
 #include "orxonox/objects/worldentities/StaticEntity.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestHint.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestHint.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestHint.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file QuestHint.cc
+    @file
     @brief Implementation of the QuestHint class.
 */
@@ -35,7 +35,5 @@
 
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
-#include "orxonox/objects/infos/PlayerInfo.h"
+#include "core/XMLPort.h"
 #include "QuestManager.h"
 #include "QuestDescription.h"
Index: code/trunk/src/orxonox/objects/quest/QuestHint.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestHint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestHint.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file QuestHint.h
+    @file
     @brief Definition of the QuestHint class.
 */
@@ -38,7 +38,4 @@
 
 #include <map>
-#include <string>
-
-#include "core/XMLPort.h"
 #include "QuestItem.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestItem.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestItem.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestItem.cc	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file QuestItem.cc
+    @file
     @brief Implementation of the QuestItem class.
 */
@@ -35,5 +35,5 @@
 
 #include "core/CoreIncludes.h"
-
+#include "core/XMLPort.h"
 #include "QuestDescription.h"
 
Index: code/trunk/src/orxonox/objects/quest/QuestItem.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestItem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestItem.h	(revision 3196)
@@ -28,5 +28,5 @@
  
 /**
-    @file QuestItem.h
+    @file
     @brief Definition of the QuestItem class.
         The QuestItem is the parent class of Quest and QuestHint.
@@ -40,7 +40,5 @@
 
 #include <string>
-
 #include "core/BaseObject.h"
-#include "core/XMLPort.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/quest/QuestListener.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestListener.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestListener.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestListener.cc
+    @file
     @brief Implementation of the QuestListener class.
 */
@@ -36,6 +36,4 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Exception.h"
-
 #include "Quest.h"
 #include "QuestManager.h"
@@ -164,5 +162,5 @@
         Return the mode of the QuestListener. Can be eighter 'all', 'start', 'fail' or 'complete'.
     */
-    const std::string QuestListener::getMode(void)
+    std::string QuestListener::getMode(void)
     {
         if(this->mode_ == questListenerMode::all)
@@ -191,4 +189,15 @@
     /**
     @brief
+        Get the questId of the Quest the QuestListener reacts to.
+    @return
+        Returns the questId of the Quest the QuestListener reacts to.
+    */
+    const std::string & QuestListener::getQuestId(void)    
+    {
+        return this->quest_->getId();
+    }
+
+    /**
+    @brief
         Executes the QuestListener, resp. fires an Event.
     @return
Index: code/trunk/src/orxonox/objects/quest/QuestListener.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestListener.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestListener.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestListener.h
+    @file
     @brief Definition of the QuestListener class.
 */
@@ -39,8 +39,5 @@
 #include <string>
 #include <list>
-
 #include "core/BaseObject.h"
-
-#include "Quest.h"
 
 namespace orxonox
@@ -90,13 +87,7 @@
         bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
         
-        const std::string getMode(void); //!< Get the mode of the QuestListener.
+        std::string getMode(void); //!< Get the mode of the QuestListener.
         
-        /**
-        @brief Get the questId of the Quest the QuestListener reacts to.
-        @return Returns the questId of the Quest the QuestListener reacts to.
-        */
-        inline const std::string & getQuestId(void)
-                { return this->quest_->getId(); }
-        
+        const std::string & getQuestId(void);        
         bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
         
Index: code/trunk/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestManager.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestManager.cc
+    @file
     @brief Implementation of the QuestManager class.
 */
@@ -34,13 +34,14 @@
 #include "QuestManager.h"
 
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
-#include "core/ConsoleCommand.h"
-#include "core/input/InputManager.h"
-
-#include "util/Exception.h"
 #include "gui/GUIManager.h"
+
 #include "objects/infos/PlayerInfo.h"
+#include "objects/infos/PlayerInfo.h"
+#include "overlays/GUIOverlay.h"
 #include "Quest.h"
 #include "QuestHint.h"
+#include "QuestItem.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/quest/QuestManager.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestManager.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestManager.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file QuestManager.h
+    @file
     @brief Definition of the QuestManager class.
 */
@@ -37,11 +37,8 @@
 #include "OrxonoxPrereqs.h"
 
+#include <list>
 #include <map>
-#include <list>
 #include <string>
-
 #include "core/OrxonoxClass.h"
-#include "orxonox/objects/infos/PlayerInfo.h"
-#include "overlays/GUIOverlay.h"
 
 // tolua_begin
Index: code/trunk/src/orxonox/objects/quest/QuestNotification.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestNotification.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestNotification.cc	(revision 3196)
@@ -28,8 +28,5 @@
 
 #include "QuestNotification.h"
-
 #include "core/CoreIncludes.h"
-
-#include "orxonox/overlays/notifications/Notification.h"
 
 namespace orxonox {
Index: code/trunk/src/orxonox/objects/quest/QuestNotification.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestNotification.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/quest/QuestNotification.h	(revision 3196)
@@ -33,6 +33,5 @@
 
 #include <string>
-
-#include "orxonox/overlays/notifications/Notification.h"
+#include "overlays/notifications/Notification.h"
 
 namespace orxonox {
Index: code/trunk/src/orxonox/objects/quest/Rewardable.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/Rewardable.cc	(revision 3110)
+++ 	(revision )
@@ -1,58 +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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file Rewardable.cc
-    @brief Implementation of the Rewardable class.
-*/
-
-#include "Rewardable.h"
-
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Constructor. Registers the object.
-    */
-    Rewardable::Rewardable(BaseObject* creator) : BaseObject(creator)
-    {
-        RegisterObject(Rewardable);
-    }
-
-    /**
-    @brief
-        Destructor,
-    */
-    Rewardable::~Rewardable()
-    {
-    }
-
-
-}
Index: code/trunk/src/orxonox/objects/quest/Rewardable.h
===================================================================
--- code/trunk/src/orxonox/objects/quest/Rewardable.h	(revision 3110)
+++ 	(revision )
@@ -1,72 +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:
- *      Damian 'Mozork' Frick
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file Rewardable.h
-    @brief Definition of the Rewardable class.
-*/
-
-#ifndef _Rewardable_H__
-#define _Rewardable_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "core/BaseObject.h"
-
-namespace orxonox
-{
-    /**
-    @brief
-        Rewardable is an Interface, that can be implemented by any object to enable it to be given as reward to a player through QuestEffects. (With the AddReward effect.)
-        
-        It just needs to inherit form Rewardable, and implement the reward() method.
-    @author
-        Damian 'Mozork' Frick
-    */
-    class _OrxonoxExport Rewardable : public BaseObject
-    {
-        public:
-            Rewardable(BaseObject* creator);
-            virtual ~Rewardable();
-
-            /**
-            @brief
-                Method to transcribe a rewardable object to the player.
-                Must be implemented by every class inheriting from Rewardable.
-            @param player
-                A pointer to the ControllableEntity, do whatever you want with it.
-            @return
-                Return true if successful.
-            */
-            virtual bool reward(PlayerInfo* player) = 0;
-
-    };
-
-}
-
-#endif /* _Rewardable_H__ */
Index: code/trunk/src/orxonox/objects/weaponsystem/DefaultWeaponmodeLink.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/DefaultWeaponmodeLink.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/DefaultWeaponmodeLink.cc	(revision 3196)
@@ -31,5 +31,4 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "WeaponSystem.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/Munition.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/Munition.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/Munition.cc	(revision 3196)
@@ -29,5 +29,4 @@
 
 #include "Munition.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/Munition.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/Munition.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/Munition.h	(revision 3196)
@@ -34,5 +34,4 @@
 
 #include <map>
-
 #include "core/BaseObject.h"
 #include "tools/Timer.h"
Index: code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.cc	(revision 3196)
@@ -30,8 +30,6 @@
 #include "MuzzleFlash.h"
 
-#include "core/GameMode.h"
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "util/Math.h"
+#include "core/Executor.h"
 
 namespace orxonox
@@ -42,5 +40,5 @@
     {
         RegisterObject(MuzzleFlash);
-        this->setScale(0.1);
+        this->setScale(0.1f);
         
         this->delayTimer_.setTimer(0.1f, false, this, createExecutor(createFunctor(&MuzzleFlash::destroy)));
Index: code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/MuzzleFlash.h	(revision 3196)
@@ -31,7 +31,7 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "tools/Timer.h"
 #include "objects/worldentities/Billboard.h"
-#include "tools/Timer.h"
-
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/Weapon.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/Weapon.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/Weapon.h	(revision 3196)
@@ -32,7 +32,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <map>
+#include "tools/Timer.h"
 #include "objects/worldentities/StaticEntity.h"
-
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/WeaponMode.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/WeaponMode.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/WeaponMode.h	(revision 3196)
@@ -32,9 +32,10 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "util/Math.h"
 #include "core/BaseObject.h"
-
+#include "core/Identifier.h"
 #include "tools/Timer.h"
-#include "core/Identifier.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.cc	(revision 3196)
@@ -31,8 +31,6 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "objects/worldentities/pawns/Pawn.h"
 
 #include "Weapon.h"
-#include "WeaponSlot.h"
 #include "WeaponSystem.h"
 #include "DefaultWeaponmodeLink.h"
Index: code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/WeaponPack.h	(revision 3196)
@@ -34,5 +34,4 @@
 
 #include <set>
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/WeaponSet.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/WeaponSet.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/WeaponSet.h	(revision 3196)
@@ -34,5 +34,4 @@
 
 #include <map>
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/WeaponSystem.h	(revision 3196)
@@ -33,8 +33,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include <map>
 #include <set>
-#include <map>
 #include <vector>
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/munitions/FusionMunition.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/munitions/FusionMunition.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/munitions/FusionMunition.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "FusionMunition.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/munitions/LaserMunition.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/munitions/LaserMunition.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/munitions/LaserMunition.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "LaserMunition.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.cc	(revision 3196)
@@ -28,5 +28,4 @@
 
 #include "ReplenishingMunition.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/munitions/ReplenishingMunition.h	(revision 3196)
@@ -31,6 +31,7 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "tools/Timer.h"
 #include "objects/weaponsystem/Munition.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.cc	(revision 3196)
@@ -29,8 +29,6 @@
 #include "BillboardProjectile.h"
 
-#include <OgreBillboardSet.h>
-
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "objects/Scene.h"
 
@@ -46,5 +44,5 @@
         {
             assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
-            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1);
+            this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5f, 0.5f, 0.7f, 0.8f), 1);
             this->attachOgreObject(this->billboard_.getBillboardSet());
         }
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/BillboardProjectile.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "tools/BillboardSet.h"
 #include "Projectile.h"
-#include "tools/BillboardSet.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.cc	(revision 3196)
@@ -29,10 +29,6 @@
 #include "LightningGunProjectile.h"
 
-#include <OgreBillboardSet.h>
-
-#include "core/GameMode.h"
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "objects/Scene.h"
-#include "util/Convert.h"
 
 namespace orxonox
@@ -46,5 +42,5 @@
         this->textureIndex_ = 1;
         this->maxTextureIndex_ = 8;
-        this->textureTimer_.setTimer(0.01, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
+        this->textureTimer_.setTimer(0.01f, true, this, createExecutor(createFunctor(&LightningGunProjectile::changeTexture)));
         
         registerVariables();
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/LightningGunProjectile.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "tools/Timer.h"
-
 #include "BillboardProjectile.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.cc	(revision 3196)
@@ -29,10 +29,7 @@
 #include "ParticleProjectile.h"
 
-#include <OgreParticleSystem.h>
 #include <OgreParticleEmitter.h>
-
-#include "core/GameMode.h"
+#include "tools/ParticleInterface.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
 #include "objects/Scene.h"
 
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/ParticleProjectile.h	(revision 3196)
@@ -31,8 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "BillboardProjectile.h"
-#include "tools/ParticleInterface.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	(revision 3196)
@@ -29,16 +29,11 @@
 #include "Projectile.h"
 
-#include <OgreBillboard.h>
-
 #include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
 #include "core/Executor.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/Iterator.h"
-#include "tools/ParticleInterface.h"
-
-#include "objects/worldentities/Model.h"
+#include "core/GameMode.h"
+#include "objects/collisionshapes/SphereCollisionShape.h"
+#include "objects/worldentities/pawns/Pawn.h"
 #include "objects/worldentities/ParticleSpawner.h"
-#include "objects/collisionshapes/SphereCollisionShape.h"
-#include "core/GameMode.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
+#include "interfaces/PawnListener.h"
 #include "objects/worldentities/MovableEntity.h"
-#include "objects/worldentities/pawns/Pawn.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.cc	(revision 3196)
@@ -30,9 +30,10 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Executor.h"
 #include "core/XMLPort.h"
-#include "objects/weaponsystem/projectiles/ParticleProjectile.h"
 #include "objects/worldentities/Model.h"
+
+#include "objects/weaponsystem/projectiles/Projectile.h"
 #include "objects/weaponsystem/MuzzleFlash.h"
-
 #include "objects/weaponsystem/Weapon.h"
 #include "objects/weaponsystem/WeaponPack.h"
@@ -69,9 +70,4 @@
     {
         this->material_ = material;
-    }
-
-    std::string& EnergyDrink::getMaterial()
-    {
-        return this->material_;
     }
 
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/EnergyDrink.h	(revision 3196)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "tools/Timer.h"
 #include "objects/weaponsystem/WeaponMode.h"
-#include "tools/Timer.h"
 
 namespace orxonox
@@ -47,5 +49,6 @@
         private:
             void setMaterial(const std::string& material);
-            std::string& getMaterial();
+            inline const std::string& getMaterial()
+                { return this->material_; }
             void setDelay(float d);
             float getDelay() const;
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/FusionFire.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/FusionFire.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/FusionFire.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "FusionFire.h"
 
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "objects/weaponsystem/projectiles/BillboardProjectile.h"
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.cc	(revision 3196)
@@ -30,9 +30,10 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Executor.h"
 #include "core/XMLPort.h"
-#include "objects/weaponsystem/projectiles/ParticleProjectile.h"
 #include "objects/worldentities/Model.h"
+
+#include "objects/weaponsystem/projectiles/Projectile.h"
 #include "objects/weaponsystem/MuzzleFlash.h"
-
 #include "objects/weaponsystem/Weapon.h"
 #include "objects/weaponsystem/WeaponPack.h"
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.h
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/HsW01.h	(revision 3196)
@@ -31,6 +31,7 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "tools/Timer.h"
 #include "objects/weaponsystem/WeaponMode.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LaserFire.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LaserFire.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LaserFire.cc	(revision 3196)
@@ -31,5 +31,4 @@
 #include "core/CoreIncludes.h"
 #include "objects/weaponsystem/projectiles/ParticleProjectile.h"
-
 #include "objects/weaponsystem/Weapon.h"
 #include "objects/weaponsystem/WeaponPack.h"
Index: code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LightningGun.cc
===================================================================
--- code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LightningGun.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/weaponsystem/weaponmodes/LightningGun.cc	(revision 3196)
@@ -30,14 +30,8 @@
 
 #include "core/CoreIncludes.h"
-
-#include "objects/worldentities/Billboard.h"
-
+#include "objects/weaponsystem/projectiles/LightningGunProjectile.h"
 #include "objects/weaponsystem/Weapon.h"
 #include "objects/weaponsystem/WeaponPack.h"
 #include "objects/weaponsystem/WeaponSystem.h"
-
-#include "objects/weaponsystem/projectiles/LightningGunProjectile.h"
-
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Attacher.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Attacher.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Attacher.h	(revision 3196)
@@ -33,7 +33,7 @@
 
 #include <list>
-
+#include <string>
+#include "core/XMLNameListener.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "core/XMLNameListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Backlight.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Backlight.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Backlight.cc	(revision 3196)
@@ -31,11 +31,11 @@
 #include <OgreRibbonTrail.h>
 #include <OgreSceneManager.h>
-
+#include <OgreSceneNode.h>
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
-#include "util/Exception.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Backlight.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Backlight.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Backlight.h	(revision 3196)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "interfaces/TimeFactorListener.h"
 #include "FadingBillboard.h"
-#include "tools/TimeFactorListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3196)
@@ -28,19 +28,16 @@
 
 #include "BigExplosion.h"
-#include "MovableEntity.h"
+
+//#include <sstream>
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/CommandExecutor.h"
+#include "core/Executor.h"
+#include "core/GameMode.h"
+#include "tools/ParticleInterface.h"
+#include "objects/Scene.h"
+#include "objects/worldentities/ParticleSpawner.h"
 #include "Model.h"
-
-#include <OgreParticleSystem.h>
-#include <OgreSceneNode.h>
-#include <sstream>
-
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-#include "core/CommandExecutor.h"
-#include "objects/Scene.h"
-#include "tools/ParticleInterface.h"
-#include "objects/worldentities/ParticleSpawner.h"
-#include "util/Exception.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/BigExplosion.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3196)
@@ -31,9 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include <string>
-
-
+#include "tools/Timer.h"
 #include "MovableEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 3196)
@@ -29,9 +29,7 @@
 #include "Billboard.h"
 
-#include <OgreBillboardSet.h>
-
 #include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/GameMode.h"
 #include "objects/Scene.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/Billboard.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Billboard.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Billboard.h	(revision 3196)
@@ -31,12 +31,13 @@
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
+
 #include "util/Math.h"
 #include "tools/BillboardSet.h"
-#include "objects/Teamcolourable.h"
+#include "interfaces/TeamColourable.h"
+#include "StaticEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Billboard : public StaticEntity, public Teamcolourable
+    class _OrxonoxExport Billboard : public StaticEntity, public TeamColourable
     {
         public:
Index: code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3196)
@@ -29,8 +29,7 @@
 #include "BlinkingBillboard.h"
 
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Math.h"
 
 namespace orxonox
@@ -80,7 +79,7 @@
             this->time_ += dt;
             if (this->bQuadratic_)
-                this->setScale(this->amplitude_ * square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
+                this->setScale(this->amplitude_ * static_cast<float>(square(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_))));
             else
-                this->setScale(this->amplitude_ * sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_));
+                this->setScale(this->amplitude_ * static_cast<float>(sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)));
         }
     }
Index: code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.h	(revision 3196)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
 #include "Billboard.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 3196)
@@ -29,7 +29,4 @@
 #include "Camera.h"
 
-#include <string>
-#include <cassert>
-
 #include <OgreCamera.h>
 #include <OgreSceneManager.h>
@@ -37,4 +34,5 @@
 
 #include "util/Exception.h"
+#include "util/String.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/trunk/src/orxonox/objects/worldentities/Camera.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Camera.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Camera.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgrePrerequisites.h>
+#include "util/OgreForwardRefs.h"
+#include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 3196)
@@ -28,6 +28,4 @@
 
 #include "CameraPosition.h"
-
-#include <OgreCamera.h>
 
 #include "core/CoreIncludes.h"
Index: code/trunk/src/orxonox/objects/worldentities/CameraPosition.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/CameraPosition.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/CameraPosition.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "objects/worldentities/StaticEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3196)
@@ -30,4 +30,5 @@
 
 #include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
 
 #include "core/CoreIncludes.h"
@@ -35,5 +36,4 @@
 #include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/Template.h"
 
 #include "objects/Scene.h"
Index: code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 3196)
@@ -31,4 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <list>
+#include <string>
+#include "util/Math.h"
 #include "MobileEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3196)
@@ -29,12 +29,10 @@
 #include "ExplosionChunk.h"
 
-#include <OgreParticleSystem.h>
-
-#include "core/GameMode.h"
 #include "core/CoreIncludes.h"
 #include "core/Executor.h"
+#include "core/GameMode.h"
+#include "util/Exception.h"
 #include "objects/Scene.h"
 #include "tools/ParticleInterface.h"
-#include "util/Exception.h"
 
 namespace orxonox
@@ -153,10 +151,10 @@
             Vector3 change(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
             change.normalise();
-            change *= rnd(0.4, 0.8);
+            change *= rnd(0.4f, 0.8f);
             Vector3 velocity = this->getVelocity();
             velocity.normalise();
             velocity += change;
             velocity.normalise();
-            velocity *= length * rnd(0.8, 1.0);
+            velocity *= length * rnd(0.8f, 1.0f);
 
             this->setVelocity(velocity);
Index: code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "MovableEntity.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3196)
@@ -30,5 +30,4 @@
 
 #include "core/CoreIncludes.h"
-#include "core/Executor.h"
 #include "core/XMLPort.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/FadingBillboard.h	(revision 3196)
@@ -31,7 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "Billboard.h"
-#include "objects/Tickable.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/ForceField.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ForceField.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ForceField.cc	(revision 3196)
@@ -28,7 +28,7 @@
 
 #include "ForceField.h"
-#include "core/XMLPort.h"
 
 #include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
 #include "objects/worldentities/MobileEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/ForceField.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ForceField.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ForceField.h	(revision 3196)
@@ -31,6 +31,8 @@
 #define _ForceField_H__
 
+#include "OrxonoxPrereqs.h"
+
+#include "interfaces/Tickable.h"
 #include "StaticEntity.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Light.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 3196)
@@ -29,13 +29,12 @@
 #include "Light.h"
 
-#include <sstream>
-#include <cassert>
-
 #include <OgreSceneManager.h>
+#include <OgreLight.h>
+#include <boost/static_assert.hpp>
 
 #include "util/String.h"
 #include "util/Exception.h"
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
@@ -44,4 +43,9 @@
 {
     CreateFactory(Light);
+
+    // Be sure we don't do bad conversions
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::LT_POINT);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::LT_DIRECTIONAL);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::LT_SPOTLIGHT);
 
     Light::Light(BaseObject* creator) : StaticEntity(creator)
@@ -52,5 +56,5 @@
         this->diffuse_ = ColourValue::White;
         this->specular_ = ColourValue::White;
-        this->type_ = Ogre::Light::LT_POINT;
+        this->type_ = Light::LT_POINT;
         this->attenuation_ = Vector4(100000, 1, 0, 0);
         this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
@@ -136,11 +140,11 @@
     {
         if (type == "point")
-            this->setType(Ogre::Light::LT_POINT);
+            this->setType(Light::LT_POINT);
         else if (type == "directional")
-            this->setType(Ogre::Light::LT_DIRECTIONAL);
+            this->setType(Light::LT_DIRECTIONAL);
         else if (type == "spotlight")
-            this->setType(Ogre::Light::LT_SPOTLIGHT);
+            this->setType(Light::LT_SPOTLIGHT);
         else
-            this->setType(Ogre::Light::LT_POINT);
+            this->setType(Light::LT_POINT);
     }
 
@@ -149,9 +153,9 @@
         switch (this->type_)
         {
-            case Ogre::Light::LT_DIRECTIONAL:
+            case Light::LT_DIRECTIONAL:
                 return "directional";
-            case Ogre::Light::LT_SPOTLIGHT:
+            case Light::LT_SPOTLIGHT:
                 return "spotlight";
-            case Ogre::Light::LT_POINT:
+            case Light::LT_POINT:
             default:
                 return "point";
@@ -163,5 +167,5 @@
         if (this->light_)
         {
-            this->light_->setType(this->type_);
+            this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
 
             if (this->type_ != Ogre::Light::LT_DIRECTIONAL)
Index: code/trunk/src/orxonox/objects/worldentities/Light.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Light.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Light.h	(revision 3196)
@@ -31,16 +31,25 @@
 
 #include "OrxonoxPrereqs.h"
-#include "StaticEntity.h"
 
 #include <string>
-#include <OgreLight.h>
-
 #include "util/Math.h"
-#include "objects/Teamcolourable.h"
+#include "interfaces/TeamColourable.h"
+#include "StaticEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Light : public StaticEntity, public Teamcolourable
+    class _OrxonoxExport Light : public StaticEntity, public TeamColourable
     {
+        public:
+            enum LightTypes // Copy from the Ogre enum
+            {
+                /// Point light sources give off light equally in all directions, so require only position not direction
+                LT_POINT,
+                /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
+                LT_DIRECTIONAL,
+                /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
+                LT_SPOTLIGHT
+            };
+
         public:
             Light(BaseObject* creator);
@@ -55,7 +64,7 @@
                 { return this->light_; }
 
-            inline void setType(Ogre::Light::LightTypes type)
+            inline void setType(Light::LightTypes type)
                 { this->type_ = type; this->updateType(); }
-            inline Ogre::Light::LightTypes getType() const
+            inline Light::LightTypes getType() const
                 { return this->type_; }
 
@@ -133,5 +142,5 @@
 
             Ogre::Light* light_;
-            Ogre::Light::LightTypes type_;
+            LightTypes type_;
             ColourValue diffuse_;
             ColourValue specular_;
Index: code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 3196)
@@ -30,12 +30,8 @@
 
 #include <OgreSceneNode.h>
-#include "BulletDynamics/Dynamics/btRigidBody.h"
-
-#include "util/Debug.h"
-#include "util/MathConvert.h"
-#include "util/Exception.h"
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/Scene.h"
 
@@ -96,5 +92,5 @@
                 this->angularVelocity_.z += angularAcceleration_.z * dt;
                 // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method.
-                float mult = dt * 0.5;
+                float mult = dt * 0.5f;
                 // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions!
                 Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult);
Index: code/trunk/src/orxonox/objects/worldentities/MobileEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MobileEntity.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/MobileEntity.h	(revision 3196)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
 #include "WorldEntity.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 3196)
@@ -27,9 +27,10 @@
  */
 
+#include "Model.h"
 
 #include <OgreEntity.h>
-#include "Model.h"
+
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
Index: code/trunk/src/orxonox/objects/worldentities/Model.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Model.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Model.h	(revision 3196)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "tools/Mesh.h"
 #include "StaticEntity.h"
-#include "tools/Mesh.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3196)
@@ -31,7 +31,7 @@
 
 #include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "core/Executor.h"
 #include "core/GameMode.h"
+#include "core/XMLPort.h"
 #include "objects/worldentities/pawns/Pawn.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/MovableEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MovableEntity.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/MovableEntity.h	(revision 3196)
@@ -33,7 +33,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include "MobileEntity.h"
+#include "util/Math.h"
 #include "network/ClientConnectionListener.h"
 #include "tools/Timer.h"
+#include "MobileEntity.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3196)
@@ -34,11 +34,9 @@
 #include "ParticleEmitter.h"
 
-#include <OgreParticleSystem.h>
-
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/XMLPort.h"
 #include "tools/ParticleInterface.h"
-#include "util/Exception.h"
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
 #include "objects/Scene.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3196)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
 #include "StaticEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc	(revision 3196)
@@ -75,5 +75,5 @@
         SUPER(ParticleSpawner, processEvent, event);
 
-        SetEvent(ParticleSpawner, "spawn", spawn, event);
+        ORXONOX_SET_EVENT(ParticleSpawner, "spawn", spawn, event);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
 #include "ParticleEmitter.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/Planet.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Planet.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Planet.cc	(revision 3196)
@@ -29,17 +29,14 @@
 #include "Planet.h"
 
-#include <math.h>
-
 #include <OgreEntity.h>
 #include <OgreBillboardSet.h>
-#include <OgreHardwareVertexBuffer.h>
-#include <OgreMeshManager.h>
+#include <OgreProgressiveMesh.h>
 
 #include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
 #include "objects/Scene.h"
+#include "Camera.h"
 #include "CameraManager.h"
-#include "Camera.h"
-#include "GraphicsManager.h"
 
 namespace orxonox
@@ -70,16 +67,19 @@
             return;
 
-        Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
-        if(activeCamera)
+        if (GameMode::showsGraphics())
         {
-            float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
-            //             COUT(2) << distance << std::endl;
-            float planetRadius = this->getScale();
+            Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
+            if(activeCamera)
+            {
+                float distance = this->getPosition().distance( activeCamera->getWorldPosition() );
+                //             COUT(2) << distance << std::endl;
+                float planetRadius = this->getScale();
 
-            float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
-            float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
-            newScale = tempTest;
+                float newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
+                float tempTest = newScale*(1+float(this->atmosphereSize)/float(this->imageSize));
+                newScale = tempTest;
 
-            this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
+                this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
+            }
         }
 
@@ -91,16 +91,16 @@
         float scaleFactor = this->getScale();
 
-        this->distList.push_back(10.0*scaleFactor);
-        this->distList.push_back(19.0*scaleFactor);
-        this->distList.push_back(27.0*scaleFactor);
-        this->distList.push_back(34.0*scaleFactor);
-        this->distList.push_back(40.0*scaleFactor);
-        this->distList.push_back(45.0*scaleFactor);
-        this->distList.push_back(49.0*scaleFactor);
-        this->distList.push_back(52.0*scaleFactor);
-        this->distList.push_back(54.0*scaleFactor);
-        this->distList.push_back(55.0*scaleFactor);
+        this->distList.push_back(10.0f*scaleFactor);
+        this->distList.push_back(19.0f*scaleFactor);
+        this->distList.push_back(27.0f*scaleFactor);
+        this->distList.push_back(34.0f*scaleFactor);
+        this->distList.push_back(40.0f*scaleFactor);
+        this->distList.push_back(45.0f*scaleFactor);
+        this->distList.push_back(49.0f*scaleFactor);
+        this->distList.push_back(52.0f*scaleFactor);
+        this->distList.push_back(54.0f*scaleFactor);
+        this->distList.push_back(55.0f*scaleFactor);
 
-        float reductionValue = 0.2;
+        float reductionValue = 0.2f;
 
         this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
@@ -145,9 +145,12 @@
         SUPER(Planet, XMLPort, xmlelement, mode);
 
-        XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
-        XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
-        XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
-        XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
-        XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
+        if (GameMode::showsGraphics())
+        {
+            XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
+            XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
+            XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
+            XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
+            XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
+        }
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Planet.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Planet.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/Planet.h	(revision 3196)
@@ -32,10 +32,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgreMesh.h>
-
+#include <string>
 #include "tools/BillboardSet.h"
 #include "tools/Mesh.h"
 #include "MovableEntity.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -108,5 +106,5 @@
             float atmosphereSize;
             float imageSize;
-            Ogre::Mesh::LodDistanceList distList;
+            std::vector<float> distList;
             BillboardSet billboard_;
             bool bCastShadows_;
Index: code/trunk/src/orxonox/objects/worldentities/PongBall.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PongBall.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/PongBall.cc	(revision 3196)
@@ -32,4 +32,5 @@
 #include "core/GameMode.h"
 #include "objects/gametypes/Gametype.h"
+#include "objects/worldentities/PongBat.h"
 #include "sound/SoundBase.h"
 
@@ -49,5 +50,5 @@
         this->batID_[0] = OBJECTID_UNKNOWN;
         this->batID_[1] = OBJECTID_UNKNOWN;
-        this->relMercyOffset_ = 0.05;
+        this->relMercyOffset_ = 0.05f;
 
         this->registerVariables();
@@ -102,5 +103,5 @@
                     if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
                     {
-                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
+                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
                         if (fabs(distance) <= 1)
                         {
@@ -122,5 +123,5 @@
                     if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
                     {
-                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
+                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
                         if (fabs(distance) <= 1)
                         {
@@ -172,5 +173,5 @@
               if (position.x > this->fieldWidth_ / 2 && this->bat_[1])
               {
-                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
+                distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
                 if (fabs(distance) <= 1)
                 {
@@ -183,5 +184,5 @@
               if (position.x < -this->fieldWidth_ / 2 && this->bat_[0])
               {
-                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10) / 2);
+                distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * (this->batlength_ * 1.10f) / 2);
                 if (fabs(distance) <= 1)
                 {
@@ -217,3 +218,20 @@
         }
     }
+
+    void PongBall::setBats(PongBat** bats)
+    {
+        this->bat_ = bats;
+        this->batID_[0] = this->bat_[0]->getObjectID();
+        this->batID_[1] = this->bat_[1]->getObjectID();
+    }
+
+    void PongBall::applyBats()
+    {
+        if (!this->bat_)
+            this->bat_ = new PongBat*[2];
+        if (this->batID_[0] != OBJECTID_UNKNOWN)
+            this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0]));
+        if (this->batID_[1] != OBJECTID_UNKNOWN)
+            this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1]));
+    }
 }
Index: code/trunk/src/orxonox/objects/worldentities/PongBall.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PongBall.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/PongBall.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "objects/worldentities/MovableEntity.h"
-#include "objects/worldentities/PongBat.h"
 
 namespace orxonox
@@ -63,9 +63,6 @@
                 { return this->batlength_; }
 
-            void setBats(PongBat** bats)
-            { this->bat_ = bats; this->batID_[0] = this->bat_[0]->getObjectID(); this->batID_[1] = this->bat_[1]->getObjectID(); }
-
-            void applyBats()
-            { if(!this->bat_) this->bat_ = new PongBat*[2]; if(this->batID_[0] != OBJECTID_UNKNOWN) this->bat_[0] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); if(this->batID_[1] != OBJECTID_UNKNOWN) this->bat_[1] = dynamic_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); }
+            void setBats(PongBat** bats);
+            void applyBats();
 
             static const float MAX_REL_Z_VELOCITY;
Index: code/trunk/src/orxonox/objects/worldentities/PongBat.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PongBat.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/PongBat.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "objects/worldentities/ControllableEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/PongCenterpoint.h	(revision 3196)
@@ -32,4 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
+#include <util/Math.h>
 #include "objects/worldentities/StaticEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 3196)
@@ -30,6 +30,8 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Template.h"
 #include "core/XMLPort.h"
 #include "objects/gametypes/Gametype.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
@@ -71,4 +73,10 @@
     }
 
+    void SpawnPoint::setTemplate(Template* temp)
+    {
+        this->template_ = temp;
+        this->templatename_ = temp->getName();
+    }
+
     Pawn* SpawnPoint::spawn()
     {
Index: code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 3196)
@@ -32,7 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "core/Identifier.h"
-#include "core/Template.h"
-#include "objects/worldentities/pawns/Pawn.h"
 #include "objects/worldentities/StaticEntity.h"
 
@@ -52,6 +51,5 @@
                 { return this->spawnclass_; }
 
-            inline void setTemplate(Template* temp)
-                { this->template_ = temp; this->templatename_ = temp->getName(); }
+            void setTemplate(Template* temp);
             inline Template* getTemplate() const
                 { return this->template_; }
Index: code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3196)
@@ -31,7 +31,6 @@
 
 #include <OgreSceneNode.h>
-#include "BulletDynamics/Dynamics/btRigidBody.h"
-
-#include "util/Exception.h"
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include "util/OrxAssert.h"
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "objects/worldentities/pawns/Pawn.h"
 #include "SpawnPoint.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3196)
@@ -30,14 +30,18 @@
 #include "WorldEntity.h"
 
-#include <cassert>
+#include <OgreBillboardSet.h>
+#include <OgreCamera.h>
+#include <OgreEntity.h>
+#include <OgreParticleSystem.h>
+#include <OgreSceneManager.h>
 #include <OgreSceneNode.h>
-#include <OgreSceneManager.h>
-#include "BulletDynamics/Dynamics/btRigidBody.h"
-
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+#include <boost/static_assert.hpp>
+
+#include "util/OrxAssert.h"
+#include "util/Convert.h"
 #include "util/Exception.h"
-#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/Scene.h"
 #include "objects/collisionshapes/WorldEntityCollisionShape.h"
@@ -51,4 +55,9 @@
     const Vector3 WorldEntity::DOWN  = Vector3::NEGATIVE_UNIT_Y;
     const Vector3 WorldEntity::UP    = Vector3::UNIT_Y;
+
+    // Be sure we don't do bad conversions
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_LOCAL  == (int)WorldEntity::Local);
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_PARENT == (int)WorldEntity::Parent);
+    BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD  == (int)WorldEntity::World);
 
     /**
@@ -463,13 +472,25 @@
     //! Attaches an Ogre::MovableObject to this WorldEntity.
     void WorldEntity::attachOgreObject(Ogre::MovableObject* object)
-    {
-        this->node_->attachObject(object);
-    }
+        { this->node_->attachObject(object); }
+    void WorldEntity::attachOgreObject(Ogre::BillboardSet* object)
+        { this->node_->attachObject(object); }
+    void WorldEntity::attachOgreObject(Ogre::Camera* object)
+        { this->node_->attachObject(object); }
+    void WorldEntity::attachOgreObject(Ogre::Entity* object)
+        { this->node_->attachObject(object); }
+    void WorldEntity::attachOgreObject(Ogre::ParticleSystem* object)
+        { this->node_->attachObject(object); }
 
     //! Detaches an Ogre::MovableObject from this WorldEntity.
     void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
-    {
-        this->node_->detachObject(object);
-    }
+        { this->node_->detachObject(object); }
+    void WorldEntity::detachOgreObject(Ogre::BillboardSet* object)
+        { this->node_->detachObject(object); }
+    void WorldEntity::detachOgreObject(Ogre::Camera* object)
+        { this->node_->detachObject(object); }
+    void WorldEntity::detachOgreObject(Ogre::Entity* object)
+        { this->node_->detachObject(object); }
+    void WorldEntity::detachOgreObject(Ogre::ParticleSystem* object)
+        { this->node_->detachObject(object); }
 
     //! Detaches an Ogre::MovableObject (by string) from this WorldEntity.
@@ -501,5 +522,5 @@
 
     // Note: These functions are placed in WorldEntity.h as inline functions for the release build.
-#ifndef NDEBUG
+#ifndef ORXONOX_RELEASE
     const Vector3& WorldEntity::getPosition() const
     {
@@ -574,18 +595,18 @@
         Translates this WorldEntity by a vector.
     @param relativeTo
-        @see TransformSpace::Enum
-    */
-    void WorldEntity::translate(const Vector3& distance, TransformSpace::Enum relativeTo)
+        @see WorldEntity::TransformSpace
+    */
+    void WorldEntity::translate(const Vector3& distance, TransformSpace relativeTo)
     {
         switch (relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             // position is relative to parent so transform downwards
             this->setPosition(this->getPosition() + this->getOrientation() * distance);
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             this->setPosition(this->getPosition() + distance);
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             // position is relative to parent so transform upwards
             if (this->node_->getParent())
@@ -602,18 +623,18 @@
         Rotates this WorldEntity by a quaternion.
     @param relativeTo
-        @see TransformSpace::Enum
-    */
-    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo)
+        @see WorldEntity::TransformSpace
+    */
+    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace relativeTo)
     {
         switch(relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             this->setOrientation(this->getOrientation() * rotation);
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             // Rotations are normally relative to local axes, transform up
             this->setOrientation(rotation * this->getOrientation());
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             // Rotations are normally relative to local axes, transform up
             this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse()
@@ -627,20 +648,20 @@
         Makes this WorldEntity look a specific target location.
     @param relativeTo
-        @see TransformSpace::Enum
+        @see WorldEntity::TransformSpace
     @param localDirectionVector
         The vector which normally describes the natural direction of the object, usually -Z.
     */
-    void WorldEntity::lookAt(const Vector3& target, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
-    {
-        Vector3 origin;
+    void WorldEntity::lookAt(const Vector3& target, TransformSpace relativeTo, const Vector3& localDirectionVector)
+    {
+        Vector3 origin(0, 0, 0);
         switch (relativeTo)
         {
-        case TransformSpace::Local:
+        case WorldEntity::Local:
             origin = Vector3::ZERO;
             break;
-        case TransformSpace::Parent:
+        case WorldEntity::Parent:
             origin = this->getPosition();
             break;
-        case TransformSpace::World:
+        case WorldEntity::World:
             origin = this->getWorldPosition();
             break;
@@ -653,23 +674,12 @@
         Makes this WorldEntity look in specific direction.
     @param relativeTo
-        @see TransformSpace::Enum
+        @see WorldEntity::TransformSpace
     @param localDirectionVector
         The vector which normally describes the natural direction of the object, usually -Z.
     */
-    void WorldEntity::setDirection(const Vector3& direction, TransformSpace::Enum relativeTo, const Vector3& localDirectionVector)
+    void WorldEntity::setDirection(const Vector3& direction, TransformSpace relativeTo, const Vector3& localDirectionVector)
     {
         Quaternion savedOrientation(this->getOrientation());
-        Ogre::Node::TransformSpace ogreRelativeTo;
-        switch (relativeTo)
-        {
-        case TransformSpace::Local:
-            ogreRelativeTo = Ogre::Node::TS_LOCAL; break;
-        case TransformSpace::Parent:
-            ogreRelativeTo = Ogre::Node::TS_PARENT; break;
-        case TransformSpace::World:
-            ogreRelativeTo = Ogre::Node::TS_WORLD; break;
-        default: OrxAssert(false, "Faulty TransformSpace::Enum assigned.");
-        }
-        this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector);
+        this->node_->setDirection(direction, static_cast<Ogre::Node::TransformSpace>(relativeTo), localDirectionVector);
         Quaternion newOrientation(this->node_->getOrientation());
         this->node_->setOrientation(savedOrientation);
@@ -772,8 +782,8 @@
             break;
         case Kinematic:
-            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT);
+            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT) | btCollisionObject::CF_KINEMATIC_OBJECT);
             break;
         case Static:
-            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_STATIC_OBJECT);
+            this->physicalBody_->setCollisionFlags((this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT) | btCollisionObject::CF_STATIC_OBJECT);
             break;
         case None:
Index: code/trunk/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/WorldEntity.h	(revision 3196)
@@ -33,12 +33,11 @@
 #include "OrxonoxPrereqs.h"
 
-#ifdef NDEBUG
-#include <OgreSceneNode.h>
-#else
-#include <OgrePrerequisites.h>
+#ifdef ORXONOX_RELEASE
+#  include <OgreSceneNode.h>
 #endif
-#include "LinearMath/btMotionState.h"
+#include <LinearMath/btMotionState.h>
 
 #include "util/Math.h"
+#include "util/OgreForwardRefs.h"
 #include "core/BaseObject.h"
 #include "network/synchronisable/Synchronisable.h"
@@ -75,4 +74,20 @@
 
         public:
+            // Define our own transform space enum to avoid Ogre includes here
+            /**
+            @brief
+                Enumeration denoting the spaces which a transform can be relative to.
+            */
+            enum TransformSpace
+            {
+                //! 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
+            };
+
+        public:
             WorldEntity(BaseObject* creator);
             virtual ~WorldEntity();
@@ -97,6 +112,6 @@
             const Vector3& getWorldPosition() const;
 
-            void translate(const Vector3& distance, TransformSpace::Enum relativeTo = TransformSpace::Parent);
-            inline void translate(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Parent)
+            void translate(const Vector3& distance, TransformSpace relativeTo = WorldEntity::Parent);
+            inline void translate(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Parent)
                 { this->translate(Vector3(x, y, z), relativeTo); }
 
@@ -114,18 +129,18 @@
             const Quaternion& getWorldOrientation() const;
 
-            void rotate(const Quaternion& rotation, TransformSpace::Enum relativeTo = TransformSpace::Local);
-            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            void rotate(const Quaternion& rotation, TransformSpace relativeTo = WorldEntity::Local);
+            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, axis), relativeTo); }
 
-            inline void yaw(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void yaw(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); }
-            inline void pitch(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void pitch(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); }
-            inline void roll(const Degree& angle, TransformSpace::Enum relativeTo = TransformSpace::Local)
+            inline void roll(const Degree& angle, TransformSpace relativeTo = WorldEntity::Local)
                 { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); }
 
-            void lookAt(const Vector3& target, TransformSpace::Enum relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            void setDirection(const Vector3& direction, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            inline void setDirection(float x, float y, float z, TransformSpace::Enum relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
+            void lookAt(const Vector3& target, TransformSpace relativeTo = WorldEntity::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            void setDirection(const Vector3& direction, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            inline void setDirection(float x, float y, float z, TransformSpace relativeTo = WorldEntity::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
                 { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); }
 
@@ -157,6 +172,16 @@
                 { return this->children_; }
 
-            void attachOgreObject(Ogre::MovableObject* object);
-            void detachOgreObject(Ogre::MovableObject* object);
+            void attachOgreObject(Ogre::MovableObject*  object);
+            void attachOgreObject(Ogre::BillboardSet*   object);
+            void attachOgreObject(Ogre::Camera*         object);
+            void attachOgreObject(Ogre::Entity*         object);
+            void attachOgreObject(Ogre::ParticleSystem* object);
+
+            void detachOgreObject(Ogre::MovableObject*  object);
+            void detachOgreObject(Ogre::BillboardSet*   object);
+            void detachOgreObject(Ogre::Camera*         object);
+            void detachOgreObject(Ogre::Entity*         object);
+            void detachOgreObject(Ogre::ParticleSystem* object);
+
             Ogre::MovableObject* detachOgreObject(const Ogre::String& name);
 
@@ -427,5 +452,5 @@
 
     // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here.
-#ifdef NDEBUG
+#ifdef ORXONOX_RELEASE
     inline const Vector3& WorldEntity::getPosition() const
         { return this->node_->getPosition(); }
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3196)
@@ -29,8 +29,10 @@
 #include "Pawn.h"
 
+#include "core/CoreIncludes.h"
 #include "core/GameMode.h"
-#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Math.h"
+#include "network/NetworkFunction.h"
+
+#include "interfaces/PawnListener.h"
 #include "PawnManager.h"
 #include "objects/infos/PlayerInfo.h"
@@ -39,5 +41,4 @@
 #include "objects/worldentities/ExplosionChunk.h"
 #include "objects/worldentities/BigExplosion.h"
-
 #include "objects/weaponsystem/WeaponSystem.h"
 #include "objects/weaponsystem/WeaponSlot.h"
@@ -45,5 +46,4 @@
 #include "objects/weaponsystem/WeaponSet.h"
 
-#include "network/NetworkFunction.h"
 
 namespace orxonox
@@ -373,12 +373,3 @@
         this->isHumanShip_ = true;
     }
-
-
-    ///////////////////
-    // Pawn Listener //
-    ///////////////////
-    PawnListener::PawnListener()
-    {
-        RegisterRootObject(PawnListener);
-    }
 }
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 3196)
@@ -31,6 +31,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <string>
+#include "interfaces/RadarViewable.h"
 #include "objects/worldentities/ControllableEntity.h"
-#include "objects/RadarViewable.h"
 #include "objects/pickup/PickupCollection.h"
 
@@ -147,13 +149,4 @@
                 { this->weaponSystem_ = weaponsystem; }
     };
-
-    class _OrxonoxExport PawnListener : virtual public OrxonoxClass
-    {
-        public:
-            PawnListener();
-            virtual ~PawnListener() {}
-
-            virtual void destroyedPawn(Pawn* pawn) = 0;
-    };
 }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3196)
@@ -29,8 +29,6 @@
 #include "SpaceShip.h"
 
-#include "BulletDynamics/Dynamics/btRigidBody.h"
-
-#include "util/Math.h"
-#include "util/Exception.h"
+#include <BulletDynamics/Dynamics/btRigidBody.h>
+
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 3196)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
-#include "LinearMath/btVector3.h"
-
+#include <string>
+#include <LinearMath/btVector3.h>
+#include "util/Math.h"
 #include "Pawn.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3196)
@@ -29,17 +29,11 @@
 #include "Spectator.h"
 
-#include <OgreBillboardSet.h>
-
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/GameMode.h"
-#include "objects/worldentities/Model.h"
+
+#include "tools/BillboardSet.h"
 #include "objects/Scene.h"
 #include "objects/infos/PlayerInfo.h"
-#include "objects/gametypes/Gametype.h"
-#include "tools/BillboardSet.h"
-#include "overlays/OverlayText.h"
-#include "overlays/OverlayGroup.h"
-#include "util/Convert.h"
 
 namespace orxonox
@@ -65,5 +59,5 @@
         {
             this->greetingFlare_ = new BillboardSet();
-            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
+            this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0f, 1.0f, 0.8f), Vector3(0, 20, 0), 1);
             if (this->greetingFlare_->getBillboardSet())
                 this->attachOgreObject(this->greetingFlare_->getBillboardSet());
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 3196)
@@ -32,4 +32,5 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
 #include "objects/worldentities/ControllableEntity.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3196)
@@ -29,7 +29,9 @@
 
 #include "TeamBaseMatchBase.h"
+
 #include "core/CoreIncludes.h"
+#include "interfaces/PawnListener.h"
+#include "interfaces/TeamColourable.h"
 #include "objects/gametypes/TeamBaseMatch.h"
-#include "objects/Teamcolourable.h"
 
 namespace orxonox
@@ -80,7 +82,7 @@
         for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it)
         {
-            if ((*it)->isA(Class(Teamcolourable)))
+            if ((*it)->isA(Class(TeamColourable)))
             {
-                Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
+                TeamColourable* tc = dynamic_cast<TeamColourable*>(*it);
                 tc->setTeamColour(colour);
             }
Index: code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3196)
@@ -30,10 +30,10 @@
 #define _TeamBaseMatchBase_H__
 
+#include "OrxonoxPrereqs.h"
+
 #include "Pawn.h"
 
 namespace orxonox
 {
-
-
     namespace BaseState
     {
Index: code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc	(revision 3196)
@@ -31,7 +31,6 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "objects/gametypes/Asteroids.h"
-#include "orxonox/objects/worldentities/pawns/Pawn.h"
+#include "objects/worldentities/pawns/Pawn.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.h	(revision 3196)
@@ -35,6 +35,8 @@
 #define _CheckPoint_H__
 
+#include "OrxonoxPrereqs.h"
+
+#include "interfaces/RadarViewable.h"
 #include "DistanceTrigger.h"
-#include "objects/RadarViewable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3196)
@@ -29,9 +29,6 @@
 #include "DistanceTrigger.h"
 
-#include <OgreNode.h>
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "orxonox/objects/worldentities/pawns/Pawn.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3196)
@@ -30,12 +30,9 @@
 #define _DistanceTrigger_H__
 
-#include "PlayerTrigger.h"
+#include "OrxonoxPrereqs.h"
 
 #include <set>
-
 #include "core/ClassTreeMask.h"
-#include "core/BaseObject.h"
-
-#include "orxonox/objects/worldentities/ControllableEntity.h"
+#include "PlayerTrigger.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc	(revision 3196)
@@ -51,5 +51,5 @@
         SUPER(EventTrigger, processEvent, event);
 
-        SetEvent(EventTrigger, "trigger", trigger, event);
+        ORXONOX_SET_EVENT(EventTrigger, "trigger", trigger, event);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3196)
@@ -30,8 +30,6 @@
 #define _EventTrigger_H__
 
+#include "OrxonoxPrereqs.h"
 #include "Trigger.h"
-
-#include "core/ClassTreeMask.h"
-#include "core/BaseObject.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 3196)
@@ -34,5 +34,4 @@
 
 #include "PlayerTrigger.h"
-
 #include "core/CoreIncludes.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3196)
@@ -37,5 +37,4 @@
 
 #include "OrxonoxPrereqs.h"
-
 #include "Trigger.h"
 
Index: code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3196)
@@ -29,11 +29,8 @@
 #include "Trigger.h"
 
-#include <OgreBillboard.h>
-#include <OgreBillboardSet.h>
-#include "util/Debug.h"
 #include "core/CoreIncludes.h"
 #include "core/ConsoleCommand.h"
+#include "core/GameMode.h"
 #include "core/XMLPort.h"
-#include "core/GameMode.h"
 #include "objects/Scene.h"
 
@@ -237,5 +234,5 @@
   {
     if (( (this->latestState_ & 2) && this->bStayActive_ && (this->remainingActivations_ <= 0))
-     || (!(this->latestState_ & 2))                      && (this->remainingActivations_ == 0))
+     || (!(this->latestState_ & 2)                       && (this->remainingActivations_ == 0)))
       return false;
     else
Index: code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3110)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3196)
@@ -30,12 +30,12 @@
 #define _Trigger_H__
 
+#include "OrxonoxPrereqs.h"
+
 #include <set>
 #include <queue>
 
-#include "OrxonoxPrereqs.h"
-
-#include "objects/Tickable.h"
+#include "tools/BillboardSet.h"
+#include "interfaces/Tickable.h"
 #include "objects/worldentities/StaticEntity.h"
-#include "tools/BillboardSet.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/orxonox.vcproj.user
===================================================================
--- code/trunk/src/orxonox/orxonox.vcproj.user	(revision 3110)
+++ 	(revision )
@@ -1,45 +1,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="${VISUAL_STUDIO_VERSION_SIMPLE}.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|${MSVC_PLATFORM}"
-			>
-			<DebugSettings
-				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
-				EnvironmentMerge="true"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|${MSVC_PLATFORM}"
-			>
-			<DebugSettings
-				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
-				EnvironmentMerge="true"
-			/>
-		</Configuration>
-		<Configuration
-			Name="MinSizeRel|${MSVC_PLATFORM}"
-			>
-			<DebugSettings
-				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
-				EnvironmentMerge="true"
-			/>
-		</Configuration>
-		<Configuration
-			Name="RelWithDebInfo|${MSVC_PLATFORM}"
-			>
-			<DebugSettings
-				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
-				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
-				EnvironmentMerge="true"
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
Index: code/trunk/src/orxonox/orxonox.vcproj.user.in
===================================================================
--- code/trunk/src/orxonox/orxonox.vcproj.user.in	(revision 3196)
+++ code/trunk/src/orxonox/orxonox.vcproj.user.in	(revision 3196)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="${VISUAL_STUDIO_VERSION_SIMPLE}.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|${MSVC_PLATFORM}"
+			>
+			<DebugSettings
+				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
+				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				EnvironmentMerge="true"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|${MSVC_PLATFORM}"
+			>
+			<DebugSettings
+				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
+				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				EnvironmentMerge="true"
+			/>
+		</Configuration>
+		<Configuration
+			Name="MinSizeRel|${MSVC_PLATFORM}"
+			>
+			<DebugSettings
+				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
+				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				EnvironmentMerge="true"
+			/>
+		</Configuration>
+		<Configuration
+			Name="RelWithDebInfo|${MSVC_PLATFORM}"
+			>
+			<DebugSettings
+				WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)"
+				Environment="Path=${ORXONOX_RUNTIME_LIBRARY_DIRECTORY}"
+				EnvironmentMerge="true"
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>
Index: code/trunk/src/orxonox/overlays/FadeoutText.cc
===================================================================
--- code/trunk/src/orxonox/overlays/FadeoutText.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/FadeoutText.cc	(revision 3196)
@@ -30,5 +30,5 @@
 
 #include <OgreTextAreaOverlayElement.h>
-
+#include "util/Math.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
Index: code/trunk/src/orxonox/overlays/FadeoutText.h
===================================================================
--- code/trunk/src/orxonox/overlays/FadeoutText.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/FadeoutText.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "tools/Timer.h"
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/GUIOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/GUIOverlay.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/GUIOverlay.cc	(revision 3196)
@@ -28,9 +28,12 @@
 
 #include "GUIOverlay.h"
+
 #include <string>
 #include <sstream>
+
 #include "core/input/InputManager.h"
-
-#include "../gui/GUIManager.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "gui/GUIManager.h"
 
 namespace orxonox
@@ -53,5 +56,5 @@
         XMLPortParam(GUIOverlay, "guiname", setGUIName, getGUIName, xmlElement, mode);
         
-        GUIManager::getInstancePtr()->registerOverlay(this->guiName_, this);
+        GUIManager::getInstance().registerOverlay(this->guiName_, this);
     }
 
@@ -66,12 +69,12 @@
             out << (long)this;
             str = out.str();
-            GUIManager::getInstancePtr()->executeCode("showCursor()");
+            GUIManager::getInstance().executeCode("showCursor()");
             InputManager::getInstance().requestEnterState("guiMouseOnly");
-            GUIManager::getInstancePtr()->executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
+            GUIManager::getInstance().executeCode("showGUI(\"" + this->guiName_ + "\", " + str + ")");
         }
         else
         {
-            GUIManager::getInstancePtr()->executeCode("hideGUI(\"" + this->guiName_ + "\")");
-            GUIManager::getInstancePtr()->executeCode("hideCursor()");
+            GUIManager::getInstance().executeCode("hideGUI(\"" + this->guiName_ + "\")");
+            GUIManager::getInstance().executeCode("hideCursor()");
             InputManager::getInstance().requestLeaveState("guiMouseOnly");
         }
Index: code/trunk/src/orxonox/overlays/GUIOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/GUIOverlay.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/GUIOverlay.h	(revision 3196)
@@ -30,11 +30,8 @@
 #define _GUIOverlay_H__
 
-
-#include "OrxonoxOverlay.h"
 #include "OrxonoxPrereqs.h"
 
-#include <OgrePrerequisites.h>
-
-#include "core/XMLPort.h"
+#include <string>
+#include "OrxonoxOverlay.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.cc	(revision 3196)
@@ -215,9 +215,9 @@
             if (angle < 0.0)
                 angle = -angle;
-            angle -= 180.0 * (int)(angle / 180.0);
+            angle -= 180.0f * (int)(angle / 180.0);
 
             // take the reverse if angle is about 90 degrees
             float tempAspect;
-            if (angle > 89.0 && angle < 91.0)
+            if (angle > 89.0f && angle < 91.0f)
             {
                 tempAspect = 1.0 / this->windowAspectRatio_;
@@ -231,5 +231,5 @@
             else
             {
-                tempAspect = 1.0;
+                tempAspect = 1.0f;
                 rotState_ = Inbetween;
             }
@@ -238,5 +238,5 @@
             // magnitude of the width is about the magnitude of the height.
             // Correctly we would have to take the square root of width*height
-            this->sizeCorrection_.x = 2.0 / (tempAspect + 1.0);
+            this->sizeCorrection_.x = 2.0f / (tempAspect + 1.0f);
             this->sizeCorrection_.y = tempAspect * this->sizeCorrection_.x;
         }
Index: code/trunk/src/orxonox/overlays/OrxonoxOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OrxonoxOverlay.h	(revision 3196)
@@ -37,8 +37,10 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgrePrerequisites.h>
-#include "tools/WindowEventListener.h"
+#include <string>
+
 #include "util/Math.h"
+#include "util/OgreForwardRefs.h"
 #include "core/BaseObject.h"
+#include "interfaces/WindowEventListener.h"
 
 namespace orxonox
@@ -134,8 +136,8 @@
 
         //! Gets the current size that was set (uncorrected)
-        const Vector2& getSize() const                   { return this->size_; }
+        const Vector2& getSize() const            { return this->size_; }
 
         //! Gets the actual size of the overlay on the screen (corrected)
-        Vector2 getActualSize() const      { return this->size_ * this->sizeCorrection_; }
+        Vector2 getActualSize() const             { return this->size_ * this->sizeCorrection_; }
 
         //! Gets the current size correction (default: 1.0, 1.0)
@@ -198,5 +200,5 @@
         Vector2 pickPoint_;                        //!< Point on the overlay to pick when translating
         Degree angle_;                             //!< Rotation angle of the overlay
-        RotationState rotState_;             //!< horizontal, vertical or inbetween
+        RotationState rotState_;                   //!< horizontal, vertical or inbetween
 
     private:
Index: code/trunk/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OverlayGroup.cc	(revision 3196)
@@ -34,8 +34,6 @@
 #include "OverlayGroup.h"
 
-#include "util/Debug.h"
 #include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
-#include "core/Iterator.h"
 #include "core/XMLPort.h"
 #include "OrxonoxOverlay.h"
Index: code/trunk/src/orxonox/overlays/OverlayGroup.h
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayGroup.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OverlayGroup.h	(revision 3196)
@@ -38,7 +38,7 @@
 
 #include <set>
-#include <OgrePrerequisites.h>
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
 #include "core/BaseObject.h"
-#include "util/Math.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/OverlayText.cc
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OverlayText.cc	(revision 3196)
@@ -31,4 +31,6 @@
 #include <OgreOverlayManager.h>
 #include <OgrePanelOverlayElement.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <boost/static_assert.hpp>
 
 #include "util/String.h"
@@ -36,7 +38,12 @@
 #include "core/XMLPort.h"
 
+
 namespace orxonox
 {
     CreateFactory(OverlayText);
+
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Left   == (int)OverlayText::Left);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Center == (int)OverlayText::Center);
+    BOOST_STATIC_ASSERT((int)Ogre::TextAreaOverlayElement::Right  == (int)OverlayText::Right);
 
     OverlayText::OverlayText(BaseObject* creator)
@@ -76,18 +83,12 @@
     }
 
-    void OverlayText::setFont(const std::string& font)
-    {
-        if (font != "")
-            this->text_->setFontName(font);
-    }
-
     void OverlayText::setAlignmentString(const std::string& alignment)
     {
         if (alignment == "right")
-            this->setAlignment(Ogre::TextAreaOverlayElement::Right);
+            this->setAlignment(OverlayText::Right);
         else if (alignment == "center")
-            this->setAlignment(Ogre::TextAreaOverlayElement::Center);
+            this->setAlignment(OverlayText::Center);
         else // "left" and default
-            this->setAlignment(Ogre::TextAreaOverlayElement::Left);
+            this->setAlignment(OverlayText::Left);
     }
 
@@ -120,3 +121,50 @@
         positionChanged();
     }
+
+    void OverlayText::setCaption(const std::string& caption)
+    {
+        this->text_->setCaption(caption);
+        this->changedCaption();
+    }
+    std::string OverlayText::getCaption() const
+    {
+        return this->text_->getCaption();
+    }
+
+    void OverlayText::setFont(const std::string& font)
+    {
+        if (font != "")
+            this->text_->setFontName(font);
+    }
+    const std::string& OverlayText::getFont() const
+    {
+        return this->text_->getFontName();
+    }
+
+    void OverlayText::setSpaceWidth(float width)
+    {
+        this->text_->setSpaceWidth(width);
+    }
+    float OverlayText::getSpaceWidth() const
+    {
+        return this->text_->getSpaceWidth();
+    }
+
+    void OverlayText::setColour(const ColourValue& colour)
+    {
+        this->text_->setColour(colour); this->changedColour();
+    }
+    const ColourValue& OverlayText::getColour() const
+    {
+        return this->text_->getColour();
+    }
+
+    void OverlayText::setAlignment(OverlayText::Alignment alignment)
+    {
+        this->text_->setAlignment(static_cast<Ogre::TextAreaOverlayElement::Alignment>(alignment));
+    }
+    OverlayText::Alignment OverlayText::getAlignment() const
+    {
+        return static_cast<OverlayText::Alignment>(this->text_->getAlignment());
+    }
 }
Index: code/trunk/src/orxonox/overlays/OverlayText.h
===================================================================
--- code/trunk/src/orxonox/overlays/OverlayText.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/OverlayText.h	(revision 3196)
@@ -33,6 +33,6 @@
 
 #include <string>
-#include <OgrePrerequisites.h>
-#include <OgreTextAreaOverlayElement.h>
+#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
 #include "OrxonoxOverlay.h"
 
@@ -42,4 +42,11 @@
     {
     public:
+        enum Alignment
+        {
+            Left,
+            Right,
+            Center
+        };
+
         OverlayText(BaseObject* creator);
         virtual ~OverlayText();
@@ -47,18 +54,18 @@
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
 
-        inline void setCaption(const std::string& caption) { this->text_->setCaption(caption); this->changedCaption(); }
-        inline std::string getCaption() const              { return this->text_->getCaption(); }
+        void setCaption(const std::string& caption);
+        std::string getCaption() const;
 
         void setFont(const std::string& font);
-        inline const std::string& getFont() const { return this->text_->getFontName(); }
+        const std::string& getFont() const;
 
-        inline void setSpaceWidth(float width) { this->text_->setSpaceWidth(width); }
-        inline float getSpaceWidth() const     { return this->text_->getSpaceWidth(); }
+        void setSpaceWidth(float width);
+        float getSpaceWidth() const;
 
-        inline void setColour(const ColourValue& colour) { this->text_->setColour(colour); this->changedColour(); }
-        inline const ColourValue& getColour() const      { return this->text_->getColour(); }
+        void setColour(const ColourValue& colour);
+        const ColourValue& getColour() const;
 
-        inline void setAlignment(Ogre::TextAreaOverlayElement::Alignment alignment) { this->text_->setAlignment(alignment); }
-        inline Ogre::TextAreaOverlayElement::Alignment getAlignment() const         { return this->text_->getAlignment(); }
+        void setAlignment(OverlayText::Alignment alignment);
+        OverlayText::Alignment getAlignment() const;
 
         void setAlignmentString(const std::string& alignment);
Index: code/trunk/src/orxonox/overlays/console/InGameConsole.cc
===================================================================
--- code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/console/InGameConsole.cc	(revision 3196)
@@ -35,4 +35,6 @@
 #include <OgreOverlayManager.h>
 #include <OgreOverlayContainer.h>
+#include <OgreBorderPanelOverlayElement.h>
+#include <OgreTextAreaOverlayElement.h>
 #include <OgreFontManager.h>
 #include <OgreFont.h>
@@ -40,5 +42,5 @@
 #include "util/Math.h"
 #include "util/Convert.h"
-#include "util/Debug.h"
+#include "util/UTFStringConversions.h"
 #include "core/Clock.h"
 #include "core/CoreIncludes.h"
@@ -466,5 +468,5 @@
                 {
                     ++linesUsed;
-                    this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output.substr(0, this->maxCharsPerLine_)));
+                    this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output.substr(0, this->maxCharsPerLine_)));
                     output.erase(0, this->maxCharsPerLine_);
                     output.insert(0, 1, ' ');
@@ -473,5 +475,5 @@
                     this->colourLine(level, index);
                 }
-                this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output));
+                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
                 this->displayedText_ = output;
                 this->numLinesShifted_ = linesUsed;
@@ -491,5 +493,5 @@
                   this->inputWindowStart_ = 0;
                 this->displayedText_ = output;
-                this->consoleOverlayTextAreas_[index]->setCaption(convert2UTF(output));
+                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
             }
         }
@@ -606,21 +608,3 @@
         InGameConsole::getInstance().deactivate();
     }
-
-    /**
-        @brief Converts a string into an Ogre::UTFString.
-        @param s The string to convert
-        @return The converted string
-    */
-    /*static*/ Ogre::UTFString InGameConsole::convert2UTF(const std::string& text)
-    {
-        Ogre::UTFString utf;
-        Ogre::UTFString::code_point cp;
-        for (unsigned int i = 0; i < text.size(); ++i)
-        {
-          cp = text[i];
-          cp &= 0xFF;
-          utf.append(1, cp);
-        }
-        return utf;
-    }
 }
Index: code/trunk/src/orxonox/overlays/console/InGameConsole.h
===================================================================
--- code/trunk/src/orxonox/overlays/console/InGameConsole.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/console/InGameConsole.h	(revision 3196)
@@ -32,16 +32,13 @@
 
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
 
+#include <string>
+#include "util/OgreForwardRefs.h"
 #include "core/Shell.h"
-#include "core/OrxonoxClass.h"
-#include "tools/WindowEventListener.h"
-
+#include "interfaces/WindowEventListener.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport InGameConsole : virtual public OrxonoxClass, public ShellListener, public WindowEventListener
+    class _OrxonoxExport InGameConsole : public ShellListener, public WindowEventListener
     {
     public: // functions
@@ -60,6 +57,4 @@
         static void openConsole();
         static void closeConsole();
-
-        static Ogre::UTFString convert2UTF(const std::string& text);
 
     private: // functions
Index: code/trunk/src/orxonox/overlays/debug/DebugFPSText.cc
===================================================================
--- code/trunk/src/orxonox/overlays/debug/DebugFPSText.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/debug/DebugFPSText.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 #include "DebugFPSText.h"
-#include <OgreTextAreaOverlayElement.h>
+
 #include "util/Convert.h"
 #include "core/CoreIncludes.h"
@@ -51,5 +51,5 @@
 
         float fps = Game::getInstance().getAvgFPS();
-        this->setCaption(convertToString(fps));
+        this->setCaption(multi_cast<std::string>(fps));
     }
 }
Index: code/trunk/src/orxonox/overlays/debug/DebugFPSText.h
===================================================================
--- code/trunk/src/orxonox/overlays/debug/DebugFPSText.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/debug/DebugFPSText.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -41,5 +41,5 @@
     public:
         DebugFPSText(BaseObject* creator);
-        ~DebugFPSText();
+        virtual ~DebugFPSText();
 
         virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/debug/DebugRTRText.cc
===================================================================
--- code/trunk/src/orxonox/overlays/debug/DebugRTRText.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/debug/DebugRTRText.cc	(revision 3196)
@@ -28,7 +28,7 @@
 
 #include "DebugRTRText.h"
-#include <OgreTextAreaOverlayElement.h>
+
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "util/Convert.h"
 #include "core/Game.h"
 
@@ -51,5 +51,5 @@
 
         float rtr = Game::getInstance().getAvgTickTime();
-        this->setCaption(convertToString(rtr));
+        this->setCaption(multi_cast<std::string>(rtr));
     }
 }
Index: code/trunk/src/orxonox/overlays/debug/DebugRTRText.h
===================================================================
--- code/trunk/src/orxonox/overlays/debug/DebugRTRText.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/debug/DebugRTRText.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -41,5 +41,5 @@
     public:
         DebugRTRText(BaseObject* creator);
-        ~DebugRTRText();
+        virtual ~DebugRTRText();
 
         virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/hud/AnnounceMessage.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/AnnounceMessage.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/AnnounceMessage.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/GametypeMessageListener.h"
 #include "overlays/FadeoutText.h"
-#include "objects/GametypeMessageListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/hud/ChatOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 3196)
@@ -29,18 +29,16 @@
 #include "ChatOverlay.h"
 
+#include <string>
 #include <OgreTextAreaOverlayElement.h>
 
+#include "util/Convert.h"
+#include "util/UTFStringConversions.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/Executor.h"
 
-#include "network/ClientInformation.h"
-
+#include "tools/Timer.h"
+#include "objects/infos/PlayerInfo.h"
 #include "PlayerManager.h"
-#include "objects/infos/PlayerInfo.h"
-#include "overlays/console/InGameConsole.h"
-#include "tools/Timer.h"
-
-#include "util/Convert.h"
 
 namespace orxonox
@@ -86,5 +84,5 @@
         }
 
-        this->messages_.push_back(InGameConsole::convert2UTF(text));
+        this->messages_.push_back(multi_cast<Ogre::UTFString>(text));
         COUT(0) << "Chat: " << text << std::endl;
 
Index: code/trunk/src/orxonox/overlays/hud/ChatOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/ChatOverlay.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/ChatOverlay.h	(revision 3196)
@@ -32,5 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgreTextAreaOverlayElement.h>
+#include <list>
+#include <OgreUTFString.h>
 
 #include "network/ChatListener.h"
@@ -43,5 +44,5 @@
         public:
             ChatOverlay(BaseObject* creator);
-            ~ChatOverlay();
+            virtual ~ChatOverlay();
 
             void setConfigValues();
Index: code/trunk/src/orxonox/overlays/hud/DeathMessage.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/DeathMessage.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/DeathMessage.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/GametypeMessageListener.h"
 #include "overlays/FadeoutText.h"
-#include "objects/GametypeMessageListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/GametypeStatus.cc	(revision 3196)
@@ -29,8 +29,6 @@
 #include "GametypeStatus.h"
 
-#include <OgreTextAreaOverlayElement.h>
-
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "util/Convert.h"
 #include "objects/infos/GametypeInfo.h"
 #include "objects/infos/PlayerInfo.h"
Index: code/trunk/src/orxonox/overlays/hud/GametypeStatus.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/GametypeStatus.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/GametypeStatus.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -41,5 +41,5 @@
         public:
             GametypeStatus(BaseObject* creator);
-            ~GametypeStatus();
+            virtual ~GametypeStatus();
 
             virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/hud/HUDBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDBar.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDBar.cc	(revision 3196)
@@ -34,4 +34,5 @@
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>
+#include <OgrePass.h>
 #include <OgrePanelOverlayElement.h>
 
@@ -77,5 +78,5 @@
         this->textureUnitState_->setTextureName("bar2.tga");
         // use the default colour
-        this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2, 0.7, 0.2));
+        this->textureUnitState_->setColourOperationEx(Ogre::LBX_MODULATE, Ogre::LBS_MANUAL, Ogre::LBS_CURRENT, ColourValue(0.2f, 0.7f, 0.2f));
 
         this->bar_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
Index: code/trunk/src/orxonox/overlays/hud/HUDBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDBar.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDBar.h	(revision 3196)
@@ -35,6 +35,9 @@
 
 #include <map>
-#include <OgrePrerequisites.h>
+#include <vector>
+
 #include "util/Math.h"
+#include "util/OgreForwardRefs.h"
+#include "core/BaseObject.h"
 #include "overlays/OrxonoxOverlay.h"
 
@@ -45,5 +48,5 @@
     public:
         BarColour(BaseObject* creator);
-        ~BarColour() { }
+        virtual ~BarColour() { }
 
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
Index: code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDHealthBar.cc	(revision 3196)
@@ -29,13 +29,9 @@
 #include "HUDHealthBar.h"
 
-#include <OgreOverlayManager.h>
-#include <OgrePanelOverlayElement.h>
-
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "objects/worldentities/pawns/Pawn.h"
-#include "objects/items/Engine.h"
 #include "overlays/OverlayGroup.h"
-#include "util/Convert.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/hud/HUDHealthBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDHealthBar.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDHealthBar.h	(revision 3196)
@@ -32,7 +32,8 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
 #include "HUDBar.h"
-#include "objects/Tickable.h"
-#include "overlays/OverlayText.h"
 
 namespace orxonox
@@ -42,5 +43,5 @@
         public:
             HUDHealthBar(BaseObject* creator);
-            ~HUDHealthBar();
+            virtual ~HUDHealthBar();
 
             virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
@@ -64,7 +65,7 @@
                 { return this->bUseBarColour_; }
 
-            inline void setTextAlignment(Ogre::TextAreaOverlayElement::Alignment alignment)
+            inline void setTextAlignment(OverlayText::Alignment alignment)
                 { this->textoverlay_->setAlignment(alignment); }
-            inline Ogre::TextAreaOverlayElement::Alignment getTextAlignment() const
+            inline OverlayText::Alignment getTextAlignment() const
                 { return this->textoverlay_->getAlignment(); }
 
Index: code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDNavigation.cc	(revision 3196)
@@ -29,4 +29,5 @@
 #include "HUDNavigation.h"
 
+#include <string>
 #include <OgreOverlayManager.h>
 #include <OgreTextAreaOverlayElement.h>
@@ -36,5 +37,4 @@
 #include "util/String.h"
 #include "util/Convert.h"
-#include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
Index: code/trunk/src/orxonox/overlays/hud/HUDNavigation.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDNavigation.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDNavigation.h	(revision 3196)
@@ -32,7 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
-#include <OgrePrerequisites.h>
+#include "util/OgreForwardRefs.h"
+#include "interfaces/Tickable.h"
 #include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -42,5 +42,5 @@
     public:
         HUDNavigation(BaseObject* creator);
-        ~HUDNavigation();
+        virtual ~HUDNavigation();
 
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
Index: code/trunk/src/orxonox/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDRadar.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDRadar.cc	(revision 3196)
@@ -35,11 +35,9 @@
 #include "util/Math.h"
 #include "util/String.h"
-#include "core/ConsoleCommand.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "objects/Radar.h"
+#include "tools/TextureGenerator.h"
 #include "objects/worldentities/WorldEntity.h"
 #include "objects/worldentities/pawns/Pawn.h"
-#include "tools/TextureGenerator.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/hud/HUDRadar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDRadar.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDRadar.h	(revision 3196)
@@ -33,10 +33,11 @@
 #include "OrxonoxPrereqs.h"
 
+#include <map>
 #include <vector>
-#include <map>
-#include <OgrePrerequisites.h>
+
+#include "util/OgreForwardRefs.h"
+#include "interfaces/RadarListener.h"
+#include "interfaces/RadarViewable.h"
 #include "overlays/OrxonoxOverlay.h"
-#include "objects/RadarListener.h"
-#include "objects/RadarViewable.h"
 
 namespace orxonox
@@ -46,5 +47,5 @@
     public:
         HUDRadar(BaseObject* creator);
-        ~HUDRadar();
+        virtual ~HUDRadar();
 
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
Index: code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.cc	(revision 3196)
@@ -29,4 +29,5 @@
 
 #include "HUDSpeedBar.h"
+
 #include "core/CoreIncludes.h"
 #include "objects/worldentities/pawns/SpaceShip.h"
Index: code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDSpeedBar.h	(revision 3196)
@@ -33,6 +33,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "HUDBar.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -42,5 +42,5 @@
     public:
         HUDSpeedBar(BaseObject* creator);
-        ~HUDSpeedBar();
+        virtual ~HUDSpeedBar();
 
         virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/hud/HUDTimer.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDTimer.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDTimer.cc	(revision 3196)
@@ -29,6 +29,6 @@
 #include "HUDTimer.h"
 
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
-#include "util/Convert.h"
 #include "objects/worldentities/ControllableEntity.h"
 #include "objects/gametypes/Gametype.h"
@@ -36,37 +36,37 @@
 namespace orxonox
 {
-  CreateFactory(HUDTimer);
+    CreateFactory(HUDTimer);
 
-  HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
-  {
-    RegisterObject(HUDTimer);
+    HUDTimer::HUDTimer(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(HUDTimer);
 
-    this->owner_ = 0;
-  }
+        this->owner_ = 0;
+    }
 
-  HUDTimer::~HUDTimer()
-  {
-  }
+    HUDTimer::~HUDTimer()
+    {
+    }
 
-  void HUDTimer::tick(float dt)
-  {
-    SUPER(HUDTimer, tick, dt);
+    void HUDTimer::tick(float dt)
+    {
+        SUPER(HUDTimer, tick, dt);
 
-    Gametype* gametype = this->getGametype();
-    
-    if(gametype)
+        Gametype* gametype = this->getGametype();
+
+        if (gametype)
+        {
+            if (gametype->getTimerIsActive())
+            {
+                this->setCaption(convertToString((int)gametype->getTime() + 1));
+            }
+        }
+    }
+
+    void HUDTimer::changedOwner()
     {
-      if (gametype->getTimerIsActive())
-      {
-        this->setCaption(convertToString((int)gametype->getTime() + 1));
-      }
+        SUPER(HUDTimer, changedOwner);
+
+        this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());
     }
-  }
-
-  void HUDTimer::changedOwner()
-  {
-    SUPER(HUDTimer, changedOwner);
-
-    this->owner_ = dynamic_cast<ControllableEntity*>(this->getOwner());
-  }
 }
Index: code/trunk/src/orxonox/overlays/hud/HUDTimer.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/HUDTimer.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/HUDTimer.h	(revision 3196)
@@ -32,22 +32,22 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
 {
-  class _OrxonoxExport HUDTimer : public OverlayText, public Tickable
-  {
+    class _OrxonoxExport HUDTimer : public OverlayText, public Tickable
+    {
     public:
-      HUDTimer(BaseObject* creator);
-      ~HUDTimer();
+        HUDTimer(BaseObject* creator);
+        virtual ~HUDTimer();
 
-      virtual void tick(float dt);
+        virtual void tick(float dt);
 
-      virtual void changedOwner();
+        virtual void changedOwner();
 
-      private:
+    private:
         ControllableEntity* owner_;
-  };
+    };
 }
 #endif /* _HUDTimer_H__ */
Index: code/trunk/src/orxonox/overlays/hud/KillMessage.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/KillMessage.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/KillMessage.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/GametypeMessageListener.h"
 #include "overlays/FadeoutText.h"
-#include "objects/GametypeMessageListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/hud/PongScore.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/PongScore.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/PongScore.cc	(revision 3196)
@@ -29,9 +29,7 @@
 #include "PongScore.h"
 
-#include <OgreTextAreaOverlayElement.h>
-
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Convert.h"
 #include "objects/gametypes/Pong.h"
 #include "objects/infos/PlayerInfo.h"
Index: code/trunk/src/orxonox/overlays/hud/PongScore.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/PongScore.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/PongScore.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -41,5 +41,5 @@
         public:
             PongScore(BaseObject* creator);
-            ~PongScore();
+            virtual ~PongScore();
 
             virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.cc	(revision 3196)
@@ -28,6 +28,4 @@
 
 #include "TeamBaseMatchScore.h"
-
-#include <OgreTextAreaOverlayElement.h>
 
 #include "core/CoreIncludes.h"
Index: code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/TeamBaseMatchScore.h	(revision 3196)
@@ -32,6 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-#include "objects/Tickable.h"
 
 namespace orxonox
@@ -41,5 +41,5 @@
         public:
             TeamBaseMatchScore(BaseObject* creator);
-            ~TeamBaseMatchScore();
+            virtual ~TeamBaseMatchScore();
 
             virtual void tick(float dt);
Index: code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc
===================================================================
--- code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.cc	(revision 3196)
@@ -47,5 +47,5 @@
         this->text_ = new OverlayText(this);
         this->text_->setFont("Monofur");
-        this->text_->setTextSize(0.04);
+        this->text_->setTextSize(0.04f);
         this->text_->setAlignmentString("center");
         this->text_->setColour(ColourValue::White);
Index: code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h
===================================================================
--- code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/hud/UnderAttackHealthBar.h	(revision 3196)
@@ -32,6 +32,7 @@
 #include "OrxonoxPrereqs.h"
 
+#include "util/Math.h"
+#include "tools/Timer.h"
 #include "HUDHealthBar.h"
-#include "tools/Timer.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/map/Map.cc
===================================================================
--- code/trunk/src/orxonox/overlays/map/Map.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/map/Map.cc	(revision 3196)
@@ -24,36 +24,37 @@
  *
  */
+
 #include "Map.h"
 
 #include <string>
-#include "util/String.h"
+
+#include <OgreBorderPanelOverlayElement.h>
+#include <OgreCamera.h>
+#include <OgreEntity.h>
+#include <OgreHardwarePixelBuffer.h>
+#include <OgreMaterialManager.h>
+#include <OgreMovablePlane.h>
+#include <OgreOverlay.h>
+#include <OgreOverlayContainer.h>
+#include <OgreOverlayManager.h>
+#include <OgrePass.h>
+#include <OgreRenderTexture.h>
+#include <OgreResourceGroupManager.h>
+#include <OgreRoot.h>
 #include <OgreSceneManager.h>
 #include <OgreSceneNode.h>
-#include <OgreEntity.h>
-#include <OgreNode.h>
-
-
-#include <OgreRenderWindow.h>
-#include <OgreRenderTexture.h>
+#include <OgreTechnique.h>
 #include <OgreTexture.h>
+#include <OgreTextureManager.h>
 #include <OgreViewport.h>
 
-#include <OgreMaterialManager.h>
-#include <OgreRoot.h>
-#include <OgreHardwarePixelBuffer.h>
+#include "core/ConsoleCommand.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "interfaces/RadarViewable.h"
+#include "objects/Scene.h"
+#include "objects/controllers/HumanController.h"
+#include "objects/worldentities/CameraPosition.h"
 #include "objects/worldentities/ControllableEntity.h"
-#include "objects/worldentities/CameraPosition.h"
-
-#include <OgreOverlay.h>
-#include <OgreMovablePlane.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/ConsoleCommand.h"
-#include "objects/Scene.h"
-#include "objects/RadarViewable.h"
-#include "objects/controllers/HumanController.h"
 
  namespace orxonox
@@ -264,5 +265,5 @@
     }
 
-    Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, std::string matName)
+    Ogre::MaterialPtr Map::createRenderCamera(Ogre::Camera * cam, const std::string& matName)
     {
         Ogre::TexturePtr rttTex = Ogre::TextureManager::getSingleton().createManual(matName+"_tex", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, 512, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET);
@@ -400,4 +401,10 @@
     }
 
+    // HACK!
+    void Map::hackDestroyMap()
+    {
+        Map::OverlayMaterial_.setNull();
+    }
+
     void Map::tick(float dt)
     {
Index: code/trunk/src/orxonox/overlays/map/Map.h
===================================================================
--- code/trunk/src/orxonox/overlays/map/Map.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/map/Map.h	(revision 3196)
@@ -25,26 +25,14 @@
  */
 
-#ifndef _MAP_H__
-#define _MAP_H__
+#ifndef _Map_H__
+#define _Map_H__
 
-#include <string>
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
-#include <OgreSceneManager.h>
-#include <OgreSceneNode.h>
-#include <OgreEntity.h>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-#include <OgreMovablePlane.h>
 
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
+#include <OgreMaterial.h>
 
+#include "util/UtilPrereqs.h"
+#include "interfaces/Tickable.h"
 #include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
-
-
 
 namespace orxonox
@@ -55,5 +43,5 @@
     public: // functions
         Map(BaseObject* creator);
-        ~Map();
+        virtual ~Map();
 
         virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
@@ -61,7 +49,9 @@
         virtual void changedOwner();
 
-        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, std::string matName);
+        static Ogre::MaterialPtr createRenderCamera(Ogre::Camera * cam, const std::string& matName);
 
         static void openMap();
+        // HACK!
+        static void hackDestroyMap();
 
 //Not yet implemented
@@ -126,3 +116,3 @@
 }
 
-#endif /* _MAP_H__ */
+#endif /* _Map_H__ */
Index: code/trunk/src/orxonox/overlays/notifications/Notification.cc
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/Notification.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/Notification.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file Notification.cc
+    @file
     @brief Implementation of the Notification class.
 */
@@ -35,6 +35,4 @@
 
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
 #include "NotificationManager.h"
 
@@ -48,4 +46,5 @@
     Notification::Notification(BaseObject* creator) : BaseObject(creator)
     {
+        RegisterObject(Notification);
         this->initialize();
     }
@@ -76,6 +75,4 @@
     void Notification::initialize(void)
     {
-        RegisterObject(Notification);
-        
         this->message_ = "";
         this->sender_ = NotificationManager::NONE;
Index: code/trunk/src/orxonox/overlays/notifications/Notification.h
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/Notification.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/Notification.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file Notification.h
+    @file
     @brief Definition of the Notification class.
 */
@@ -38,5 +38,4 @@
 
 #include <string>
-
 #include "core/BaseObject.h"
 
Index: code/trunk/src/orxonox/overlays/notifications/NotificationManager.cc
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationManager.cc
+    @file
     @brief Implementation of the NotificationManager class.
 */
@@ -34,8 +34,7 @@
 #include "NotificationManager.h"
 
+#include <set>
+
 #include "core/CoreIncludes.h"
-
-#include <set>
-
 #include "Notification.h"
 #include "NotificationQueue.h"
Index: code/trunk/src/orxonox/overlays/notifications/NotificationManager.h
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationManager.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationManager.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationManager.h
+    @file
     @brief Definition of the NotificationManager class.
 */
@@ -37,11 +37,8 @@
 #include "OrxonoxPrereqs.h"
 
-#include "core/OrxonoxClass.h"
-
+#include <ctime>
 #include <map>
 #include <string>
-#include <ctime>
-
-#include "NotificationOverlay.h"
+#include "core/OrxonoxClass.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationOverlay.cc
+    @file
     @brief Implementation of the NotificationOverlay class.
 */
@@ -34,11 +34,6 @@
 #include "NotificationOverlay.h"
 
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
-#include "util/Exception.h"
-
 #include "Notification.h"
 #include "NotificationQueue.h"
@@ -53,4 +48,5 @@
     NotificationOverlay::NotificationOverlay(BaseObject* creator) : OverlayText(creator)
     {
+        RegisterObject(NotificationOverlay);
         this->initialize();
     }
@@ -87,6 +83,4 @@
     void NotificationOverlay::initialize(void)
     {
-        RegisterObject(NotificationOverlay);
-        
         this->queue_ = NULL;
     }
@@ -133,5 +127,5 @@
         Clips the input message so that it meets the requirements for the maximal length of Notifications given by the NotificationQueue.
     */
-    const std::string NotificationOverlay::clipMessage(const std::string & message)
+    std::string NotificationOverlay::clipMessage(const std::string & message)
     {
         if(message.length() <= (unsigned int)this->queue_->getNotificationLength()) //!< If the message is not too long.
Index: code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.h
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationOverlay.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationOverlay.h
+    @file
     @brief Definition of the NotificationOverlay class.
 */
@@ -38,10 +38,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include <string>
 #include "orxonox/overlays/OverlayText.h"
-
-#include <string>
-#include <set>
-#include <OgrePrerequisites.h>
-#include <OgreTextAreaOverlayElement.h>
 
 namespace orxonox
@@ -72,5 +68,5 @@
         
         protected:
-            const std::string clipMessage(const std::string & message); //!< Clips the input message if too long.
+            std::string clipMessage(const std::string & message); //!< Clips the input message if too long.
 
         private:
Index: code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationQueue.cc
+    @file
     @brief Implementation of the NotificationQueue class.
 */
@@ -34,15 +34,10 @@
 #include "NotificationQueue.h"
 
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <list>
-#include <iostream>
 #include <sstream>
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
-#include "Notification.h"
 #include "NotificationOverlay.h"
+#include "NotificationManager.h"
 
 namespace orxonox
@@ -53,5 +48,5 @@
     const std::string NotificationQueue::DEFAULT_FONT = "VeraMono";
     const Vector2 NotificationQueue::DEFAULT_POSITION = Vector2(0.0,0.0);
-    const float NotificationQueue::DEFAULT_FONT_SIZE  = 0.025;
+    const float NotificationQueue::DEFAULT_FONT_SIZE  = 0.025f;
 
     /**
@@ -61,4 +56,5 @@
     NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayGroup(creator)
     {
+        RegisterObject(NotificationQueue);
         this->initialize();
     }
@@ -81,6 +77,4 @@
     void NotificationQueue::initialize(void)
     {
-        RegisterObject(NotificationQueue);
-
         this->size_ = 0;
         this->tickTime_ = 0.0;
Index: code/trunk/src/orxonox/overlays/notifications/NotificationQueue.h
===================================================================
--- code/trunk/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 3196)
@@ -28,5 +28,5 @@
 
 /**
-    @file NotificationQueue.h
+    @file
     @brief Definition of the NotificationQueue class.
 */
@@ -37,16 +37,12 @@
 #include "OrxonoxPrereqs.h"
 
+#include <ctime>
+#include <map>
+#include <set>
 #include <string>
-#include <set>
-#include <OgreOverlayManager.h>
-#include <OgreTextAreaOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-#include <map>
-#include <ctime>
-
-#include "orxonox/overlays/OverlayGroup.h"
-#include "orxonox/objects/Tickable.h"
-
-#include "NotificationManager.h"
+
+#include "util/Math.h"
+#include "interfaces/Tickable.h"
+#include "overlays/OverlayGroup.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/stats/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/overlays/stats/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/CMakeLists.txt	(revision 3196)
@@ -3,4 +3,3 @@
   Scoreboard.cc
   Stats.cc
-  StatsTest.cc
 )
Index: code/trunk/src/orxonox/overlays/stats/CreateLines.cc
===================================================================
--- code/trunk/src/orxonox/overlays/stats/CreateLines.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/CreateLines.cc	(revision 3196)
@@ -26,15 +26,4 @@
 
 #include "CreateLines.h"
-
-#include <string>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-
-#include "util/Convert.h"
-#include "util/Debug.h"
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
 
 #include "overlays/OverlayText.h"
Index: code/trunk/src/orxonox/overlays/stats/CreateLines.h
===================================================================
--- code/trunk/src/orxonox/overlays/stats/CreateLines.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/CreateLines.h	(revision 3196)
@@ -28,13 +28,5 @@
 #define _CreateLines_H__
 
-
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
-
-#include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
-
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/stats/Scoreboard.cc
===================================================================
--- code/trunk/src/orxonox/overlays/stats/Scoreboard.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/Scoreboard.cc	(revision 3196)
@@ -27,14 +27,6 @@
 #include "Scoreboard.h"
 
-#include <string>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
-#include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
-
 #include "util/Convert.h"
-#include "util/Debug.h"
 #include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
 #include "objects/gametypes/Gametype.h"
 #include "objects/infos/PlayerInfo.h"
@@ -101,7 +93,7 @@
         for (std::map<PlayerInfo*, Player>::const_iterator it = playerList.begin(); it != playerList.end(); ++it)
         {
-            this->lines_[index]->setPlayerName(omni_cast<std::string>(it->first->getName()));
-            this->lines_[index]->setScore(omni_cast<std::string>(it->second.frags_));
-            this->lines_[index]->setDeaths(omni_cast<std::string>(it->second.killed_));
+            this->lines_[index]->setPlayerName(multi_cast<std::string>(it->first->getName()));
+            this->lines_[index]->setScore(multi_cast<std::string>(it->second.frags_));
+            this->lines_[index]->setDeaths(multi_cast<std::string>(it->second.killed_));
             index++;
         }
Index: code/trunk/src/orxonox/overlays/stats/Scoreboard.h
===================================================================
--- code/trunk/src/orxonox/overlays/stats/Scoreboard.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/Scoreboard.h	(revision 3196)
@@ -30,11 +30,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
 
+#include <string>
+#include <vector>
+#include "interfaces/Tickable.h"
 #include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
-
 
 namespace orxonox
@@ -42,5 +40,4 @@
     class _OrxonoxExport Scoreboard : public OrxonoxOverlay, public Tickable
     {
-
     public: // functions
         Scoreboard(BaseObject* creator);
Index: code/trunk/src/orxonox/overlays/stats/Stats.cc
===================================================================
--- code/trunk/src/orxonox/overlays/stats/Stats.cc	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/Stats.cc	(revision 3196)
@@ -30,11 +30,8 @@
 
 #include <string>
-#include <OgreOverlay.h>
-#include <OgreOverlayElement.h>
 #include <OgreOverlayManager.h>
-#include <OgreOverlayContainer.h>
+#include <OgreBorderPanelOverlayElement.h>
 
-#include "util/Convert.h"
-#include "util/Debug.h"
+#include "util/String.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/trunk/src/orxonox/overlays/stats/Stats.h
===================================================================
--- code/trunk/src/orxonox/overlays/stats/Stats.h	(revision 3110)
+++ code/trunk/src/orxonox/overlays/stats/Stats.h	(revision 3196)
@@ -30,13 +30,9 @@
 #define _Stats_H__
 
+#include "OrxonoxPrereqs.h"
 
-#include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
-#include <OgreBorderPanelOverlayElement.h>
-#include <OgreTextAreaOverlayElement.h>
-
+#include "util/OgreForwardRefs.h"
+#include "interfaces/Tickable.h"
 #include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
-
 
 namespace orxonox
Index: code/trunk/src/orxonox/overlays/stats/StatsTest.cc
===================================================================
--- code/trunk/src/orxonox/overlays/stats/StatsTest.cc	(revision 3110)
+++ 	(revision )
@@ -1,51 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "StatsTest.h"
-
-#include <OgreTextAreaOverlayElement.h>
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    CreateFactory(StatsTest);
-
-    StatsTest::StatsTest(BaseObject* creator)
-        : OrxonoxOverlay(creator)
-    {
-        RegisterObject(StatsTest);
-    }
-
-    StatsTest::~StatsTest()
-    {
-    }
-
-    void StatsTest::tick(float dt)
-    {
-    }
-}
Index: code/trunk/src/orxonox/overlays/stats/StatsTest.h
===================================================================
--- code/trunk/src/orxonox/overlays/stats/StatsTest.h	(revision 3110)
+++ 	(revision )
@@ -1,48 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _StatsTest_H__
-#define _StatsTest_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "overlays/OrxonoxOverlay.h"
-#include "objects/Tickable.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport StatsTest : public OrxonoxOverlay, public Tickable
-    {
-    public:
-        StatsTest(BaseObject* creator);
-        ~StatsTest();
-
-        virtual void tick(float dt);
-    };
-}
-#endif /* _StatsTest_H__ */
Index: code/trunk/src/orxonox/sound/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/sound/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/sound/CMakeLists.txt	(revision 3196)
@@ -1,7 +1,3 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
-    SoundManager.h
-    SoundBase.h
-    SoundMainMenu.h
-
     SoundManager.cc
     SoundBase.cc
Index: code/trunk/src/orxonox/sound/SoundBase.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundBase.cc	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundBase.cc	(revision 3196)
@@ -26,30 +26,26 @@
  *
  */
+
+#include "SoundBase.h"
+
+#include <string>
 #include <vector>
 #include <AL/alut.h>
 #include <vorbis/vorbisfile.h>
 
+#include "util/Math.h"
+#include "core/Core.h"
 #include "orxonox/objects/worldentities/WorldEntity.h"
-#include "util/Math.h"
-#include "SoundBase.h"
 #include "SoundManager.h"
-#include "core/Core.h"
 
 namespace orxonox 
 {
-    SoundManager* SoundBase::soundmanager_s = NULL;
-
     SoundBase::SoundBase(WorldEntity* entity)
     {
-        if(SoundBase::soundmanager_s == NULL)
-        {
-            SoundBase::soundmanager_s = new SoundManager();
-        }
-
         this->source_ = 0;
         this->buffer_ = 0;
         this->entity_ = entity;
 
-        SoundBase::soundmanager_s->addSound(this);
+        SoundManager::getInstance().addSound(this);
     }
 
@@ -141,5 +137,5 @@
         filename = Core::getMediaPathString() + "/audio/" + filename;
 
-        if(!SoundBase::soundmanager_s->isSoundAvailable())
+        if(!SoundManager::getInstance().isSoundAvailable())
         {
             COUT(3) << "Sound: not available, skipping " << filename << std::endl;
@@ -179,5 +175,5 @@
     }
 
-    ALuint SoundBase::loadOggFile(std::string filename)
+    ALuint SoundBase::loadOggFile(const std::string& filename)
     {
         char inbuffer[4096];
Index: code/trunk/src/orxonox/sound/SoundBase.h
===================================================================
--- code/trunk/src/orxonox/sound/SoundBase.h	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundBase.h	(revision 3196)
@@ -26,11 +26,9 @@
  *
  */
-#ifndef _SOUNDBASE_H__
-#define _SOUNDBASE_H__
-
-#include <AL/al.h>
-#include <string>
+#ifndef _SoundBase_H__
+#define _SoundBase_H__
 
 #include "OrxonoxPrereqs.h"
+#include <cstring> // define NULL
 
 namespace orxonox
@@ -60,5 +58,5 @@
 
     private:
-        ALuint loadOggFile(std::string filename);
+        ALuint loadOggFile(const std::string& filename);
         ALuint source_;
         ALuint buffer_;
@@ -66,8 +64,6 @@
 
         ALint getSourceState();
-
-        static SoundManager* soundmanager_s;
     }; // class SoundBase
 } // namepsace orxonox
 
-#endif // _SOUNDBASE_H__
+#endif /* _SoundBase_H__ */
Index: code/trunk/src/orxonox/sound/SoundMainMenu.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundMainMenu.cc	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundMainMenu.cc	(revision 3196)
@@ -28,4 +28,5 @@
 
 #include "SoundMainMenu.h"
+
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
Index: code/trunk/src/orxonox/sound/SoundMainMenu.h
===================================================================
--- code/trunk/src/orxonox/sound/SoundMainMenu.h	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundMainMenu.h	(revision 3196)
@@ -27,11 +27,11 @@
  */
 
-#ifndef _SOUNDMAINMENU_H__
-#define _SOUNDMAINMENU_H__
+#ifndef _SoundMainMenu_H__
+#define _SoundMainMenu_H__
+
+#include "OrxonoxPrereqs.h"
 
 #include <string>
-
 #include "core/OrxonoxClass.h"
-#include "OrxonoxPrereqs.h"
 #include "SoundBase.h"
 
@@ -48,3 +48,4 @@
     };
 }
-#endif
+
+#endif /* _SoundMainMenu_H__ */
Index: code/trunk/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.cc	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundManager.cc	(revision 3196)
@@ -27,14 +27,16 @@
  */
 
+#include "SoundManager.h"
+
 #include <AL/alut.h>
 
+#include "util/Math.h"
 #include "orxonox/CameraManager.h"
 #include "orxonox/objects/worldentities/Camera.h"
-#include "util/Math.h"
 #include "SoundBase.h"
-#include "SoundManager.h"
 
 namespace orxonox
 {
+    SoundManager* SoundManager::singletonRef_s = NULL;
     ALCdevice* SoundManager::device_s = NULL;
 
@@ -44,4 +46,7 @@
     SoundManager::SoundManager()
     {
+        assert(singletonRef_s == NULL);
+        singletonRef_s = this;
+
         this->soundavailable_ = true;
         if(!alutInitWithoutContext(NULL,NULL))
@@ -90,4 +95,7 @@
     SoundManager::~SoundManager()
     {
+        assert(singletonRef_s != NULL);
+        singletonRef_s = NULL;
+
         alcDestroyContext(this->context_);
         alcCloseDevice(SoundManager::device_s);
Index: code/trunk/src/orxonox/sound/SoundManager.h
===================================================================
--- code/trunk/src/orxonox/sound/SoundManager.h	(revision 3110)
+++ code/trunk/src/orxonox/sound/SoundManager.h	(revision 3196)
@@ -25,12 +25,12 @@
  *      ...
  */
-#ifndef _SOUNDMANGER_H__
-#define _SOUNDMANGER_H__
-
-#include <AL/al.h>
-#include <AL/alc.h>
+#ifndef _SoundManager_H__
+#define _SoundManager_H__
 
 #include "OrxonoxPrereqs.h"
-#include "orxonox/objects/Tickable.h"
+
+#include <cassert>
+#include <list>
+#include "interfaces/Tickable.h"
 
 namespace orxonox
@@ -49,6 +49,8 @@
         void addSound(SoundBase* sound);
         void removeSound(SoundBase* sound);
-        virtual void tick(float dt);
+        void tick(float dt);
         bool isSoundAvailable();
+
+        static SoundManager& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
 
     private:
@@ -58,6 +60,7 @@
         bool soundavailable_;
 
+        static SoundManager* singletonRef_s;
     }; // class SoundManager
 } // namespace orxonox
 
-#endif // _SOUNDMANAGER_H__
+#endif /* _SoundManager_H__ */
Index: code/trunk/src/orxonox/tools/BillboardSet.cc
===================================================================
--- code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/BillboardSet.cc	(revision 3196)
@@ -29,14 +29,15 @@
 #include "BillboardSet.h"
 
+#include <cassert>
+#include <string>
 #include <sstream>
-#include <cassert>
-
 #include <OgreSceneManager.h>
 #include <OgreBillboardSet.h>
 #include <OgreBillboard.h>
 
+#include "util/Convert.h"
+#include "util/Math.h"
+#include "util/String.h"
 #include "core/GameMode.h"
-#include "util/Convert.h"
-#include "util/String.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/tools/BillboardSet.h
===================================================================
--- code/trunk/src/orxonox/tools/BillboardSet.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/BillboardSet.h	(revision 3196)
@@ -31,9 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include <string>
-#include <OgrePrerequisites.h>
-
-#include "util/Math.h"
+#include "util/OgreForwardRefs.h"
 
 namespace orxonox
@@ -52,5 +48,5 @@
             inline Ogre::BillboardSet* getBillboardSet()
                 { return this->billboardSet_; }
-            inline Ogre::SceneManager* getSceneManager()
+            inline Ogre::SceneManager* getSceneManager() const
                 { return this->scenemanager_; }
 
@@ -69,7 +65,8 @@
             void destroyBillboardSet();
 
-            static unsigned int billboardSetCounter_s;
             Ogre::BillboardSet* billboardSet_;
             Ogre::SceneManager* scenemanager_;
+
+            static unsigned int billboardSetCounter_s;
     };
 }
Index: code/trunk/src/orxonox/tools/BulletConversions.h
===================================================================
--- code/trunk/src/orxonox/tools/BulletConversions.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/BulletConversions.h	(revision 3196)
@@ -34,6 +34,6 @@
 #include "util/Convert.h"
 #include "util/Math.h"
-#include "LinearMath/btQuaternion.h"
-#include "LinearMath/btVector3.h"
+#include <LinearMath/btQuaternion.h>
+#include <LinearMath/btVector3.h>
 
 namespace orxonox
@@ -43,5 +43,5 @@
     struct ConverterExplicit<orxonox::Vector3, btVector3>
     {
-        static bool convert(btVector3* output, const orxonox::Vector3& input)
+        FORCEINLINE static bool convert(btVector3* output, const orxonox::Vector3& input)
         {
             output->setX(input.x);
@@ -56,5 +56,5 @@
     struct ConverterExplicit<btVector3, orxonox::Vector3>
     {
-        static bool convert(orxonox::Vector3* output, const btVector3& input)
+        FORCEINLINE static bool convert(orxonox::Vector3* output, const btVector3& input)
         {
             output->x = input.x();
@@ -69,5 +69,5 @@
     struct ConverterExplicit<orxonox::Quaternion, btQuaternion>
     {
-        static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
+        FORCEINLINE static bool convert(btQuaternion* output, const orxonox::Quaternion& input)
         {
             output->setW(input.w);
@@ -83,5 +83,5 @@
     struct ConverterExplicit<btQuaternion, orxonox::Quaternion>
     {
-        static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
+        FORCEINLINE static bool convert(orxonox::Quaternion* output, const btQuaternion& input)
         {
             output->w = input.w();
Index: code/trunk/src/orxonox/tools/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/tools/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/orxonox/tools/CMakeLists.txt	(revision 3196)
@@ -1,12 +1,10 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
   BillboardSet.cc
+  DynamicLines.cc
+  DynamicRenderable.cc
   Mesh.cc
   ParticleInterface.cc
   Shader.cc
   TextureGenerator.cc
-  TimeFactorListener.cc
   Timer.cc
-  WindowEventListener.cc
-  DynamicLines.cpp
-  DynamicRenderable.cpp
 )
Index: code/trunk/src/orxonox/tools/DynamicLines.cc
===================================================================
--- code/trunk/src/orxonox/tools/DynamicLines.cc	(revision 3196)
+++ code/trunk/src/orxonox/tools/DynamicLines.cc	(revision 3196)
@@ -0,0 +1,178 @@
+/*
+ *   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:
+ *      Baxissimo, Emmeran, DWORD, EtherDrive (OGRE Wiki)
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DynamicLines.h"
+
+#include <cassert>
+#include <cmath>
+
+namespace Ogre
+{
+    enum
+    {
+        POSITION_BINDING,
+        TEXCOORD_BINDING
+    };
+
+    DynamicLines::DynamicLines(OperationType opType)
+    {
+        initialize(opType,false);
+        setMaterial("BaseWhiteNoLighting");
+        mDirty = true;
+    }
+
+    DynamicLines::~DynamicLines()
+    {
+    }
+
+    void DynamicLines::setOperationType(OperationType opType)
+    {
+        mRenderOp.operationType = opType;
+    }
+
+    RenderOperation::OperationType DynamicLines::getOperationType() const
+    {
+        return mRenderOp.operationType;
+    }
+
+    void DynamicLines::addPoint(const Vector3 &p)
+    {
+        mPoints.push_back(p);
+        mDirty = true;
+    }
+
+    void DynamicLines::addPoint(Real x, Real y, Real z)
+    {
+        mPoints.push_back(Vector3(x,y,z));
+        mDirty = true;
+    }
+
+    const Vector3& DynamicLines::getPoint(unsigned short index) const
+    {
+        assert(index < mPoints.size() && "Point index is out of bounds!!");
+        return mPoints[index];
+    }
+
+    unsigned short DynamicLines::getNumPoints(void) const
+    {
+        return (unsigned short)mPoints.size();
+    }
+
+    void DynamicLines::setPoint(unsigned short index, const Vector3 &value)
+    {
+        assert(index < mPoints.size() && "Point index is out of bounds!!");
+
+        mPoints[index] = value;
+        mDirty = true;
+    }
+
+    void DynamicLines::clear()
+    {
+        mPoints.clear();
+        mDirty = true;
+    }
+
+    void DynamicLines::update()
+    {
+        if (mDirty)
+            fillHardwareBuffers();
+    }
+
+    void DynamicLines::createVertexDeclaration()
+    {
+        VertexDeclaration *decl = mRenderOp.vertexData->vertexDeclaration;
+        decl->addElement(POSITION_BINDING, 0, VET_FLOAT3, VES_POSITION);
+    }
+
+    void DynamicLines::fillHardwareBuffers()
+    {
+        int size = mPoints.size();
+
+        prepareHardwareBuffers(size,0);
+
+        if (!size)
+        {
+            mBox.setExtents(Vector3::ZERO,Vector3::ZERO);
+            mDirty=false;
+            return;
+        }
+
+        Vector3 vaabMin = mPoints[0];
+        Vector3 vaabMax = mPoints[0];
+
+        HardwareVertexBufferSharedPtr vbuf =
+            mRenderOp.vertexData->vertexBufferBinding->getBuffer(0);
+
+        Real *prPos = static_cast<Real*>(vbuf->lock(HardwareBuffer::HBL_DISCARD));
+        for (int i = 0; i < size; i++)
+        {
+            *prPos++ = mPoints[i].x;
+            *prPos++ = mPoints[i].y;
+            *prPos++ = mPoints[i].z;
+
+            if (mPoints[i].x < vaabMin.x)
+                vaabMin.x = mPoints[i].x;
+            if (mPoints[i].y < vaabMin.y)
+                vaabMin.y = mPoints[i].y;
+            if (mPoints[i].z < vaabMin.z)
+                vaabMin.z = mPoints[i].z;
+
+            if (mPoints[i].x > vaabMax.x)
+                vaabMax.x = mPoints[i].x;
+            if (mPoints[i].y > vaabMax.y)
+                vaabMax.y = mPoints[i].y;
+            if (mPoints[i].z > vaabMax.z)
+                vaabMax.z = mPoints[i].z;
+        }
+        vbuf->unlock();
+
+        mBox.setExtents(vaabMin, vaabMax);
+
+        mDirty = false;
+    }
+
+    /*
+    void DynamicLines::getWorldTransforms(Matrix4 *xform) const
+    {
+        // return identity matrix to prevent parent transforms
+        *xform = Matrix4::IDENTITY;
+    }
+    */
+
+    /*
+    const Quaternion &DynamicLines::getWorldOrientation(void) const
+    {
+        return Quaternion::IDENTITY;
+    }
+
+    const Vector3 &DynamicLines::getWorldPosition(void) const
+    {
+        return Vector3::ZERO;
+    }
+    */
+}
Index: code/trunk/src/orxonox/tools/DynamicLines.cpp
===================================================================
--- code/trunk/src/orxonox/tools/DynamicLines.cpp	(revision 3110)
+++ 	(revision )
@@ -1,145 +1,0 @@
-#include "DynamicLines.h"
-#include <Ogre.h>
-#include <cassert>
-#include <cmath>
-
-using namespace Ogre;
-
-namespace orxonox
-{
-enum {
-  POSITION_BINDING,
-  TEXCOORD_BINDING
-};
-
-DynamicLines::DynamicLines(OperationType opType)
-{
-  initialize(opType,false);
-  setMaterial("BaseWhiteNoLighting");
-  mDirty = true;
-}
-
-DynamicLines::~DynamicLines()
-{
-}
-
-void DynamicLines::setOperationType(OperationType opType)
-{
-  mRenderOp.operationType = opType;
-}
-
-RenderOperation::OperationType DynamicLines::getOperationType() const
-{
-  return mRenderOp.operationType;
-}
-
-void DynamicLines::addPoint(const Vector3 &p)
-{
-   mPoints.push_back(p);
-   mDirty = true;
-}
-void DynamicLines::addPoint(Real x, Real y, Real z)
-{
-   mPoints.push_back(Vector3(x,y,z));
-   mDirty = true;
-}
-const Vector3& DynamicLines::getPoint(unsigned short index) const
-{
-   assert(index < mPoints.size() && "Point index is out of bounds!!");
-   return mPoints[index];
-}
-unsigned short DynamicLines::getNumPoints(void) const
-{
-  return (unsigned short)mPoints.size();
-}
-void DynamicLines::setPoint(unsigned short index, const Vector3 &value)
-{
-  assert(index < mPoints.size() && "Point index is out of bounds!!");
-
-  mPoints[index] = value;
-  mDirty = true;
-}
-void DynamicLines::clear()
-{
-  mPoints.clear();
-  mDirty = true;
-}
-
-void DynamicLines::update()
-{
-  if (mDirty) fillHardwareBuffers();
-}
-
-void DynamicLines::createVertexDeclaration()
-{
-  VertexDeclaration *decl = mRenderOp.vertexData->vertexDeclaration;
-  decl->addElement(POSITION_BINDING, 0, VET_FLOAT3, VES_POSITION);
-}
-
-void DynamicLines::fillHardwareBuffers()
-{
-  int size = mPoints.size();
-
-  prepareHardwareBuffers(size,0);
-
-  if (!size) {
-    mBox.setExtents(Vector3::ZERO,Vector3::ZERO);
-    mDirty=false;
-    return;
-  }
-
-  Vector3 vaabMin = mPoints[0];
-  Vector3 vaabMax = mPoints[0];
-
-  HardwareVertexBufferSharedPtr vbuf =
-    mRenderOp.vertexData->vertexBufferBinding->getBuffer(0);
-
-  Real *prPos = static_cast<Real*>(vbuf->lock(HardwareBuffer::HBL_DISCARD));
-  {
-   for(int i = 0; i < size; i++)
-   {
-      *prPos++ = mPoints[i].x;
-      *prPos++ = mPoints[i].y;
-      *prPos++ = mPoints[i].z;
-
-      if(mPoints[i].x < vaabMin.x)
-         vaabMin.x = mPoints[i].x;
-      if(mPoints[i].y < vaabMin.y)
-         vaabMin.y = mPoints[i].y;
-      if(mPoints[i].z < vaabMin.z)
-         vaabMin.z = mPoints[i].z;
-
-      if(mPoints[i].x > vaabMax.x)
-         vaabMax.x = mPoints[i].x;
-      if(mPoints[i].y > vaabMax.y)
-         vaabMax.y = mPoints[i].y;
-      if(mPoints[i].z > vaabMax.z)
-         vaabMax.z = mPoints[i].z;
-   }
-  }
-  vbuf->unlock();
-
-  mBox.setExtents(vaabMin, vaabMax);
-
-  mDirty = false;
-}
-
-/*
-void DynamicLines::getWorldTransforms(Matrix4 *xform) const
-{
-   // return identity matrix to prevent parent transforms
-   *xform = Matrix4::IDENTITY;
-}
-*/
-/*
-const Quaternion &DynamicLines::getWorldOrientation(void) const
-{
-   return Quaternion::IDENTITY;
-}
-
-const Vector3 &DynamicLines::getWorldPosition(void) const
-{
-   return Vector3::ZERO;
-}
-*/
-}
Index: code/trunk/src/orxonox/tools/DynamicLines.h
===================================================================
--- code/trunk/src/orxonox/tools/DynamicLines.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/DynamicLines.h	(revision 3196)
@@ -1,67 +1,96 @@
-#ifndef _DYNAMIC_LINES_H_
-#define _DYNAMIC_LINES_H_
+/*
+ *   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:
+ *      Baxissimo, Emmeran, DWORD, EtherDrive (OGRE Wiki)
+ *   Co-authors:
+ *      ...
+ *
+ */
 
+#ifndef _DynamicLines_H__
+#define _DynamicLines_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <vector>
 #include "DynamicRenderable.h"
-#include <vector>
 
-namespace orxonox
+namespace Ogre
 {
-class DynamicLines : public DynamicRenderable
-{
-  typedef Ogre::Vector3 Vector3;
-  typedef Ogre::Quaternion Quaternion;
-  typedef Ogre::Camera Camera;
-  typedef Ogre::Real Real;
-  typedef Ogre::RenderOperation::OperationType OperationType;
+    class DynamicLines : public DynamicRenderable
+    {
+        typedef RenderOperation::OperationType OperationType;
 
-public:
-  /// Constructor - see setOperationType() for description of argument.
-  DynamicLines(OperationType opType=Ogre::RenderOperation::OT_LINE_STRIP);
-  virtual ~DynamicLines();
+    public:
+        /// Constructor - see setOperationType() for description of argument.
+        DynamicLines(OperationType opType = RenderOperation::OT_LINE_STRIP);
+        virtual ~DynamicLines();
 
-  /// Add a point to the point list
-  void addPoint(const Ogre::Vector3 &p);
-  /// Add a point to the point list
-  void addPoint(Real x, Real y, Real z);
+        /// Add a point to the point list
+        void addPoint(const Vector3 &p);
+        /// Add a point to the point list
+        void addPoint(Real x, Real y, Real z);
 
-  /// Change the location of an existing point in the point list
-  void setPoint(unsigned short index, const Vector3 &value);
+        /// Change the location of an existing point in the point list
+        void setPoint(unsigned short index, const Vector3 &value);
 
-  /// Return the location of an existing point in the point list
-  const Vector3& getPoint(unsigned short index) const;
+        /// Return the location of an existing point in the point list
+        const Vector3& getPoint(unsigned short index) const;
 
-  /// Return the total number of points in the point list
-  unsigned short getNumPoints(void) const;
+        /// Return the total number of points in the point list
+        unsigned short getNumPoints(void) const;
 
-  /// Remove all points from the point list
-  void clear();
+        /// Remove all points from the point list
+        void clear();
 
-  /// Call this to update the hardware buffer after making changes.
-  void update();
+        /// Call this to update the hardware buffer after making changes.
+        void update();
 
-  /** Set the type of operation to draw with.
-   * @param opType Can be one of
-   *    - RenderOperation::OT_LINE_STRIP
-   *    - RenderOperation::OT_LINE_LIST
-   *    - RenderOperation::OT_POINT_LIST
-   *    - RenderOperation::OT_TRIANGLE_LIST
-   *    - RenderOperation::OT_TRIANGLE_STRIP
-   *    - RenderOperation::OT_TRIANGLE_FAN
-   *    The default is OT_LINE_STRIP.
-   */
-  void setOperationType(OperationType opType);
-  OperationType getOperationType() const;
+        /**
+        @brief
+            Set the type of operation to draw with.
+        @param opType
+            Can be one of
+                - RenderOperation::OT_LINE_STRIP
+                - RenderOperation::OT_LINE_LIST
+                - RenderOperation::OT_POINT_LIST
+                - RenderOperation::OT_TRIANGLE_LIST
+                - RenderOperation::OT_TRIANGLE_STRIP
+                - RenderOperation::OT_TRIANGLE_FAN
+            The default is OT_LINE_STRIP.
+        */
+        void setOperationType(OperationType opType);
+        OperationType getOperationType() const;
 
-protected:
-  /// Implementation DynamicRenderable, creates a simple vertex-only decl
-  virtual void createVertexDeclaration();
-  /// Implementation DynamicRenderable, pushes point list out to hardware memory
-  virtual void fillHardwareBuffers();
+    protected:
+        /// Implementation DynamicRenderable, creates a simple vertex-only decl
+        virtual void createVertexDeclaration();
+        /// Implementation DynamicRenderable, pushes point list out to hardware memory
+        virtual void fillHardwareBuffers();
 
-private:
-  std::vector<Vector3> mPoints;
-  bool mDirty;
-};
+    private:
+        std::vector<Vector3> mPoints;
+        bool mDirty;
+    };
 }
 
-#endif
+#endif /* _DynamicLines_H__ */
Index: code/trunk/src/orxonox/tools/DynamicRenderable.cc
===================================================================
--- code/trunk/src/orxonox/tools/DynamicRenderable.cc	(revision 3196)
+++ code/trunk/src/orxonox/tools/DynamicRenderable.cc	(revision 3196)
@@ -0,0 +1,160 @@
+/*
+ *   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:
+ *      Sinbad, Baxissimo, DWORD, TheBren (OGRE Wiki)
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DynamicRenderable.h"
+
+#include <OgreCamera.h>
+#include <OgreHardwareBufferManager.h>
+
+namespace Ogre
+{
+    DynamicRenderable::DynamicRenderable()
+    {
+    }
+
+    DynamicRenderable::~DynamicRenderable()
+    {
+        delete mRenderOp.vertexData;
+        delete mRenderOp.indexData;
+    }
+
+    void DynamicRenderable::initialize(RenderOperation::OperationType operationType,
+           bool useIndices)
+    {
+        // Initialize render operation
+        mRenderOp.operationType = operationType;
+        mRenderOp.useIndexes = useIndices;
+        mRenderOp.vertexData = new VertexData;
+        if (mRenderOp.useIndexes)
+            mRenderOp.indexData = new IndexData;
+
+        // Reset buffer capacities
+        mVertexBufferCapacity = 0;
+        mIndexBufferCapacity = 0;
+
+        // Create vertex declaration
+        createVertexDeclaration();
+    }
+
+    void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount, size_t indexCount)
+    {
+        // Prepare vertex buffer
+        size_t newVertCapacity = mVertexBufferCapacity;
+        if ((vertexCount > mVertexBufferCapacity) || (!mVertexBufferCapacity))
+        {
+            // vertexCount exceeds current capacity!
+            // It is necessary to reallocate the buffer.
+
+            // Check if this is the first call
+            if (!newVertCapacity)
+                newVertCapacity = 1;
+
+            // Make capacity the next power of two
+            while (newVertCapacity < vertexCount)
+                newVertCapacity <<= 1;
+        }
+        else if (vertexCount < mVertexBufferCapacity>>1)
+        {
+            // Make capacity the previous power of two
+            while (vertexCount < newVertCapacity>>1)
+                newVertCapacity >>= 1;
+        }
+        if (newVertCapacity != mVertexBufferCapacity)
+        {
+            mVertexBufferCapacity = newVertCapacity;
+            // Create new vertex buffer
+            HardwareVertexBufferSharedPtr vbuf =
+                HardwareBufferManager::getSingleton().createVertexBuffer(
+                mRenderOp.vertexData->vertexDeclaration->getVertexSize(0),
+                mVertexBufferCapacity,
+                HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); // TODO: Custom HBU_?
+
+            // Bind buffer
+            mRenderOp.vertexData->vertexBufferBinding->setBinding(0, vbuf);
+        }
+        // Update vertex count in the render operation
+        mRenderOp.vertexData->vertexCount = vertexCount;
+
+        if (mRenderOp.useIndexes)
+        {
+            OgreAssert(indexCount <= std::numeric_limits<unsigned short>::max(), "indexCount exceeds 16 bit");
+
+            size_t newIndexCapacity = mIndexBufferCapacity;
+            // Prepare index buffer
+            if ((indexCount > newIndexCapacity) || (!newIndexCapacity))
+            {
+                // indexCount exceeds current capacity!
+                // It is necessary to reallocate the buffer.
+
+                // Check if this is the first call
+                if (!newIndexCapacity)
+                    newIndexCapacity = 1;
+
+                // Make capacity the next power of two
+                while (newIndexCapacity < indexCount)
+                    newIndexCapacity <<= 1;
+            }
+            else if (indexCount < newIndexCapacity>>1)
+            {
+                // Make capacity the previous power of two
+                while (indexCount < newIndexCapacity>>1)
+                    newIndexCapacity >>= 1;
+            }
+
+            if (newIndexCapacity != mIndexBufferCapacity)
+            {
+                mIndexBufferCapacity = newIndexCapacity;
+                // Create new index buffer
+                mRenderOp.indexData->indexBuffer =
+                    HardwareBufferManager::getSingleton().createIndexBuffer(
+                    HardwareIndexBuffer::IT_16BIT,
+                    mIndexBufferCapacity,
+                    HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); // TODO: Custom HBU_?
+            }
+
+            // Update index count in the render operation
+            mRenderOp.indexData->indexCount = indexCount;
+        }
+    }
+
+    Real DynamicRenderable::getBoundingRadius(void) const
+    {
+        return Math::Sqrt(std::max(mBox.getMaximum().squaredLength(), mBox.getMinimum().squaredLength()));
+    }
+
+    Real DynamicRenderable::getSquaredViewDepth(const Camera* cam) const
+    {
+        Vector3 vMin, vMax, vMid, vDist;
+        vMin = mBox.getMinimum();
+        vMax = mBox.getMaximum();
+        vMid = ((vMax - vMin) * 0.5) + vMin;
+        vDist = cam->getDerivedPosition() - vMid;
+
+        return vDist.squaredLength();
+    }
+}
Index: code/trunk/src/orxonox/tools/DynamicRenderable.cpp
===================================================================
--- code/trunk/src/orxonox/tools/DynamicRenderable.cpp	(revision 3110)
+++ 	(revision )
@@ -1,136 +1,0 @@
-#include "DynamicRenderable.h"
-#include <OgreCamera.h>
-#include <OgreHardwareBufferManager.h>
-
-using namespace Ogre;
-
-namespace orxonox
-{
-DynamicRenderable::DynamicRenderable()
-{
-}
-
-DynamicRenderable::~DynamicRenderable()
-{
-  delete mRenderOp.vertexData;
-  delete mRenderOp.indexData;
-}
-
-void DynamicRenderable::initialize(RenderOperation::OperationType operationType,
-                                   bool useIndices)
-{
-  // Initialize render operation
-  mRenderOp.operationType = operationType;
-  mRenderOp.useIndexes = useIndices;
-  mRenderOp.vertexData = new VertexData;
-  if (mRenderOp.useIndexes)
-    mRenderOp.indexData = new IndexData;
-
-  // Reset buffer capacities
-  mVertexBufferCapacity = 0;
-  mIndexBufferCapacity = 0;
-
-  // Create vertex declaration
-  createVertexDeclaration();
-}
-
-void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount,
-                                               size_t indexCount)
-{
-  // Prepare vertex buffer
-  size_t newVertCapacity = mVertexBufferCapacity;
-  if ((vertexCount > mVertexBufferCapacity) ||
-      (!mVertexBufferCapacity))
-  {
-    // vertexCount exceeds current capacity!
-    // It is necessary to reallocate the buffer.
-
-    // Check if this is the first call
-    if (!newVertCapacity)
-      newVertCapacity = 1;
-
-    // Make capacity the next power of two
-    while (newVertCapacity < vertexCount)
-      newVertCapacity <<= 1;
-  }
-  else if (vertexCount < mVertexBufferCapacity>>1) {
-    // Make capacity the previous power of two
-    while (vertexCount < newVertCapacity>>1)
-      newVertCapacity >>= 1;
-  }
-  if (newVertCapacity != mVertexBufferCapacity)
-  {
-    mVertexBufferCapacity = newVertCapacity;
-    // Create new vertex buffer
-    HardwareVertexBufferSharedPtr vbuf =
-      HardwareBufferManager::getSingleton().createVertexBuffer(
-        mRenderOp.vertexData->vertexDeclaration->getVertexSize(0),
-        mVertexBufferCapacity,
-        HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); // TODO: Custom HBU_?
-
-    // Bind buffer
-    mRenderOp.vertexData->vertexBufferBinding->setBinding(0, vbuf);
-  }
-  // Update vertex count in the render operation
-  mRenderOp.vertexData->vertexCount = vertexCount;
-
-  if (mRenderOp.useIndexes)
-  {
-    OgreAssert(indexCount <= std::numeric_limits<unsigned short>::max(), "indexCount exceeds 16 bit");
-
-    size_t newIndexCapacity = mIndexBufferCapacity;
-    // Prepare index buffer
-    if ((indexCount > newIndexCapacity) ||
-        (!newIndexCapacity))
-    {
-      // indexCount exceeds current capacity!
-      // It is necessary to reallocate the buffer.
-
-      // Check if this is the first call
-      if (!newIndexCapacity)
-        newIndexCapacity = 1;
-
-      // Make capacity the next power of two
-      while (newIndexCapacity < indexCount)
-        newIndexCapacity <<= 1;
-
-    }
-    else if (indexCount < newIndexCapacity>>1)
-    {
-      // Make capacity the previous power of two
-      while (indexCount < newIndexCapacity>>1)
-        newIndexCapacity >>= 1;
-    }
-
-    if (newIndexCapacity != mIndexBufferCapacity)
-    {
-      mIndexBufferCapacity = newIndexCapacity;
-      // Create new index buffer
-      mRenderOp.indexData->indexBuffer =
-        HardwareBufferManager::getSingleton().createIndexBuffer(
-          HardwareIndexBuffer::IT_16BIT,
-          mIndexBufferCapacity,
-          HardwareBuffer::HBU_DYNAMIC_WRITE_ONLY); // TODO: Custom HBU_?
-    }
-
-    // Update index count in the render operation
-    mRenderOp.indexData->indexCount = indexCount;
-  }
-}
-
-Real DynamicRenderable::getBoundingRadius(void) const
-{
-  return Math::Sqrt(std::max(mBox.getMaximum().squaredLength(), mBox.getMinimum().squaredLength()));
-}
-
-Real DynamicRenderable::getSquaredViewDepth(const Camera* cam) const
-{
-   Vector3 vMin, vMax, vMid, vDist;
-   vMin = mBox.getMinimum();
-   vMax = mBox.getMaximum();
-   vMid = ((vMax - vMin) * 0.5) + vMin;
-   vDist = cam->getDerivedPosition() - vMid;
-
-   return vDist.squaredLength();
-}
-}
Index: code/trunk/src/orxonox/tools/DynamicRenderable.h
===================================================================
--- code/trunk/src/orxonox/tools/DynamicRenderable.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/DynamicRenderable.h	(revision 3196)
@@ -1,72 +1,116 @@
-#ifndef DYNAMIC_RENDERABLE_H
-#define DYNAMIC_RENDERABLE_H
+/*
+ *   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:
+ *      Sinbad, Baxissimo, DWORD, TheBren (OGRE Wiki)
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _DynamicRenderable_H__
+#define _DynamicRenderable_H__
+
+#include "OrxonoxPrereqs.h"
 
 #include <OgreSimpleRenderable.h>
 
-namespace orxonox
+namespace Ogre
 {
-/// Abstract base class providing mechanisms for dynamically growing hardware buffers.
-class DynamicRenderable : public Ogre::SimpleRenderable
-{
-public:
-  /// Constructor
-  DynamicRenderable();
-  /// Virtual destructor
-  virtual ~DynamicRenderable();
+    /// Abstract base class providing mechanisms for dynamically growing hardware buffers.
+    class DynamicRenderable : public SimpleRenderable
+    {
+    public:
+        /// Constructor
+        DynamicRenderable();
+        /// Virtual destructor
+        virtual ~DynamicRenderable();
 
-  /** Initializes the dynamic renderable.
-   @remarks
-      This function should only be called once. It initializes the
-      render operation, and calls the abstract function
-      createVertexDeclaration().
-   @param operationType The type of render operation to perform.
-   @param useIndices Specifies whether to use indices to determine the
-          vertices to use as input. */
-  void initialize(Ogre::RenderOperation::OperationType operationType,
-                  bool useIndices);
+        /**
+        @brief
+            Initializes the dynamic renderable.
+        @remarks
+            This function should only be called once. It initializes the
+            render operation, and calls the abstract function
+            createVertexDeclaration().
+        @param operationType
+            The type of render operation to perform.
+        @param useIndices
+            Specifies whether to use indices to determine the vertices to use as input.
+        */
+        void initialize(RenderOperation::OperationType operationType,
+        bool useIndices);
 
-  /// Implementation of Ogre::SimpleRenderable
-  virtual Ogre::Real getBoundingRadius(void) const;
-  /// Implementation of Ogre::SimpleRenderable
-  virtual Ogre::Real getSquaredViewDepth(const Ogre::Camera* cam) const;
+        /// Implementation of SimpleRenderable
+        virtual Real getBoundingRadius(void) const;
+        /// Implementation of SimpleRenderable
+        virtual Real getSquaredViewDepth(const Camera* cam) const;
 
-protected:
-  /// Maximum capacity of the currently allocated vertex buffer.
-  size_t mVertexBufferCapacity;
-  /// Maximum capacity of the currently allocated index buffer.
-  size_t mIndexBufferCapacity;
+    protected:
+        /// Maximum capacity of the currently allocated vertex buffer.
+        size_t mVertexBufferCapacity;
+        /// Maximum capacity of the currently allocated index buffer.
+        size_t mIndexBufferCapacity;
 
-  /** Creates the vertex declaration.
-   @remarks
-      Override and set mRenderOp.vertexData->vertexDeclaration here.
-      mRenderOp.vertexData will be created for you before this method
-      is called. */
-  virtual void createVertexDeclaration() = 0;
+        /**
+        @brief
+            Creates the vertex declaration.
+        @remarks
+            Override and set mRenderOp.vertexData->vertexDeclaration here.
+            mRenderOp.vertexData will be created for you before this method
+            is called.
+        */
+        virtual void createVertexDeclaration() = 0;
 
-  /** Prepares the hardware buffers for the requested vertex and index counts.
-   @remarks
-      This function must be called before locking the buffers in
-      fillHardwareBuffers(). It guarantees that the hardware buffers
-      are large enough to hold at least the requested number of
-      vertices and indices (if using indices). The buffers are
-      possibly reallocated to achieve this.
-   @par
-      The vertex and index count in the render operation are set to
-      the values of vertexCount and indexCount respectively.
-   @param vertexCount The number of vertices the buffer must hold.
+        /**
+        @brief
+            Prepares the hardware buffers for the requested vertex and index counts.
+        @remarks
+            This function must be called before locking the buffers in
+            fillHardwareBuffers(). It guarantees that the hardware buffers
+            are large enough to hold at least the requested number of
+            vertices and indices (if using indices). The buffers are
+            possibly reallocated to achieve this.
+        @par
+            The vertex and index count in the render operation are set to
+            the values of vertexCount and indexCount respectively.
+        @param vertexCount
+            The number of vertices the buffer must hold.
+        @param indexCount
+            The number of indices the buffer must hold. This
+            parameter is ignored if not using indices.
+        */
+        void prepareHardwareBuffers(size_t vertexCount, size_t indexCount);
 
-   @param indexCount The number of indices the buffer must hold. This
-          parameter is ignored if not using indices. */
-  void prepareHardwareBuffers(size_t vertexCount, size_t indexCount);
-
-  /** Fills the hardware vertex and index buffers with data.
-   @remarks
-      This function must call prepareHardwareBuffers() before locking
-      the buffers to ensure the they are large enough for the data to
-      be written. Afterwards the vertex and index buffers (if using
-      indices) can be locked, and data can be written to them. */
-  virtual void fillHardwareBuffers() = 0;
-};
+        /**
+        @brief
+            Fills the hardware vertex and index buffers with data.
+        @remarks
+            This function must call prepareHardwareBuffers() before locking
+            the buffers to ensure the they are large enough for the data to
+            be written. Afterwards the vertex and index buffers (if using
+            indices) can be locked, and data can be written to them.
+        */
+        virtual void fillHardwareBuffers() = 0;
+    };
 }
 
-#endif // DYNAMIC_RENDERABLE_H
+#endif /* _DynamicRenderable_H__ */
Index: code/trunk/src/orxonox/tools/Mesh.cc
===================================================================
--- code/trunk/src/orxonox/tools/Mesh.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/Mesh.cc	(revision 3196)
@@ -29,12 +29,13 @@
 #include "Mesh.h"
 
+#include <cassert>
 #include <sstream>
+#include <string>
 #include <OgreEntity.h>
 #include <OgreSceneManager.h>
-#include <cassert>
 
-#include "core/GameMode.h"
 #include "util/Convert.h"
 #include "util/String.h"
+#include "core/GameMode.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/tools/Mesh.h
===================================================================
--- code/trunk/src/orxonox/tools/Mesh.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/Mesh.h	(revision 3196)
@@ -31,7 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-
-#include <string>
-#include <OgrePrerequisites.h>
+#include "util/OgreForwardRefs.h"
 
 namespace orxonox
@@ -58,8 +56,9 @@
 
         private:
-            static unsigned int meshCounter_s;
             Ogre::Entity* entity_;
             bool bCastShadows_;
             Ogre::SceneManager* scenemanager_;
+
+            static unsigned int meshCounter_s;
     };
 }
Index: code/trunk/src/orxonox/tools/ParticleInterface.cc
===================================================================
--- code/trunk/src/orxonox/tools/ParticleInterface.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/ParticleInterface.cc	(revision 3196)
@@ -34,13 +34,15 @@
 #include "ParticleInterface.h"
 
+#include <cassert>
+#include <string>
 #include <OgreParticleSystem.h>
 #include <OgreParticleEmitter.h>
 #include <OgreSceneManager.h>
-#include <cassert>
-
+
+#include "util/Convert.h"
+#include "util/Math.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
 #include "GraphicsManager.h"
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "util/Convert.h"
 
 namespace orxonox
@@ -132,5 +134,5 @@
             return 0;
     }
-    Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr) const
+    Ogre::ParticleAffector* ParticleInterface::getAffector(unsigned int affectorNr)
     {
         if (this->particleSystem_ && (affectorNr < this->particleSystem_->getNumAffectors()))
Index: code/trunk/src/orxonox/tools/ParticleInterface.h
===================================================================
--- code/trunk/src/orxonox/tools/ParticleInterface.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/ParticleInterface.h	(revision 3196)
@@ -32,10 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
-#include <string>
-#include <OgrePrerequisites.h>
-
-#include "core/OrxonoxClass.h"
-#include "util/Math.h"
-#include "tools/TimeFactorListener.h"
+#include "util/OgreForwardRefs.h"
+#include "interfaces/TimeFactorListener.h"
 
 #define getAllEmitters() \
@@ -52,5 +48,5 @@
             virtual ~ParticleInterface();
 
-            inline Ogre::ParticleSystem* getParticleSystem() const
+            inline Ogre::ParticleSystem* getParticleSystem()
                 { return this->particleSystem_; }
 
@@ -62,5 +58,5 @@
 
             Ogre::ParticleAffector* addAffector(const std::string& name);
-            Ogre::ParticleAffector* getAffector(unsigned int affectorNr) const;
+            Ogre::ParticleAffector* getAffector(unsigned int affectorNr);
             void removeAffector(unsigned int affectorNr);
             void removeAllAffectors();
@@ -95,8 +91,6 @@
             void updateVisibility();
 
-            static ParticleInterface* currentParticleInterface_s;
-            static unsigned int       counter_s;
-
             Ogre::ParticleSystem*     particleSystem_;
+            Ogre::SceneManager*       scenemanager_;
             bool                      bVisible_;
             bool                      bEnabled_;
@@ -104,5 +98,7 @@
             unsigned int              detaillevel_;     //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high)
             float                     speedFactor_;
-            Ogre::SceneManager*       scenemanager_;
+
+            static ParticleInterface* currentParticleInterface_s;
+            static unsigned int       counter_s;
     };
 }
Index: code/trunk/src/orxonox/tools/Shader.cc
===================================================================
--- code/trunk/src/orxonox/tools/Shader.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/Shader.cc	(revision 3196)
@@ -34,15 +34,12 @@
 #include <OgreRoot.h>
 #include <OgrePlugin.h>
-
-#include "core/GameMode.h"
-#include "core/CoreIncludes.h"
-#include "core/Executor.h"
-#include "GraphicsManager.h"
-#include "util/Exception.h"
-
 #include <OgreMaterial.h>
 #include <OgreTechnique.h>
 #include <OgrePass.h>
 #include <OgreMaterialManager.h>
+
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "GraphicsManager.h"
 
 namespace orxonox
@@ -219,5 +216,5 @@
                 return (*((float*)pointer->second));
             else
-                return (*((int*)pointer->second));
+                return static_cast<float>(*((int*)pointer->second));
         }
         else
Index: code/trunk/src/orxonox/tools/Shader.h
===================================================================
--- code/trunk/src/orxonox/tools/Shader.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/Shader.h	(revision 3196)
@@ -31,9 +31,11 @@
 
 #include "OrxonoxPrereqs.h"
-#include <OgrePrerequisites.h>
+
+#include <map>
+#include <string>
 #include <vector>
-#include <map>
 
-#include "objects/Tickable.h"
+#include "util/OgreForwardRefs.h"
+#include "interfaces/Tickable.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/tools/TextureGenerator.cc
===================================================================
--- code/trunk/src/orxonox/tools/TextureGenerator.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/TextureGenerator.cc	(revision 3196)
@@ -33,12 +33,14 @@
 
 #include "TextureGenerator.h"
+
 #include <OgreMaterialManager.h>
 #include <OgreTechnique.h>
 #include "util/Convert.h"
+#include "util/Math.h"
 
 namespace std
 {
     template <>
-    bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const
+    inline bool less<orxonox::ColourValue>::operator()(const orxonox::ColourValue& __x, const orxonox::ColourValue& __y) const
     {
         if (__x.r == __y.r)
@@ -63,5 +65,5 @@
     unsigned int TextureGenerator::materialCount_s = 0;
 
-    /*static*/ const std::string& TextureGenerator::getMaterialName(std::string textureName, const ColourValue& colour)
+    /*static*/ const std::string& TextureGenerator::getMaterialName(const std::string& textureName, const ColourValue& colour)
     {
         std::map<ColourValue, std::string>& colourMap = materials_s[textureName];
Index: code/trunk/src/orxonox/tools/TextureGenerator.h
===================================================================
--- code/trunk/src/orxonox/tools/TextureGenerator.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/TextureGenerator.h	(revision 3196)
@@ -36,7 +36,8 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <map>
 #include <string>
-#include <map>
-#include "util/Math.h"
+#include "util/UtilPrereqs.h"
 
 namespace orxonox
@@ -45,5 +46,5 @@
     {
     public:
-        static const std::string& getMaterialName(std::string textureName, const ColourValue& colour);
+        static const std::string& getMaterialName(const std::string& textureName, const ColourValue& colour);
 
     private:
Index: code/trunk/src/orxonox/tools/TimeFactorListener.cc
===================================================================
--- code/trunk/src/orxonox/tools/TimeFactorListener.cc	(revision 3110)
+++ 	(revision )
@@ -1,40 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "TimeFactorListener.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    float TimeFactorListener::timefactor_s = 1.0f;
-
-    TimeFactorListener::TimeFactorListener()
-    {
-        RegisterRootObject(TimeFactorListener);
-    }
-}
Index: code/trunk/src/orxonox/tools/TimeFactorListener.h
===================================================================
--- code/trunk/src/orxonox/tools/TimeFactorListener.h	(revision 3110)
+++ 	(revision )
@@ -1,56 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TimeFactorListener_H__
-#define _TimeFactorListener_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
-
-
-namespace orxonox
-{
-    class _OrxonoxExport TimeFactorListener : virtual public OrxonoxClass
-    {
-        friend class GSRoot;
-
-        public:
-            TimeFactorListener();
-            virtual ~TimeFactorListener() {}
-
-        protected:
-            virtual void changedTimeFactor(float factor_new, float factor_old) {}
-            inline float getTimeFactor() const
-                { return TimeFactorListener::timefactor_s; }
-
-        private:
-            static float timefactor_s;
-    };
-}
-
-#endif /* _TimeFactorListener_H__ */
Index: code/trunk/src/orxonox/tools/Timer.cc
===================================================================
--- code/trunk/src/orxonox/tools/Timer.cc	(revision 3110)
+++ code/trunk/src/orxonox/tools/Timer.cc	(revision 3196)
@@ -27,13 +27,13 @@
  */
 
+#include "Timer.h"
+
 #include <set>
 
-#include "Timer.h"
-
-#include "core/Executor.h"
 #include "core/CoreIncludes.h"
 #include "core/ConsoleCommand.h"
 #include "core/CommandExecutor.h"
 #include "core/Clock.h"
+#include "core/Functor.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/tools/Timer.h
===================================================================
--- code/trunk/src/orxonox/tools/Timer.h	(revision 3110)
+++ code/trunk/src/orxonox/tools/Timer.h	(revision 3196)
@@ -62,7 +62,8 @@
 
 #include "OrxonoxPrereqs.h"
+
 #include "core/Executor.h"
 #include "core/OrxonoxClass.h"
-#include "tools/TimeFactorListener.h"
+#include "interfaces/TimeFactorListener.h"
 
 namespace orxonox
Index: code/trunk/src/orxonox/tools/WindowEventListener.cc
===================================================================
--- code/trunk/src/orxonox/tools/WindowEventListener.cc	(revision 3110)
+++ 	(revision )
@@ -1,41 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#include "WindowEventListener.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    /**
-        @brief Constructor for the WindowEventListener.
-    */
-    WindowEventListener::WindowEventListener()
-    {
-        RegisterRootObject(WindowEventListener);
-    }
-}
Index: code/trunk/src/orxonox/tools/WindowEventListener.h
===================================================================
--- code/trunk/src/orxonox/tools/WindowEventListener.h	(revision 3110)
+++ 	(revision )
@@ -1,58 +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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _WindowEventListener_H__
-#define _WindowEventListener_H__
-
-#include "OrxonoxPrereqs.h"
-#include "core/OrxonoxClass.h"
-
-
-namespace orxonox
-{
-    /**
-        @brief Interface for receiving window events.
-    */
-    class _OrxonoxExport WindowEventListener : virtual public OrxonoxClass
-    {
-        public:
-            WindowEventListener();
-            virtual ~WindowEventListener() { }
-
-            /** Window has moved position */
-            virtual void windowMoved() { }
-
-            /** Window has resized */
-            virtual void windowResized(unsigned int newWidth, unsigned int newHeight) { }
-
-            /** Window has lost/gained focus */
-            virtual void windowFocusChanged() { }
-    };
-}
-
-#endif /* _WindowEventListener_H__ */
Index: code/trunk/src/tinyxml/CMakeLists.txt
===================================================================
--- code/trunk/src/tinyxml/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/tinyxml/CMakeLists.txt	(revision 3196)
@@ -30,5 +30,4 @@
   tinyxmlparser.cpp
 )
-GENERATE_SOURCE_GROUPS(${TINYXML++_FILES})
 
 # No warnings needed from third party libraries
@@ -36,10 +35,10 @@
 ADD_COMPILER_FLAGS("-w")
 
-IF(MSVC)
-  ADD_LIBRARY(tinyxml++_orxonox STATIC ${TINYXML++_FILES})
-ELSE()
-  ADD_LIBRARY(tinyxml++_orxonox SHARED ${TINYXML++_FILES})
-  ORXONOX_INSTALL(tinyxml++_orxonox)
-ENDIF()
-
-SET_TARGET_PROPERTIES(tinyxml++_orxonox PROPERTIES VERSION 2.5.3)
+ORXONOX_ADD_LIBRARY(tinyxml++_orxonox
+  ORXONOX_EXTERNAL
+  NO_DLL_INTERFACE
+  VERSION
+    2.5.3
+  SOURCE_FILES
+    ${TINYXML++_FILES}
+)
Index: code/trunk/src/tolua/CMakeLists.txt
===================================================================
--- code/trunk/src/tolua/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/tolua/CMakeLists.txt	(revision 3196)
@@ -36,19 +36,28 @@
 ADD_COMPILER_FLAGS("-w")
 
-ADD_LIBRARY(tolua++_orxonox SHARED ${TOLUA++_FILES})
-SET_TARGET_PROPERTIES(tolua++_orxonox PROPERTIES DEFINE_SYMBOL "TOLUA_SHARED_BUILD")
-TARGET_LINK_LIBRARIES(tolua++_orxonox ${LUA_LIBRARIES})
-
-SET_TARGET_PROPERTIES(tolua++_orxonox PROPERTIES VERSION 1.0.92)
-
-ORXONOX_INSTALL(tolua++_orxonox)
+ORXONOX_ADD_LIBRARY(tolua++_orxonox
+  ORXONOX_EXTERNAL
+  DEFINE_SYMBOL
+    "TOLUA_SHARED_BUILD"
+  VERSION
+    1.0.92
+  LINK_LIBRARIES
+    ${LUA_LIBRARIES}
+  SOURCE_FILES
+    ${TOLUA++_FILES}
+)
 
 
 ################## Tolua++ generator ##################
 
-ADD_EXECUTABLE(tolua++app_orxonox tolua.c)
-TARGET_LINK_LIBRARIES(tolua++app_orxonox tolua++_orxonox ${LUA_LIBRARIES})
-
-OPTION(TOLUA_PARSER_RELEASE "Disable all debug messages from tolua bind files for Release and MinSizeRel build types." FALSE)
+ORXONOX_ADD_EXECUTABLE(tolua++app_orxonox
+  ORXONOX_EXTERNAL
+  VERSION
+    1.0.92
+  LINK_LIBRARIES
+    ${LUA_LIBRARIES}
+  SOURCE_FILES
+    tolua.c
+)
 
 # Set some variables to the cache in order to use them in the TOLUA macro
Index: code/trunk/src/util/CMakeLists.txt
===================================================================
--- code/trunk/src/util/CMakeLists.txt	(revision 3110)
+++ code/trunk/src/util/CMakeLists.txt	(revision 3196)
@@ -18,25 +18,5 @@
  #
 
-SET_SOURCE_FILES(UTIL_FILES
-  CRC32.h
-  Clipboard.h
-  Convert.h
-  Debug.h
-  Exception.h
-  ExprParser.h
-  Math.h
-  MathConvert.h
-  MultiType.h
-  MultiTypeValue.h
-  OrxEnum.h
-  OutputBuffer.h
-  OutputHandler.h
-  SignalHandler.h
-  Sleep.h
-  String.h
-  SubString.h
-  UtilPrereqs.h
-  mbool.h
-  
+SET_SOURCE_FILES(UTIL_SRC_FILES
   Clipboard.cc
   CRC32.cc
@@ -52,20 +32,4 @@
   SubString.cc
 )
-#GET_ALL_HEADER_FILES(UTIL_HDR_FILES)
-#SET(UTIL_FILES ${UTIL_SRC_FILES} ${UTIL_HDR_FILES})
-GENERATE_SOURCE_GROUPS(${UTIL_FILES})
-# Also add OrxonoxConfig to have it least somewhere in the IDE
-LIST(APPEND UTIL_FILES
-  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
-  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
-  ${CMAKE_BINARY_DIR}/src/SpecialConfig.h
-  ${CMAKE_SOURCE_DIR}/src/SpecialConfig.h.in
-)
-SOURCE_GROUP("" FILES
-  ${CMAKE_BINARY_DIR}/src/OrxonoxConfig.h
-  ${CMAKE_SOURCE_DIR}/src/OrxonoxConfig.h.in
-  ${CMAKE_BINARY_DIR}/src/SpecialConfig.h
-  ${CMAKE_SOURCE_DIR}/src/SpecialConfig.h.in
-)
 
 IF(GCC_NO_SYSTEM_HEADER_SUPPORT)
@@ -74,7 +38,11 @@
 ENDIF()
 
-ADD_LIBRARY(util SHARED ${UTIL_FILES})
-SET_TARGET_PROPERTIES(util PROPERTIES DEFINE_SYMBOL "UTIL_SHARED_BUILD")
-TARGET_LINK_LIBRARIES(util ${OGRE_LIBRARY})
-
-ORXONOX_INSTALL(util)
+ORXONOX_ADD_LIBRARY(util
+  FIND_HEADER_FILES
+  DEFINE_SYMBOL
+    "UTIL_SHARED_BUILD"
+  LINK_LIBRARIES
+    ${OGRE_LIBRARY}
+  SOURCE_FILES
+    ${UTIL_SRC_FILES}
+)
Index: code/trunk/src/util/CRC32.h
===================================================================
--- code/trunk/src/util/CRC32.h	(revision 3110)
+++ code/trunk/src/util/CRC32.h	(revision 3196)
@@ -31,5 +31,4 @@
 
 #include "UtilPrereqs.h"
-#include <iostream>
 
 namespace orxonox
Index: code/trunk/src/util/Clipboard.cc
===================================================================
--- code/trunk/src/util/Clipboard.cc	(revision 3110)
+++ code/trunk/src/util/Clipboard.cc	(revision 3196)
@@ -112,5 +112,5 @@
 namespace orxonox
 {
-    std::string clipboard = ""; //!< Keeps the text of our internal clipboard
+    static std::string clipboard = ""; //!< Keeps the text of our internal clipboard
 
     /**
Index: code/trunk/src/util/Clipboard.h
===================================================================
--- code/trunk/src/util/Clipboard.h	(revision 3110)
+++ code/trunk/src/util/Clipboard.h	(revision 3196)
@@ -43,5 +43,4 @@
 
 #include "UtilPrereqs.h"
-
 #include <string>
 
Index: code/trunk/src/util/Convert.h
===================================================================
--- code/trunk/src/util/Convert.h	(revision 3110)
+++ code/trunk/src/util/Convert.h	(revision 3196)
@@ -40,6 +40,4 @@
 #include <string>
 #include <sstream>
-#include <istream>
-#include <ostream>
 #include <typeinfo>
 
@@ -123,5 +121,5 @@
 namespace orxonox
 {
-    namespace
+    namespace detail
     {
         //! Little template that maps integers to entire types (Alexandrescu 2001)
@@ -139,5 +137,5 @@
     struct ConverterFallback
     {
-        static bool convert(ToType* output, const FromType& input)
+        FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             COUT(2) << "Could not convert value of type " << typeid(FromType).name()
@@ -151,5 +149,5 @@
     struct ConverterFallback<FromType*, ToType*>
     {
-        static bool convert(ToType** output, FromType* const input)
+        FORCEINLINE static bool convert(ToType** output, FromType* const input)
         {
             ToType* temp = dynamic_cast<ToType*>(input);
@@ -174,5 +172,5 @@
 struct ConverterStringStream
 {
-    static bool convert(ToType* output, const FromType& input)
+    FORCEINLINE static bool convert(ToType* output, const FromType& input)
     {
         return orxonox::ConverterFallback<FromType, ToType>::convert(output, input);
@@ -188,5 +186,5 @@
 {
     template <class FromType>
-    inline bool operator <<(std::ostream& outstream,  const FromType& input)
+    FORCEINLINE bool operator <<(std::ostream& outstream,  const FromType& input)
     {
         std::string temp;
@@ -205,5 +203,5 @@
 struct ConverterStringStream<FromType, std::string>
 {
-    static bool convert(std::string* output, const FromType& input)
+    FORCEINLINE static bool convert(std::string* output, const FromType& input)
     {
         using namespace fallbackTemplates;
@@ -228,5 +226,5 @@
 {
     template <class ToType>
-    inline bool operator >>(std::istream& instream, ToType& output)
+    FORCEINLINE bool operator >>(std::istream& instream, ToType& output)
     {
         return orxonox::ConverterFallback<std::string, ToType>
@@ -239,5 +237,5 @@
 struct ConverterStringStream<std::string, ToType>
 {
-    static bool convert(ToType* output, const std::string& input)
+    FORCEINLINE static bool convert(ToType* output, const std::string& input)
     {
         using namespace fallbackTemplates;
@@ -262,5 +260,5 @@
     // implicit cast not possible, try stringstream conversion next
     template <class FromType, class ToType>
-    inline bool convertImplicitely(ToType* output, const FromType& input, orxonox::Int2Type<false>)
+    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, detail::Int2Type<false>)
     {
         return ConverterStringStream<FromType, ToType>::convert(output, input);
@@ -269,5 +267,5 @@
     // We can cast implicitely
     template <class FromType, class ToType>
-    inline bool convertImplicitely(ToType* output, const FromType& input, orxonox::Int2Type<true>)
+    FORCEINLINE bool convertImplicitely(ToType* output, const FromType& input, detail::Int2Type<true>)
     {
         (*output) = static_cast<ToType>(input);
@@ -284,10 +282,10 @@
     struct ConverterExplicit
     {
-        static bool convert(ToType* output, const FromType& input)
+        FORCEINLINE static bool convert(ToType* output, const FromType& input)
         {
             // Try implict cast and probe first. If a simple cast is not possible, it will not compile
             // We therefore have to out source it into another template function
             const bool probe = ImplicitConversion<FromType, ToType>::exists;
-            return convertImplicitely(output, input, orxonox::Int2Type<probe>());
+            return convertImplicitely(output, input, detail::Int2Type<probe>());
         }
     };
@@ -306,14 +304,7 @@
     */
     template <class FromType, class ToType>
-    inline bool convertValue(ToType* output, const FromType& input)
+    FORCEINLINE bool convertValue(ToType* output, const FromType& input)
     {
         return ConverterExplicit<FromType, ToType>::convert(output, input);
-    }
-
-    // For compatibility reasons. The same, but with capital ConvertValue
-    template<class FromType, class ToType>
-    inline bool ConvertValue(ToType* output, const FromType& input)
-    {
-        return convertValue(output, input);
     }
 
@@ -331,5 +322,5 @@
     */
     template<class FromType, class ToType>
-    inline bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
+    FORCEINLINE bool convertValue(ToType* output, const FromType& input, const ToType& fallback)
     {
         if (convertValue(output, input))
@@ -342,14 +333,7 @@
     }
 
-    // for compatibility reason. (capital 'c' in ConvertValue)
-    template<class FromType, class ToType>
-    inline bool ConvertValue(ToType* output, const FromType& input, const ToType& fallback)
-    {
-        return convertValue(output, input, fallback);
-    }
-
     // Directly returns the converted value, even if the conversion was not successful.
     template<class FromType, class ToType>
-    inline ToType getConvertedValue(const FromType& input)
+    FORCEINLINE ToType getConvertedValue(const FromType& input)
     {
         ToType output;
@@ -360,5 +344,5 @@
     // Directly returns the converted value, but uses the fallback on failure.
     template<class FromType, class ToType>
-    inline ToType getConvertedValue(const FromType& input, const ToType& fallback)
+    FORCEINLINE ToType getConvertedValue(const FromType& input, const ToType& fallback)
     {
         ToType output;
@@ -370,5 +354,5 @@
     // That means you can call it exactly like static_cast<ToType>(fromTypeValue).
     template<class ToType, class FromType>
-    inline ToType omni_cast(const FromType& input)
+    FORCEINLINE ToType multi_cast(const FromType& input)
     {
         ToType output;
@@ -379,14 +363,14 @@
     // convert to string Shortcut
     template <class FromType>
-    inline std::string convertToString(FromType value)
-    {
-      return getConvertedValue<FromType, std::string>(value);
+    FORCEINLINE std::string convertToString(FromType value)
+    {
+        return getConvertedValue<FromType, std::string>(value);
     }
 
     // convert from string Shortcut
     template <class ToType>
-    inline ToType convertFromString(std::string str)
-    {
-      return getConvertedValue<std::string, ToType>(str);
+    FORCEINLINE ToType convertFromString(std::string str)
+    {
+        return getConvertedValue<std::string, ToType>(str);
     }
 
@@ -399,5 +383,5 @@
     struct ConverterExplicit<const char*, ToType>
     {
-        static bool convert(ToType* output, const char* input)
+        FORCEINLINE static bool convert(ToType* output, const char* input)
         {
             return convertValue<std::string, ToType>(output, input);
@@ -409,5 +393,5 @@
     struct ConverterExplicit<char, std::string>
     {
-        static bool convert(std::string* output, const char input)
+        FORCEINLINE static bool convert(std::string* output, const char input)
         {
             *output = std::string(1, input);
@@ -418,5 +402,5 @@
     struct ConverterExplicit<unsigned char, std::string>
     {
-        static bool convert(std::string* output, const unsigned char input)
+        FORCEINLINE static bool convert(std::string* output, const unsigned char input)
         {
             *output = std::string(1, input);
@@ -427,5 +411,5 @@
     struct ConverterExplicit<std::string, char>
     {
-        static bool convert(char* output, const std::string input)
+        FORCEINLINE static bool convert(char* output, const std::string input)
         {
             if (input != "")
@@ -439,5 +423,5 @@
     struct ConverterExplicit<std::string, unsigned char>
     {
-        static bool convert(unsigned char* output, const std::string input)
+        FORCEINLINE static bool convert(unsigned char* output, const std::string input)
         {
             if (input != "")
@@ -454,5 +438,5 @@
     struct ConverterExplicit<bool, std::string>
     {
-        static bool convert(std::string* output, const bool& input)
+        FORCEINLINE static bool convert(std::string* output, const bool& input)
         {
             if (input)
Index: code/trunk/src/util/Debug.h
===================================================================
--- code/trunk/src/util/Debug.h	(revision 3110)
+++ code/trunk/src/util/Debug.h	(revision 3196)
@@ -63,6 +63,4 @@
 #include "UtilPrereqs.h"
 
-#include <stdio.h>
-
 #include "OutputHandler.h"
 
@@ -73,5 +71,5 @@
         @return The soft debug level
     */
-    static inline int getSoftDebugLevel()
+    inline int getSoftDebugLevel()
     {
         return OutputHandler::getSoftDebugLevel();
Index: code/trunk/src/util/Exception.cc
===================================================================
--- code/trunk/src/util/Exception.cc	(revision 3110)
+++ code/trunk/src/util/Exception.cc	(revision 3196)
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    Exception::Exception(const std::string& description, int lineNumber,
+    Exception::Exception(const std::string& description, unsigned int lineNumber,
                          const char* filename, const char* functionName)
         : description_(description)
@@ -52,4 +52,10 @@
     { }
 
+    /**
+    @remarks
+        The composed full description gets stored to fullDescription_. But for compliance
+        with std::exception, this method has to be const. Hence fullDescription_ is declared
+        as mutable.
+    */
     const std::string& Exception::getFullDescription() const
     {
Index: code/trunk/src/util/Exception.h
===================================================================
--- code/trunk/src/util/Exception.h	(revision 3110)
+++ code/trunk/src/util/Exception.h	(revision 3196)
@@ -30,5 +30,5 @@
 @file
 @brief
-    Declaration of the Exception class.
+    Declaration of facilities to handle exceptions.
 */
 
@@ -38,52 +38,73 @@
 #include "UtilPrereqs.h"
 
+#include <exception>
+#include <sstream>
 #include <string>
-#include <exception>
-#include <cassert>
 #include "Debug.h"
 
 namespace orxonox
 {
+    /**
+    @brief
+        Base class for all exceptions (derived from std::exception).
+    @details
+        This class provides support for information about the file, the line
+        and the function the error occured.
+    */
     class _UtilExport Exception : public std::exception
     {
     public:
-
-        Exception(const std::string& description, int lineNumber,
+        /**
+        @brief
+            Creates the exception but doesn't yet compose the full descrption (because of the virtual functions)
+        @param description
+            Exception description as string. This message is supposed to help developers!
+        */
+        Exception(const std::string& description, unsigned int lineNumber,
                   const char* filename, const char* functionName);
+        //! Simplified constructor with just a description. If you need more, use the other one.
         Exception(const std::string& description);
 
-        /// Needed for  compatibility with std::exception (from Ogre::Exception)
+        //! Needed for compatibility with std::exception
         virtual ~Exception() throw() { }
 
+        //! Returns a full description with type, line, file and function
         virtual const std::string& getFullDescription() const;
+        //! Returns the string name of the exception type
         virtual std::string        getTypeName()        const = 0;
+        //! Returns the short developer written exception
         virtual const std::string& getDescription()     const { return this->description_; }
-        virtual const int          getLineNumber()      const { return this->lineNumber_; }
+        //! Returns the line number on which the exception occurred.
+        virtual const unsigned int getLineNumber()      const { return this->lineNumber_; }
+        //! Returns the function in which the exception occurred.
         virtual const std::string& getFunctionName()    const { return this->functionName_; }
+        //! Returns the filename in which the exception occurred.
+        virtual const std::string& getFilename()        const { return this->filename_; }
 
-        /// Override std::exception::what (from Ogre::Exception)
+        //! Returns a full description of the error.
         const char* what() const throw() { return getFullDescription().c_str(); }
 
     protected:
-        std::string description_;
-        int lineNumber_;
-        std::string functionName_;
-        std::string filename_;
+        std::string description_;             //!< User typed text about why the exception occurred
+        unsigned int lineNumber_;             //!< Line on which the exception occurred
+        std::string functionName_;            //!< Function (including namespace and class) where the exception occurred
+        std::string filename_;                //!< File where the exception occurred
         // mutable because "what()" is a const method
-        mutable std::string fullDescription_;
+        mutable std::string fullDescription_; //!< Full description with line, file and function
     };
 
-
+//! Creates a new type of exception that inherits from tracker::Exception
 #define CREATE_ORXONOX_EXCEPTION(ExceptionName)                                     \
     class ExceptionName##Exception : public Exception                               \
     {                                                                               \
     public:                                                                         \
-        ExceptionName##Exception(const std::string& description, int lineNumber,    \
-                  const char* filename, const char* functionName)                   \
-                  : Exception(description, lineNumber, filename, functionName)      \
+        ExceptionName##Exception(const std::string& description,                    \
+                unsigned int lineNumber, const char* filename,                      \
+                const char* functionName)                                           \
+            : Exception(description, lineNumber, filename, functionName)            \
         { }                                                                         \
                                                                                     \
         ExceptionName##Exception(const std::string& description)                    \
-                  : Exception(description)                                          \
+            : Exception(description)                                                \
         { }                                                                         \
                                                                                     \
@@ -91,8 +112,9 @@
                                                                                     \
         std::string getTypeName() const { return #ExceptionName; }                  \
-    };
+    }
 
     // Creates all possible exception types.
     // If you want to add a new type, simply copy and adjust a new line here.
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
     CREATE_ORXONOX_EXCEPTION(General);
     CREATE_ORXONOX_EXCEPTION(FileNotFound);
@@ -106,12 +128,14 @@
     CREATE_ORXONOX_EXCEPTION(NoGraphics);
     CREATE_ORXONOX_EXCEPTION(AbortLoading);
-}
+#endif
 
     /**
     @brief
-        Helper function that creates an exception, displays the message, but doesn't throw it.
+        Helper function that forwards an exception and displays the message.
+    @details
+        This is necessary because only when using 'throw' the objects storage is managed.
     */
     template <class T>
-    inline const T& InternalHandleException(const T& exception)
+    inline const T& exceptionThrowerHelper(const T& exception)
     {
         // let the catcher decide whether to display the message below level 4
@@ -120,15 +144,16 @@
     }
 
-#define ThrowException(type, description) \
-    throw InternalHandleException(type##Exception(description, __LINE__, __FILE__, __FUNCTIONNAME__))
+/**
+@brief
+    Throws an exception and logs a message beforehand.
+@param type
+    Type of the exception as literal (General, Initialisation, etc.)
+@param description
+    Exception description as string
+*/
+#define ThrowException(type, description, ...) \
+    throw orxonox::exceptionThrowerHelper(type##Exception(static_cast<std::ostringstream&>(std::ostringstream().flush() << description).str(), __LINE__, __FILE__, __FUNCTIONNAME__))
 
-    // define an assert macro that can display a message
-#ifndef NDEBUG
-#define OrxAssert(Assertion, ErrorMessage) \
-    Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(ORX_ERROR) << ErrorMessage << std::endl); \
-    assert(Assertion)
-#else
-#define OrxAssert(condition, errorMessage)  ((void)0)
-#endif
+} /* namespace orxonox */
 
 #endif /* _Exception_H__ */
Index: code/trunk/src/util/ExprParser.cc
===================================================================
--- code/trunk/src/util/ExprParser.cc	(revision 3110)
+++ code/trunk/src/util/ExprParser.cc	(revision 3196)
@@ -35,5 +35,5 @@
 #include <cmath>
 #include <cstring>
-#include <stdlib.h>
+#include <cstdlib>
 
 // macros for easier if, else statements
@@ -247,9 +247,9 @@
             return 0;
         }
-        else if (*reading_stream > 47 && *reading_stream < 59 || *reading_stream == 46)
+        else if ((*reading_stream > 47 && *reading_stream < 59) || *reading_stream == 46)
         {  // number
             value = strtod(reading_stream, const_cast<char**>(&reading_stream));
         }
-        else if (*reading_stream > 64 && *reading_stream < 91 || *reading_stream > 96 && *reading_stream < 123 || *reading_stream == 46)
+        else if ((*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
         {  // variable or function
             char* word = new char[256];
@@ -384,5 +384,5 @@
         char* word = str;
         int counter = 0;
-        while (*reading_stream > 47 && *reading_stream < 58 || *reading_stream > 64 && *reading_stream < 91 || *reading_stream > 96 && *reading_stream < 123 || *reading_stream == 46)
+        while ((*reading_stream > 47 && *reading_stream < 58) || (*reading_stream > 64 && *reading_stream < 91) || (*reading_stream > 96 && *reading_stream < 123) || *reading_stream == 46)
         {
             *word++ = *reading_stream++;
Index: code/trunk/src/util/ExprParser.h
===================================================================
--- code/trunk/src/util/ExprParser.h	(revision 3110)
+++ code/trunk/src/util/ExprParser.h	(revision 3196)
@@ -72,7 +72,7 @@
 
         ExprParser(const std::string& str);
-        std::string& getRemains() { return  this->remains_; }
-        double       getResult()  { return  this->result_; }
-        bool         getSuccess() { return !this->failed_; }
+        const std::string& getRemains() { return  this->remains_; }
+        double             getResult()  { return  this->result_; }
+        bool               getSuccess() { return !this->failed_; }
 
     private:
Index: code/trunk/src/util/Math.cc
===================================================================
--- code/trunk/src/util/Math.cc	(revision 3110)
+++ code/trunk/src/util/Math.cc	(revision 3196)
@@ -35,8 +35,8 @@
 
 #include <OgrePlane.h>
+
 #include "MathConvert.h"
 #include "SubString.h"
-
-// Do not remove this include to avoid linker errors.
+// Do not remove this include, it avoids linker errors.
 #include "mbool.h"
 
@@ -238,7 +238,7 @@
         if (tokens.size() >= 2)
         {
-            if (!ConvertValue(&(output->x), tokens[0]))
-                return false;
-            if (!ConvertValue(&(output->y), tokens[1]))
+            if (!convertValue(&(output->x), tokens[0]))
+                return false;
+            if (!convertValue(&(output->y), tokens[1]))
                 return false;
 
@@ -261,9 +261,9 @@
         if (tokens.size() >= 3)
         {
-            if (!ConvertValue(&(output->x), tokens[0]))
-                return false;
-            if (!ConvertValue(&(output->y), tokens[1]))
-                return false;
-            if (!ConvertValue(&(output->z), tokens[2]))
+            if (!convertValue(&(output->x), tokens[0]))
+                return false;
+            if (!convertValue(&(output->y), tokens[1]))
+                return false;
+            if (!convertValue(&(output->z), tokens[2]))
                 return false;
 
@@ -286,11 +286,11 @@
         if (tokens.size() >= 4)
         {
-            if (!ConvertValue(&(output->x), tokens[0]))
-                return false;
-            if (!ConvertValue(&(output->y), tokens[1]))
-                return false;
-            if (!ConvertValue(&(output->z), tokens[2]))
-                return false;
-            if (!ConvertValue(&(output->w), tokens[3]))
+            if (!convertValue(&(output->x), tokens[0]))
+                return false;
+            if (!convertValue(&(output->y), tokens[1]))
+                return false;
+            if (!convertValue(&(output->z), tokens[2]))
+                return false;
+            if (!convertValue(&(output->w), tokens[3]))
                 return false;
 
@@ -309,11 +309,11 @@
         if (tokens.size() >= 4)
         {
-            if (!ConvertValue(&(output->w), tokens[0]))
-                return false;
-            if (!ConvertValue(&(output->x), tokens[1]))
-                return false;
-            if (!ConvertValue(&(output->y), tokens[2]))
-                return false;
-            if (!ConvertValue(&(output->z), tokens[3]))
+            if (!convertValue(&(output->w), tokens[0]))
+                return false;
+            if (!convertValue(&(output->x), tokens[1]))
+                return false;
+            if (!convertValue(&(output->y), tokens[2]))
+                return false;
+            if (!convertValue(&(output->z), tokens[3]))
                 return false;
 
@@ -332,13 +332,13 @@
         if (tokens.size() >= 3)
         {
-            if (!ConvertValue(&(output->r), tokens[0]))
-                return false;
-            if (!ConvertValue(&(output->g), tokens[1]))
-                return false;
-            if (!ConvertValue(&(output->b), tokens[2]))
+            if (!convertValue(&(output->r), tokens[0]))
+                return false;
+            if (!convertValue(&(output->g), tokens[1]))
+                return false;
+            if (!convertValue(&(output->b), tokens[2]))
                 return false;
             if (tokens.size() >= 4)
             {
-                if (!ConvertValue(&(output->a), tokens[3]))
+                if (!convertValue(&(output->a), tokens[3]))
                     return false;
             }
Index: code/trunk/src/util/Math.h
===================================================================
--- code/trunk/src/util/Math.h	(revision 3110)
+++ code/trunk/src/util/Math.h	(revision 3196)
@@ -37,8 +37,6 @@
 #include "UtilPrereqs.h"
 
-#include <ostream>
 #include <string>
 #include <cmath>
-#include <boost/static_assert.hpp>
 
 #include <OgreMath.h>
@@ -46,6 +44,4 @@
 #include <OgreVector3.h>
 #include <OgreVector4.h>
-#include <OgreMatrix3.h>
-#include <OgreMatrix4.h>
 #include <OgreQuaternion.h>
 #include <OgreColourValue.h>
@@ -58,32 +54,4 @@
 namespace orxonox
 {
-    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);
     _UtilExport std::istream& operator>>(std::istream& in, orxonox::Radian& radian);
@@ -217,4 +185,17 @@
     template <> inline orxonox::Quaternion  zeroise<orxonox::Quaternion>()  { return orxonox::Quaternion (0, 0, 0, 0); }
 
+    //! Provides zero value symbols that can be returned as reference
+    template <typename T>
+    struct NilValue
+    {
+        inline operator const T&() const
+        {
+            return value;
+        }
+        static T value;
+    };
+    template <typename T>
+    T NilValue<T>::value = zeroise<T>();
+
     /**
         @brief Interpolates between two values for a time between 0 and 1.
@@ -225,5 +206,5 @@
     */
     template <typename T>
-    T interpolate(float time, const T& start, const T& end)
+    inline T interpolate(float time, const T& start, const T& end)
     {
         return time * (end - start) + start;
@@ -238,5 +219,5 @@
     */
     template <typename T>
-    T interpolateSmooth(float time, const T& start, const T& end)
+    inline T interpolateSmooth(float time, const T& start, const T& end)
     {
         return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start;
@@ -248,5 +229,5 @@
     inline float rnd()
     {
-        return rand() / (RAND_MAX + 1.0);
+        return rand() / (RAND_MAX + 1.0f);
     }
 
@@ -275,5 +256,5 @@
     inline float rndsgn()
     {
-        return ((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
+        return static_cast<float>((rand() & 0x2) - 1); // rand() & 0x2 is either 2 or 0
     }
 
@@ -283,8 +264,8 @@
     {
     public:
-      IntVector2() : x(0), y(0) { }
-      IntVector2(int _x, int _y) : x(_x), y(_y) { }
-      int x;
-      int y;
+        IntVector2() : x(0), y(0) { }
+        IntVector2(int _x, int _y) : x(_x), y(_y) { }
+        int x;
+        int y;
     };
 
@@ -292,9 +273,9 @@
     {
     public:
-      IntVector3() : x(0), y(0), z(0) { }
-      IntVector3(int _x, int _y, int _z) : x(_x), y(_y), z(_z) { }
-      int x;
-      int y;
-      int z;
+        IntVector3() : x(0), y(0), z(0) { }
+        IntVector3(int _x, int _y, int _z) : x(_x), y(_y), z(_z) { }
+        int x;
+        int y;
+        int z;
     };
 }
Index: code/trunk/src/util/MathConvert.h
===================================================================
--- code/trunk/src/util/MathConvert.h	(revision 3110)
+++ code/trunk/src/util/MathConvert.h	(revision 3196)
@@ -50,5 +50,5 @@
     struct ConverterExplicit<orxonox::Vector2, std::string>
     {
-        static bool convert(std::string* output, const orxonox::Vector2& input)
+        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector2& input)
         {
             std::ostringstream ostream;
@@ -66,5 +66,5 @@
     struct ConverterExplicit<orxonox::Vector3, std::string>
     {
-        static bool convert(std::string* output, const orxonox::Vector3& input)
+        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector3& input)
         {
             std::ostringstream ostream;
@@ -82,5 +82,5 @@
     struct ConverterExplicit<orxonox::Vector4, std::string>
     {
-        static bool convert(std::string* output, const orxonox::Vector4& input)
+        FORCEINLINE static bool convert(std::string* output, const orxonox::Vector4& input)
         {
             std::ostringstream ostream;
@@ -98,5 +98,5 @@
     struct ConverterExplicit<orxonox::Quaternion, std::string>
     {
-        static bool convert(std::string* output, const orxonox::Quaternion& input)
+        FORCEINLINE static bool convert(std::string* output, const orxonox::Quaternion& input)
         {
             std::ostringstream ostream;
@@ -114,5 +114,5 @@
     struct ConverterExplicit<orxonox::ColourValue, std::string>
     {
-        static bool convert(std::string* output, const orxonox::ColourValue& input)
+        FORCEINLINE static bool convert(std::string* output, const orxonox::ColourValue& input)
         {
             std::ostringstream ostream;
@@ -156,5 +156,5 @@
     struct ConverterFallback<orxonox::Radian, ToType>
     {
-        static bool convert(ToType* output, const orxonox::Radian& input)
+        FORCEINLINE static bool convert(ToType* output, const orxonox::Radian& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueRadians());
@@ -166,5 +166,5 @@
     struct ConverterFallback<orxonox::Degree, ToType>
     {
-        static bool convert(ToType* output, const orxonox::Degree& input)
+        FORCEINLINE static bool convert(ToType* output, const orxonox::Degree& input)
         {
             return convertValue<Ogre::Real, ToType>(output, input.valueDegrees());
@@ -176,5 +176,5 @@
     struct ConverterFallback<FromType, orxonox::Radian>
     {
-        static bool convert(orxonox::Radian* output, const FromType& input)
+        FORCEINLINE static bool convert(orxonox::Radian* output, const FromType& input)
         {
             float temp;
@@ -193,5 +193,5 @@
     struct ConverterFallback<FromType, orxonox::Degree>
     {
-        static bool convert(orxonox::Degree* output, const FromType& input)
+        FORCEINLINE static bool convert(orxonox::Degree* output, const FromType& input)
         {
             float temp;
Index: code/trunk/src/util/MultiType.cc
===================================================================
--- code/trunk/src/util/MultiType.cc	(revision 3110)
+++ code/trunk/src/util/MultiType.cc	(revision 3196)
@@ -159,27 +159,27 @@
     }
 
-    MultiType::operator char()                 const { return (this->value_) ? ((this->value_->type_ == MT_char       ) ? ((MT_Value<char>                *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator unsigned char()        const { return (this->value_) ? ((this->value_->type_ == MT_uchar      ) ? ((MT_Value<unsigned char>       *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator short()                const { return (this->value_) ? ((this->value_->type_ == MT_short      ) ? ((MT_Value<short>               *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator unsigned short()       const { return (this->value_) ? ((this->value_->type_ == MT_ushort     ) ? ((MT_Value<unsigned short>      *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator int()                  const { return (this->value_) ? ((this->value_->type_ == MT_int        ) ? ((MT_Value<int>                 *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator unsigned int()         const { return (this->value_) ? ((this->value_->type_ == MT_uint       ) ? ((MT_Value<unsigned int>        *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator long()                 const { return (this->value_) ? ((this->value_->type_ == MT_long       ) ? ((MT_Value<long>                *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator unsigned long()        const { return (this->value_) ? ((this->value_->type_ == MT_ulong      ) ? ((MT_Value<unsigned long>       *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator long long()            const { return (this->value_) ? ((this->value_->type_ == MT_longlong   ) ? ((MT_Value<long long>           *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator unsigned long long()   const { return (this->value_) ? ((this->value_->type_ == MT_ulonglong  ) ? ((MT_Value<unsigned long long>  *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator float()                const { return (this->value_) ? ((this->value_->type_ == MT_float      ) ? ((MT_Value<float>               *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator double()               const { return (this->value_) ? ((this->value_->type_ == MT_double     ) ? ((MT_Value<double>              *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator long double()          const { return (this->value_) ? ((this->value_->type_ == MT_longdouble ) ? ((MT_Value<long double>         *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator bool()                 const { return (this->value_) ? ((this->value_->type_ == MT_bool       ) ? ((MT_Value<bool>                *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator void*()                const { return (this->value_) ? ((this->value_->type_ == MT_void       ) ? ((MT_Value<void*>               *)this->value_)->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator std::string()          const { return (this->value_) ? ((this->value_->type_ == MT_string     ) ? ((MT_Value<std::string>         *)this->value_)->value_ : (*this->value_)) : zeroise<std::string>();          } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Vector2()     const { return (this->value_) ? ((this->value_->type_ == MT_vector2    ) ? ((MT_Value<orxonox::Vector2>    *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Vector2>();     } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Vector3()     const { return (this->value_) ? ((this->value_->type_ == MT_vector3    ) ? ((MT_Value<orxonox::Vector3>    *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Vector3>();     } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Vector4()     const { return (this->value_) ? ((this->value_->type_ == MT_vector4    ) ? ((MT_Value<orxonox::Vector4>    *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Vector4>();     } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::ColourValue() const { return (this->value_) ? ((this->value_->type_ == MT_colourvalue) ? ((MT_Value<orxonox::ColourValue>*)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::ColourValue>(); } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Quaternion()  const { return (this->value_) ? ((this->value_->type_ == MT_quaternion ) ? ((MT_Value<orxonox::Quaternion> *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Quaternion>();  } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Radian()      const { return (this->value_) ? ((this->value_->type_ == MT_radian     ) ? ((MT_Value<orxonox::Radian>     *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Radian>();      } /** @brief Returns the current value, converted to the requested type. */
-    MultiType::operator orxonox::Degree()      const { return (this->value_) ? ((this->value_->type_ == MT_degree     ) ? ((MT_Value<orxonox::Degree>     *)this->value_)->value_ : (*this->value_)) : zeroise<orxonox::Degree>();      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator char()                 const { return (this->value_) ? ((this->value_->type_ == MT_char       ) ? (static_cast<MT_Value<char>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator unsigned char()        const { return (this->value_) ? ((this->value_->type_ == MT_uchar      ) ? (static_cast<MT_Value<unsigned char>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator short()                const { return (this->value_) ? ((this->value_->type_ == MT_short      ) ? (static_cast<MT_Value<short>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator unsigned short()       const { return (this->value_) ? ((this->value_->type_ == MT_ushort     ) ? (static_cast<MT_Value<unsigned short>      *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator int()                  const { return (this->value_) ? ((this->value_->type_ == MT_int        ) ? (static_cast<MT_Value<int>                 *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator unsigned int()         const { return (this->value_) ? ((this->value_->type_ == MT_uint       ) ? (static_cast<MT_Value<unsigned int>        *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator long()                 const { return (this->value_) ? ((this->value_->type_ == MT_long       ) ? (static_cast<MT_Value<long>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator unsigned long()        const { return (this->value_) ? ((this->value_->type_ == MT_ulong      ) ? (static_cast<MT_Value<unsigned long>       *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator long long()            const { return (this->value_) ? ((this->value_->type_ == MT_longlong   ) ? (static_cast<MT_Value<long long>           *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator unsigned long long()   const { return (this->value_) ? ((this->value_->type_ == MT_ulonglong  ) ? (static_cast<MT_Value<unsigned long long>  *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator float()                const { return (this->value_) ? ((this->value_->type_ == MT_float      ) ? (static_cast<MT_Value<float>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator double()               const { return (this->value_) ? ((this->value_->type_ == MT_double     ) ? (static_cast<MT_Value<double>              *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator long double()          const { return (this->value_) ? ((this->value_->type_ == MT_longdouble ) ? (static_cast<MT_Value<long double>         *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator bool()                 const { return (this->value_) ? ((this->value_->type_ == MT_bool       ) ? (static_cast<MT_Value<bool>                *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator void*()                const { return (this->value_) ? ((this->value_->type_ == MT_void       ) ? (static_cast<MT_Value<void*>               *>(this->value_))->value_ : (*this->value_)) : 0;                      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator std::string()          const { return (this->value_) ? ((this->value_->type_ == MT_string     ) ? (static_cast<MT_Value<std::string>         *>(this->value_))->value_ : (*this->value_)) : NilValue<std::string>();          } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Vector2()     const { return (this->value_) ? ((this->value_->type_ == MT_vector2    ) ? (static_cast<MT_Value<orxonox::Vector2>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector2>();     } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Vector3()     const { return (this->value_) ? ((this->value_->type_ == MT_vector3    ) ? (static_cast<MT_Value<orxonox::Vector3>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector3>();     } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Vector4()     const { return (this->value_) ? ((this->value_->type_ == MT_vector4    ) ? (static_cast<MT_Value<orxonox::Vector4>    *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Vector4>();     } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::ColourValue() const { return (this->value_) ? ((this->value_->type_ == MT_colourvalue) ? (static_cast<MT_Value<orxonox::ColourValue>*>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::ColourValue>(); } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Quaternion()  const { return (this->value_) ? ((this->value_->type_ == MT_quaternion ) ? (static_cast<MT_Value<orxonox::Quaternion> *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Quaternion>();  } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Radian()      const { return (this->value_) ? ((this->value_->type_ == MT_radian     ) ? (static_cast<MT_Value<orxonox::Radian>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Radian>();      } /** @brief Returns the current value, converted to the requested type. */
+    MultiType::operator orxonox::Degree()      const { return (this->value_) ? ((this->value_->type_ == MT_degree     ) ? (static_cast<MT_Value<orxonox::Degree>     *>(this->value_))->value_ : (*this->value_)) : NilValue<orxonox::Degree>();      } /** @brief Returns the current value, converted to the requested type. */
 
     template <> void MultiType::createNewValueContainer(const char& value)                 { this->value_ = new MT_Value<char>                (value, MT_char       ); } /** @brief Creates a new value container for the given type. */
Index: code/trunk/src/util/MultiType.h
===================================================================
--- code/trunk/src/util/MultiType.h	(revision 3110)
+++ code/trunk/src/util/MultiType.h	(revision 3196)
@@ -69,7 +69,11 @@
 #include "UtilPrereqs.h"
 
-#include <boost/static_assert.hpp>
-
-#include "Math.h"
+#include <cassert>
+#include <string>
+#include <OgreVector2.h>
+#include <OgreVector3.h>
+#include <OgreVector4.h>
+#include <OgreQuaternion.h>
+#include <OgreColourValue.h>
 
 namespace orxonox
@@ -441,5 +445,5 @@
             template <typename T> inline void changeValueContainer(const T& value) { if (this->value_) { delete this->value_; } this->createNewValueContainer<T>(value); }
             /** @brief Creates a new value container (works only with specialized types). */
-            template <typename T>        void createNewValueContainer(const T& value) { BOOST_STATIC_ASSERT(sizeof(T) == 0); return false; }
+            template <typename T>        void createNewValueContainer(const T& value) { /* STATIC ASSERT */ *****value; return false; }
 
             MT_ValueBase* value_; //!< A pointer to the value container
Index: code/trunk/src/util/MultiTypeValue.h
===================================================================
--- code/trunk/src/util/MultiTypeValue.h	(revision 3110)
+++ code/trunk/src/util/MultiTypeValue.h	(revision 3196)
@@ -38,8 +38,9 @@
 
 #include "UtilPrereqs.h"
+
+#include <cassert>
 #include "MathConvert.h"
 #include "MultiType.h"
 #include "Serialise.h"
-#include <cassert>
 
 namespace orxonox
@@ -75,51 +76,51 @@
         }
 
-        inline bool getValue(char*                 value) const { return ConvertValue<T, char                >(value, value_, 0); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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_, zeroise<std::string>         ()); } /** @brief 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_, zeroise<orxonox::Vector2>    ()); } /** @brief 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_, zeroise<orxonox::Vector3>    ()); } /** @brief 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_, zeroise<orxonox::Vector4>    ()); } /** @brief 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_, zeroise<orxonox::ColourValue>()); } /** @brief 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_, zeroise<orxonox::Quaternion> ()); } /** @brief 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_, zeroise<orxonox::Radian>     ()); } /** @brief 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_, zeroise<orxonox::Degree>     ()); } /** @brief Assigns the value to the given pointer. The value gets converted if the types don't match. */
-
-        inline bool setValue(const char& value)                 { return !(bHasDefaultValue_ = !ConvertValue<char                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const unsigned char& value)        { return !(bHasDefaultValue_ = !ConvertValue<unsigned char       , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const short& value)                { return !(bHasDefaultValue_ = !ConvertValue<short               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const unsigned short& value)       { return !(bHasDefaultValue_ = !ConvertValue<unsigned short      , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const int& value)                  { return !(bHasDefaultValue_ = !ConvertValue<int                 , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const unsigned int& value)         { return !(bHasDefaultValue_ = !ConvertValue<unsigned int        , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const long& value)                 { return !(bHasDefaultValue_ = !ConvertValue<long                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const unsigned long& value)        { return !(bHasDefaultValue_ = !ConvertValue<unsigned long       , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const long long& value)            { return !(bHasDefaultValue_ = !ConvertValue<long long           , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const unsigned long long& value)   { return !(bHasDefaultValue_ = !ConvertValue<unsigned long long  , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const float& value)                { return !(bHasDefaultValue_ = !ConvertValue<float               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const double& value)               { return !(bHasDefaultValue_ = !ConvertValue<double              , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const long double& value)          { return !(bHasDefaultValue_ = !ConvertValue<long double         , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const bool& value)                 { return !(bHasDefaultValue_ = !ConvertValue<bool                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(      void* const& value)          { return !(bHasDefaultValue_ = !ConvertValue<void*               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const std::string& value)          { return !(bHasDefaultValue_ = !ConvertValue<std::string         , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Vector2& value)     { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Vector2    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Vector3& value)     { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Vector3    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Vector4& value)     { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Vector4    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::ColourValue& value) { return !(bHasDefaultValue_ = !ConvertValue<orxonox::ColourValue, T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Quaternion& value)  { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Quaternion , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Radian& value)      { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Radian     , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
-        inline bool setValue(const orxonox::Degree& value)      { return !(bHasDefaultValue_ = !ConvertValue<orxonox::Degree     , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool getValue(char*                 value) const { return convertValue<T, char                >(value, value_, 0); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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); } /** @brief 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_, zeroise<std::string>         ()); } /** @brief 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_, zeroise<orxonox::Vector2>    ()); } /** @brief 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_, zeroise<orxonox::Vector3>    ()); } /** @brief 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_, zeroise<orxonox::Vector4>    ()); } /** @brief 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_, zeroise<orxonox::ColourValue>()); } /** @brief 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_, zeroise<orxonox::Quaternion> ()); } /** @brief 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_, zeroise<orxonox::Radian>     ()); } /** @brief 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_, zeroise<orxonox::Degree>     ()); } /** @brief Assigns the value to the given pointer. The value gets converted if the types don't match. */
+
+        inline bool setValue(const char& value)                 { return !(bHasDefaultValue_ = !convertValue<char                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const unsigned char& value)        { return !(bHasDefaultValue_ = !convertValue<unsigned char       , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const short& value)                { return !(bHasDefaultValue_ = !convertValue<short               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const unsigned short& value)       { return !(bHasDefaultValue_ = !convertValue<unsigned short      , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const int& value)                  { return !(bHasDefaultValue_ = !convertValue<int                 , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const unsigned int& value)         { return !(bHasDefaultValue_ = !convertValue<unsigned int        , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const long& value)                 { return !(bHasDefaultValue_ = !convertValue<long                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const unsigned long& value)        { return !(bHasDefaultValue_ = !convertValue<unsigned long       , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const long long& value)            { return !(bHasDefaultValue_ = !convertValue<long long           , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const unsigned long long& value)   { return !(bHasDefaultValue_ = !convertValue<unsigned long long  , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const float& value)                { return !(bHasDefaultValue_ = !convertValue<float               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const double& value)               { return !(bHasDefaultValue_ = !convertValue<double              , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const long double& value)          { return !(bHasDefaultValue_ = !convertValue<long double         , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const bool& value)                 { return !(bHasDefaultValue_ = !convertValue<bool                , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(      void* const& value)          { return !(bHasDefaultValue_ = !convertValue<void*               , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const std::string& value)          { return !(bHasDefaultValue_ = !convertValue<std::string         , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Vector2& value)     { return !(bHasDefaultValue_ = !convertValue<orxonox::Vector2    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Vector3& value)     { return !(bHasDefaultValue_ = !convertValue<orxonox::Vector3    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Vector4& value)     { return !(bHasDefaultValue_ = !convertValue<orxonox::Vector4    , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::ColourValue& value) { return !(bHasDefaultValue_ = !convertValue<orxonox::ColourValue, T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Quaternion& value)  { return !(bHasDefaultValue_ = !convertValue<orxonox::Quaternion , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Radian& value)      { return !(bHasDefaultValue_ = !convertValue<orxonox::Radian     , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
+        inline bool setValue(const orxonox::Degree& value)      { return !(bHasDefaultValue_ = !convertValue<orxonox::Degree     , T>(&value_, value, zeroise<T>())); } /** @brief Assigns the value by converting it to T. */
 
         inline operator char()                 const { return getConvertedValue<T, char>                (this->value_, 0); }     /** @brief Returns the current value, converted to the requested type. */
@@ -194,5 +195,6 @@
         saveAndIncrease( this->value_.z, mem );
         saveAndIncrease( this->value_.w, mem );
-    }template <> inline uint8_t MT_Value<Ogre::Quaternion>::getSize() const
+    }
+    template <> inline uint8_t MT_Value<Ogre::Quaternion>::getSize() const
     {
         return 4*returnSize(this->value_.x);
Index: code/trunk/src/util/OgreForwardRefs.h
===================================================================
--- code/trunk/src/util/OgreForwardRefs.h	(revision 3196)
+++ code/trunk/src/util/OgreForwardRefs.h	(revision 3196)
@@ -0,0 +1,227 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _OgreForwardRefs_H__
+#define _OgreForwardRefs_H__
+
+#include "UtilPrereqs.h"
+
+namespace Ogre
+{
+    class Angle;
+    class Animation;
+    class AnimationState;
+    class AnimationStateSet;
+    class AnimationTrack;
+    class Archive;
+    class ArchiveFactory;
+    class ArchiveManager;
+    class AutoParamDataSource;
+    class AxisAlignedBox;
+    class AxisAlignedBoxSceneQuery;
+    class Billboard;
+    class BillboardChain;
+    class BillboardSet;
+    class Bone;
+    class Camera;
+    class Codec;
+    class ColourValue;
+    class ConfigDialog;
+    template <typename T> class Controller;
+    template <typename T> class ControllerFunction;
+    class ControllerManager;
+    template <typename T> class ControllerValue;
+    class Degree;
+    class DynLib;
+    class DynLibManager;
+    class EdgeData;
+    class EdgeListBuilder;
+    class Entity;
+    class ErrorDialog;
+    class ExternalTextureSourceManager;
+    class Factory;
+    class Font;
+    class FontPtr;
+    class FontManager;
+    struct FrameEvent;
+    class FrameListener;
+    class Frustum;
+    class GpuProgram;
+    class GpuProgramPtr;
+    class GpuProgramManager;
+	class GpuProgramUsage;
+    class HardwareIndexBuffer;
+    class HardwareOcclusionQuery;
+    class HardwareVertexBuffer;
+	class HardwarePixelBuffer;
+    class HardwarePixelBufferSharedPtr;
+	class HighLevelGpuProgram;
+    class HighLevelGpuProgramPtr;
+	class HighLevelGpuProgramManager;
+	class HighLevelGpuProgramFactory;
+    class IndexData;
+    class IntersectionSceneQuery;
+    class IntersectionSceneQueryListener;
+    class Image;
+    class KeyFrame;
+    class Light;
+    class Log;
+    class LogManager;
+	class ManualResourceLoader;
+	class ManualObject;
+    class Material;
+    class MaterialPtr;
+    class MaterialManager;
+    class MaterialScriptCompiler;
+    class Math;
+    class Matrix3;
+    class Matrix4;
+    class MemoryManager;
+    class Mesh;
+    class MeshPtr;
+    class MeshSerializer;
+    class MeshSerializerImpl;
+    class MeshManager;
+    class MovableObject;
+    class MovablePlane;
+    class Node;
+	class NodeAnimationTrack;
+	class NodeKeyFrame;
+	class NumericAnimationTrack;
+	class NumericKeyFrame;
+    class Overlay;
+    class OverlayContainer;
+    class OverlayElement;
+    class OverlayElementFactory;
+    class OverlayManager;
+    class Particle;
+    class ParticleAffector;
+    class ParticleAffectorFactory;
+    class ParticleEmitter;
+    class ParticleEmitterFactory;
+    class ParticleSystem;
+    class ParticleSystemManager;
+    class ParticleSystemRenderer;
+    class ParticleSystemRendererFactory;
+    class ParticleVisualData;
+    class Pass;
+    class PatchMesh;
+    class PixelBox;
+    class Plane;
+    class PlaneBoundedVolume;
+	class Plugin;
+    class Pose;
+    class ProgressiveMesh;
+    class Profile;
+	class Profiler;
+    class Quaternion;
+	class Radian;
+    class Ray;
+    class RaySceneQuery;
+    class RaySceneQueryListener;
+    class Renderable;
+    class RenderPriorityGroup;
+    class RenderQueue;
+    class RenderQueueGroup;
+	class RenderQueueInvocation;
+	class RenderQueueInvocationSequence;
+    class RenderQueueListener;
+    class RenderSystem;
+    class RenderSystemCapabilities;
+    class RenderTarget;
+    class RenderTargetListener;
+    class RenderTexture;
+	class MultiRenderTarget;
+    class RenderWindow;
+    class RenderOperation;
+    class Resource;
+	class ResourceBackgroundQueue;
+	class ResourceGroupManager;
+    class ResourceManager;
+    class RibbonTrail;
+	class Root;
+    class SceneManager;
+    class SceneManagerEnumerator;
+    class SceneNode;
+    class SceneQuery;
+    class SceneQueryListener;
+	class ScriptLoader;
+    class Serializer;
+    class ShadowCaster;
+    class ShadowRenderable;
+	class ShadowTextureManager;
+    class SimpleRenderable;
+    class SimpleSpline;
+    class Skeleton;
+    class SkeletonPtr;
+    class SkeletonInstance;
+    class SkeletonManager;
+    class Sphere;
+    class SphereSceneQuery;
+	class StaticGeometry;
+    class StringConverter;
+    class StringInterface;
+    class SubEntity;
+    class SubMesh;
+	class TagPoint;
+    class Technique;
+	class TempBlendedBufferInfo;
+	class ExternalTextureSource;
+    class TextureUnitState;
+    class Texture;
+    class TexturePtr;
+	class TextureFont;
+    class TextureManager;
+    class TransformKeyFrame;
+	class Timer;
+    class UserDefinedObject;
+    class Vector2;
+    class Vector3;
+    class Vector4;
+    class Viewport;
+	class VertexAnimationTrack;
+    class VertexBufferBinding;
+    class VertexData;
+    class VertexDeclaration;
+	class VertexMorphKeyFrame;
+    class WireBoundingBox;
+    class Compositor;
+    class CompositorManager;
+    class CompositorChain;
+    class CompositorInstance;
+    class CompositionTechnique;
+    class CompositionPass;
+    class CompositionTargetPass;
+
+    // Originally not in OgrePrerequisites.h
+    class BorderPanelOverlayElement;
+    class PanelOverlayElement;
+    class TextAreaOverlayElement;
+}
+
+#endif /* _OgreForwardRefs_H__ */
Index: code/trunk/src/util/OrxAssert.h
===================================================================
--- code/trunk/src/util/OrxAssert.h	(revision 3196)
+++ code/trunk/src/util/OrxAssert.h	(revision 3196)
@@ -0,0 +1,52 @@
+/*
+ *   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 custom assertion facilities
+*/
+
+#ifndef _OrxAssert_H__
+#define _OrxAssert_H__
+
+#include "UtilPrereqs.h"
+
+#include <cassert>
+#include "OutputHandler.h"
+
+// define an assert macro that can display a message
+#ifndef NDEBUG
+#define OrxAssert(Assertion, ErrorMessage) \
+    Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(1) << ErrorMessage << std::endl); \
+    assert(Assertion)
+#else
+#define OrxAssert(condition, errorMessage)  ((void)0)
+#endif
+
+#endif /* _OrxAssert_H__ */
Index: code/trunk/src/util/OutputBuffer.cc
===================================================================
--- code/trunk/src/util/OutputBuffer.cc	(revision 3110)
+++ code/trunk/src/util/OutputBuffer.cc	(revision 3196)
@@ -44,5 +44,5 @@
     void OutputBuffer::registerListener(OutputBufferListener* listener)
     {
-        this->listeners_.insert(this->listeners_.end(), listener);
+        this->listeners_.push_back(listener);
     }
 
@@ -53,8 +53,8 @@
     void OutputBuffer::unregisterListener(OutputBufferListener* listener)
     {
-        for (std::list<OutputBufferListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); )
+        for (std::vector<OutputBufferListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); )
         {
             if ((*it) == listener)
-                this->listeners_.erase(it++);
+                it = this->listeners_.erase(it);
             else
                 ++it;
@@ -127,5 +127,5 @@
     void OutputBuffer::callListeners()
     {
-        for (std::list<OutputBufferListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
+        for (std::vector<OutputBufferListener*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
             (*it)->outputChanged();
     }
Index: code/trunk/src/util/OutputBuffer.h
===================================================================
--- code/trunk/src/util/OutputBuffer.h	(revision 3110)
+++ code/trunk/src/util/OutputBuffer.h	(revision 3196)
@@ -43,9 +43,8 @@
 #define _OutputBuffer_H__
 
-#include <list>
+#include "UtilPrereqs.h"
+
+#include <vector>
 #include <sstream>
-#include <iostream>
-
-#include "UtilPrereqs.h"
 
 namespace orxonox
@@ -167,6 +166,6 @@
             void callListeners();
 
-            std::stringstream stream_;                   //!< The stringstream that stores the assigned text
-            std::list<OutputBufferListener*> listeners_; //!< A list of all listeners
+            std::stringstream stream_;                     //!< The stringstream that stores the assigned text
+            std::vector<OutputBufferListener*> listeners_; //!< A list of all listeners
     };
 }
Index: code/trunk/src/util/OutputHandler.h
===================================================================
--- code/trunk/src/util/OutputHandler.h	(revision 3110)
+++ code/trunk/src/util/OutputHandler.h	(revision 3196)
@@ -63,21 +63,21 @@
 
             /** @brief Puts some text on the outstream. @param text The text */
-            static inline std::string log(const std::string& text)
+            static inline const std::string& log(const std::string& text)
                 { OutputHandler::getOutStream().setOutputLevel(0); OutputHandler::getOutStream().output(text + "\n"); return text; }
 
             /** @brief Puts an error on the outstream. @param text The text */
-            static inline std::string error(const std::string& text)
+            static inline const std::string& error(const std::string& text)
                 { OutputHandler::getOutStream().setOutputLevel(1); OutputHandler::getOutStream().output(text + "\n"); return text; }
 
             /** @brief Puts a warning on the outstream. @param text The text */
-            static inline std::string warning(const std::string& text)
+            static inline const std::string& warning(const std::string& text)
                 { OutputHandler::getOutStream().setOutputLevel(2); OutputHandler::getOutStream().output(text + "\n"); return text; }
 
             /** @brief Puts an info on the outstream. @param text The text */
-            static inline std::string info(const std::string& text)
+            static inline const std::string& info(const std::string& text)
                 { OutputHandler::getOutStream().setOutputLevel(3); OutputHandler::getOutStream().output(text + "\n"); return text; }
 
             /** @brief Puts some debug output on the outstream. @param text The text */
-            static inline std::string debug(const std::string& text)
+            static inline const std::string& debug(const std::string& text)
                 { OutputHandler::getOutStream().setOutputLevel(4); OutputHandler::getOutStream().output(text + "\n"); return text; }
 
Index: code/trunk/src/util/SignalHandler.cc
===================================================================
--- code/trunk/src/util/SignalHandler.cc	(revision 3110)
+++ code/trunk/src/util/SignalHandler.cc	(revision 3196)
@@ -33,9 +33,9 @@
 
 #include "SignalHandler.h"
-#include "Debug.h"
 
 #include <iostream>
 #include <cstdlib>
 #include <cstring>
+#include "Debug.h"
 
 namespace orxonox
@@ -209,10 +209,10 @@
       {
         if (
-          charsFound == 0 && byte == '(' ||
-          charsFound == 1 && byte == 'g' ||
-          charsFound == 2 && byte == 'd' ||
-          charsFound == 3 && byte == 'b' ||
-          charsFound == 4 && byte == ')' ||
-          charsFound == 5 && byte == ' '
+          (charsFound == 0 && byte == '(') ||
+          (charsFound == 1 && byte == 'g') ||
+          (charsFound == 2 && byte == 'd') ||
+          (charsFound == 3 && byte == 'b') ||
+          (charsFound == 4 && byte == ')') ||
+          (charsFound == 5 && byte == ' ')
             )
               charsFound++;
@@ -246,10 +246,10 @@
 
         if (
-          charsFound == 0 && byte == '(' ||
-          charsFound == 1 && byte == 'g' ||
-          charsFound == 2 && byte == 'd' ||
-          charsFound == 3 && byte == 'b' ||
-          charsFound == 4 && byte == ')' ||
-          charsFound == 5 && byte == ' '
+          (charsFound == 0 && byte == '(') ||
+          (charsFound == 1 && byte == 'g') ||
+          (charsFound == 2 && byte == 'd') ||
+          (charsFound == 3 && byte == 'b') ||
+          (charsFound == 4 && byte == ')') ||
+          (charsFound == 5 && byte == ' ')
             )
               charsFound++;
Index: code/trunk/src/util/Sleep.cc
===================================================================
--- code/trunk/src/util/Sleep.cc	(revision 3110)
+++ code/trunk/src/util/Sleep.cc	(revision 3196)
@@ -28,6 +28,7 @@
 
 /**
-    @file
-    @brief Implementation of three sleep functions.
+@file
+@brief
+    Implementation of three sleep functions. Avoids including windows.h
 */
 
@@ -43,5 +44,5 @@
     {
         if (microseconds < 1000)
-            COUT(2) << "Warning: Windows can not sleep less than 1ms, ignoring" << std::endl;
+            COUT(2) << "Warning: Windows cannot sleep less than 1ms, ignoring" << std::endl;
         Sleep(microseconds / 1000);
     }
Index: code/trunk/src/util/Sleep.h
===================================================================
--- code/trunk/src/util/Sleep.h	(revision 3110)
+++ code/trunk/src/util/Sleep.h	(revision 3196)
@@ -28,7 +28,7 @@
 
 /**
- @file
- @brief
-    Functions for using sleep() and usleep() on windows.
+@file
+@brief
+    Functions declarations to make the current thread sleep.
  */
 
@@ -40,6 +40,9 @@
 namespace orxonox
 {
+    //! Makes the thread sleep for a few @a microseconds
     _UtilExport void usleep(unsigned long microseconds);
+    //! Makes the thread sleep for a few @a milliseconds
     _UtilExport void msleep(unsigned long milliseconds);
+    //! Makes the thread sleep for a few @a seconds
     _UtilExport void sleep (unsigned long seconds);
 }
Index: code/trunk/src/util/String.cc
===================================================================
--- code/trunk/src/util/String.cc	(revision 3110)
+++ code/trunk/src/util/String.cc	(revision 3196)
@@ -35,6 +35,4 @@
 
 #include <cctype>
-#include <iostream>
-
 #include "Convert.h"
 #include "Math.h"
Index: code/trunk/src/util/String.h
===================================================================
--- code/trunk/src/util/String.h	(revision 3110)
+++ code/trunk/src/util/String.h	(revision 3196)
@@ -36,7 +36,5 @@
 
 #include "UtilPrereqs.h"
-
 #include <string>
-#include <sstream>
 
 namespace orxonox
Index: code/trunk/src/util/SubString.cc
===================================================================
--- code/trunk/src/util/SubString.cc	(revision 3110)
+++ code/trunk/src/util/SubString.cc	(revision 3196)
@@ -39,5 +39,5 @@
 
 #include "SubString.h"
-#include <stdio.h>
+#include <cstdio>
 
 namespace orxonox
Index: code/trunk/src/util/UTFStringConversions.h
===================================================================
--- code/trunk/src/util/UTFStringConversions.h	(revision 3196)
+++ code/trunk/src/util/UTFStringConversions.h	(revision 3196)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ */
+
+/**
+@file
+@brief
+    std::sring to Ogre::UTFString conversion functions
+*/
+
+#ifndef _UTFStringConversions_H__
+#define _UTFStringConversions_H__
+
+#include "UtilPrereqs.h"
+#include <OgreUTFString.h>
+
+namespace orxonox
+{
+    template <>
+    struct ConverterExplicit<std::string, Ogre::UTFString>
+    {
+        //! Converts an std::string into an Ogre::UTFString
+        inline static bool convert(Ogre::UTFString* output, const std::string& input)
+        {
+            Ogre::UTFString::code_point cp;
+            for (unsigned int i = 0; i < input.size(); ++i)
+            {
+              cp = input[i];
+              cp &= 0xFF;
+              output->append(1, cp);
+            }
+            return true;
+        }
+    };
+}
+
+#endif /* _UTFStringConversions_H__ */
Index: code/trunk/src/util/UtilPrereqs.h
===================================================================
--- code/trunk/src/util/UtilPrereqs.h	(revision 3110)
+++ code/trunk/src/util/UtilPrereqs.h	(revision 3196)
@@ -60,6 +60,29 @@
 // Forward declarations
 //-----------------------------------------------------------------------
+namespace Ogre
+{
+    class Radian;
+    class Degree;
+    class Vector2;
+    class Vector3;
+    class Vector4;
+    class Matrix3;
+    class Matrix4;
+    class Quaternion;
+    class ColourValue;
+}
+
 namespace orxonox
 {
+    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;
+
     class Exception;
     class ExprParser;
Index: code/trunk/src/util/mbool.h
===================================================================
--- code/trunk/src/util/mbool.h	(revision 3110)
+++ code/trunk/src/util/mbool.h	(revision 3196)
@@ -36,5 +36,4 @@
     struct _UtilExport mbool
     {
-//        friend Synchronisable::registerVariable<>()
         public:
             inline mbool(bool value = false)
