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
