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__ */
