Index: code/trunk/src/orxonox/objects/worldentities/Backlight.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Backlight.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Backlight.cc	(revision 3280)
@@ -29,4 +29,5 @@
 #include "Backlight.h"
 
+#include <algorithm>
 #include <OgreRibbonTrail.h>
 #include <OgreSceneManager.h>
@@ -108,9 +109,9 @@
     void Backlight::registerVariables()
     {
-        registerVariable(this->width_,         variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
-        registerVariable(this->lifetime_,      variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
-        registerVariable(this->length_,        variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
-        registerVariable(this->maxelements_,   variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
-        registerVariable(this->trailmaterial_, variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
+        registerVariable(this->width_,         VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
+        registerVariable(this->lifetime_,      VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
+        registerVariable(this->length_,        VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
+        registerVariable(this->maxelements_,   VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
+        registerVariable(this->trailmaterial_, VariableDirection::ToClient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
     }
 
@@ -175,5 +176,5 @@
     void Backlight::stopturnonoff()
     {
-        this->postprocessingtime_ = max(0.0f, this->lifetime_ - this->turnofftime_);
+        this->postprocessingtime_ = std::max(0.0f, this->lifetime_ - this->turnofftime_);
 
         FadingBillboard::stopturnonoff();
Index: code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/BigExplosion.cc	(revision 3280)
@@ -56,5 +56,5 @@
 */
         this->bStop_ = false;
-        this->LOD_ = LODParticle::normal;
+        this->LOD_ = LODParticle::Normal;
 
 /*      this->stf_ = "setTimeFactor ";
@@ -307,6 +307,6 @@
     void BigExplosion::registerVariables()
     {
-        registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
-        registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
+        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::LODchanged));
+        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<BigExplosion>(this, &BigExplosion::checkStop));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/BigExplosion.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/BigExplosion.h	(revision 3280)
@@ -47,7 +47,7 @@
             void registerVariables();
 
-            inline void setLOD(LODParticle::LOD level)
+            inline void setLOD(LODParticle::Value level)
                 { this->LOD_ = level; this->LODchanged(); }
-            inline LODParticle::LOD getLOD() const
+            inline LODParticle::Value getLOD() const
                 { return this->LOD_; }
 
@@ -98,5 +98,5 @@
             ParticleInterface*    explosionFire_;
 
-            LODParticle::LOD      LOD_;
+            LODParticle::Value      LOD_;
             Timer<BigExplosion> destroyTimer_;
     };
Index: code/trunk/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Billboard.cc	(revision 3280)
@@ -69,7 +69,7 @@
     void Billboard::registerVariables()
     {
-        registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
-        registerVariable(this->colour_,   variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
-//        registerVariable(this->rotation_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
+        registerVariable(this->material_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
+        registerVariable(this->colour_,   VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
+//        registerVariable(this->rotation_, VariableDirection::ToClient, new NetworkCallback<Billboard>(this, &Billboard::changedRotation));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/BlinkingBillboard.cc	(revision 3280)
@@ -66,7 +66,7 @@
     void BlinkingBillboard::registerVariables()
     {
-//        registerVariable(this->amplitude_, variableDirection::toclient);
-//        registerVariable(this->frequency_, variableDirection::toclient);
-//        registerVariable(this->phase_,     variableDirection::toclient);
+//        registerVariable(this->amplitude_, VariableDirection::ToClient);
+//        registerVariable(this->frequency_, VariableDirection::ToClient);
+//        registerVariable(this->phase_,     VariableDirection::ToClient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Camera.cc	(revision 3280)
@@ -29,4 +29,5 @@
 #include "Camera.h"
 
+#include <algorithm>
 #include <OgreCamera.h>
 #include <OgreSceneManager.h>
@@ -34,5 +35,5 @@
 
 #include "util/Exception.h"
-#include "util/String.h"
+#include "util/StringUtils.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
@@ -104,5 +105,5 @@
         {
             // this stuff here may need some adjustments
-            float coeff = min(1.0f, 15.0f * dt);
+            float coeff = std::min(1.0f, 15.0f * dt);
 
             Vector3 offset = this->getWorldPosition() - this->cameraNode_->_getDerivedPosition();
Index: code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 3280)
@@ -79,5 +79,5 @@
 
         this->setConfigValues();
-        this->setPriority( priority::very_high );
+        this->setPriority( Priority::VeryHigh );
         this->registerVariables();
     }
@@ -238,5 +238,5 @@
             {
                 this->client_overwrite_ = this->server_overwrite_;
-                this->setObjectMode(objectDirection::bidirectional);
+                this->setObjectMode(ObjectDirection::Bidirectional);
             }
         }
@@ -254,5 +254,5 @@
         this->bHasLocalController_ = false;
         this->bHasHumanController_ = false;
-        this->setObjectMode(objectDirection::toclient);
+        this->setObjectMode(ObjectDirection::ToClient);
 
         this->changedPlayer();
@@ -368,22 +368,22 @@
     void ControllableEntity::registerVariables()
     {
-        registerVariable(this->cameraPositionTemplate_,  variableDirection::toclient);
-        registerVariable(this->hudtemplate_,             variableDirection::toclient);
-
-        registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
-        registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
-        registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
-        registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
-
-        registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
-        registerVariable(this->client_overwrite_,        variableDirection::toserver);
-
-        registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
-        registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
-        registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
-        registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
+        registerVariable(this->cameraPositionTemplate_,  VariableDirection::ToClient);
+        registerVariable(this->hudtemplate_,             VariableDirection::ToClient);
+
+        registerVariable(this->server_position_,         VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
+        registerVariable(this->server_linear_velocity_,  VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
+        registerVariable(this->server_orientation_,      VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
+        registerVariable(this->server_angular_velocity_, VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
+
+        registerVariable(this->server_overwrite_,        VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
+        registerVariable(this->client_overwrite_,        VariableDirection::ToServer);
+
+        registerVariable(this->client_position_,         VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
+        registerVariable(this->client_linear_velocity_,  VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
+        registerVariable(this->client_orientation_,      VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
+        registerVariable(this->client_angular_velocity_, VariableDirection::ToServer, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
         
 
-        registerVariable(this->playerID_,                variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
+        registerVariable(this->playerID_,                VariableDirection::ToClient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.cc	(revision 3280)
@@ -48,5 +48,5 @@
 
         this->bStop_ = false;
-        this->LOD_ = LODParticle::normal;
+        this->LOD_ = LODParticle::Normal;
 
         if ( GameMode::showsGraphics() )
@@ -104,6 +104,6 @@
     void ExplosionChunk::registerVariables()
     {
-        registerVariable((int&)(this->LOD_), variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
-        registerVariable(this->bStop_,       variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
+        registerVariable((int&)(this->LOD_), VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
+        registerVariable(this->bStop_,       VariableDirection::ToClient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/ExplosionChunk.h	(revision 3280)
@@ -46,7 +46,7 @@
             void registerVariables();
 
-            inline void setLOD(LODParticle::LOD level)
+            inline void setLOD(LODParticle::Value level)
                 { this->LOD_ = level; this->LODchanged(); }
-            inline LODParticle::LOD getLOD() const
+            inline LODParticle::Value getLOD() const
                 { return this->LOD_; }
 
@@ -60,5 +60,5 @@
             ParticleInterface*    fire_;
             ParticleInterface*    smoke_;
-            LODParticle::LOD      LOD_;
+            LODParticle::Value      LOD_;
             Timer<ExplosionChunk> destroyTimer_;
     };
Index: code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/FadingBillboard.cc	(revision 3280)
@@ -64,6 +64,6 @@
     void FadingBillboard::registerVariables()
     {
-        registerVariable(this->turnontime_,  variableDirection::toclient);
-        registerVariable(this->turnofftime_, variableDirection::toclient);
+        registerVariable(this->turnontime_,  VariableDirection::ToClient);
+        registerVariable(this->turnofftime_, VariableDirection::ToClient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/Light.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Light.cc	(revision 3280)
@@ -33,5 +33,5 @@
 #include <boost/static_assert.hpp>
 
-#include "util/String.h"
+#include "util/StringUtils.h"
 #include "util/Exception.h"
 #include "core/CoreIncludes.h"
@@ -45,7 +45,7 @@
 
     // 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);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_POINT       == (int)Light::Point);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_DIRECTIONAL == (int)Light::Directional);
+    BOOST_STATIC_ASSERT((int)Ogre::Light::LT_SPOTLIGHT   == (int)Light::Spotlight);
 
     Light::Light(BaseObject* creator) : StaticEntity(creator)
@@ -56,5 +56,5 @@
         this->diffuse_ = ColourValue::White;
         this->specular_ = ColourValue::White;
-        this->type_ = Light::LT_POINT;
+        this->type_ = Light::Point;
         this->attenuation_ = Vector4(100000, 1, 0, 0);
         this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
@@ -106,9 +106,9 @@
     void Light::registerVariables()
     {
-        registerVariable((int&)this->type_,     variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateType));
-        registerVariable(this->diffuse_,        variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
-        registerVariable(this->specular_,       variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
-        registerVariable(this->attenuation_,    variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
-        registerVariable(this->spotlightRange_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
+        registerVariable((int&)this->type_,     VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateType));
+        registerVariable(this->diffuse_,        VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
+        registerVariable(this->specular_,       VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
+        registerVariable(this->attenuation_,    VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
+        registerVariable(this->spotlightRange_, VariableDirection::ToClient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
     }
 
@@ -127,5 +127,5 @@
     void Light::updateAttenuation()
     {
-        if (this->light_ && this->type_ != Light::LT_DIRECTIONAL)
+        if (this->light_ && this->type_ != Light::Directional)
             this->light_->setAttenuation(this->attenuation_.x, this->attenuation_.y, this->attenuation_.z, this->attenuation_.w);
     }
@@ -133,5 +133,5 @@
     void Light::updateSpotlightRange()
     {
-        if (this->light_ && this->type_ == Light::LT_SPOTLIGHT)
+        if (this->light_ && this->type_ == Light::Spotlight)
             this->light_->setSpotlightRange(Degree(this->spotlightRange_.x), Degree(this->spotlightRange_.y), this->spotlightRange_.z);
     }
@@ -140,11 +140,11 @@
     {
         if (type == "point")
-            this->setType(Light::LT_POINT);
+            this->setType(Light::Point);
         else if (type == "directional")
-            this->setType(Light::LT_DIRECTIONAL);
+            this->setType(Light::Directional);
         else if (type == "spotlight")
-            this->setType(Light::LT_SPOTLIGHT);
+            this->setType(Light::Spotlight);
         else
-            this->setType(Light::LT_POINT);
+            this->setType(Light::Point);
     }
 
@@ -153,9 +153,9 @@
         switch (this->type_)
         {
-            case Light::LT_DIRECTIONAL:
+            case Light::Directional:
                 return "directional";
-            case Light::LT_SPOTLIGHT:
+            case Light::Spotlight:
                 return "spotlight";
-            case Light::LT_POINT:
+            case Light::Point:
             default:
                 return "point";
@@ -169,7 +169,7 @@
             this->light_->setType(static_cast<Ogre::Light::LightTypes>(this->type_));
 
-            if (this->type_ != Light::LT_DIRECTIONAL)
+            if (this->type_ != Light::Directional)
                 this->updateAttenuation();
-            if (this->type_ == Light::LT_SPOTLIGHT)
+            if (this->type_ == Light::Spotlight)
                 this->updateSpotlightRange();
         }
Index: code/trunk/src/orxonox/objects/worldentities/Light.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Light.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Light.h	(revision 3280)
@@ -45,9 +45,9 @@
             {
                 /// Point light sources give off light equally in all directions, so require only position not direction
-                LT_POINT,
+                Point,
                 /// Directional lights simulate parallel light beams from a distant source, hence have direction but no position
-                LT_DIRECTIONAL,
+                Directional,
                 /// Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff
-                LT_SPOTLIGHT
+                Spotlight
             };
 
Index: code/trunk/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Model.cc	(revision 3280)
@@ -65,6 +65,6 @@
     void Model::registerVariables()
     {
-        registerVariable(this->meshSrc_,    variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
-        registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
+        registerVariable(this->meshSrc_,    VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedMesh));
+        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Model>(this, &Model::changedShadows));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 3280)
@@ -52,5 +52,5 @@
         this->continuousResynchroTimer_ = 0;
 
-        this->setPriority(priority::low);
+        this->setPriority(Priority::Low);
 
         this->registerVariables();
@@ -89,9 +89,9 @@
     void MovableEntity::registerVariables()
     {
-        registerVariable(this->linearVelocity_,        variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
-        registerVariable(this->angularVelocity_,       variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
+        registerVariable(this->linearVelocity_,        VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
+        registerVariable(this->angularVelocity_,       VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
 
-        registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
-        registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
+        registerVariable(this->overwrite_position_,    VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
+        registerVariable(this->overwrite_orientation_, VariableDirection::ToClient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 3280)
@@ -53,5 +53,5 @@
 
         this->particles_ = 0;
-        this->LOD_ = LODParticle::normal;
+        this->LOD_ = LODParticle::Normal;
 
         this->registerVariables();
@@ -71,5 +71,5 @@
         SUPER(ParticleEmitter, XMLPort, xmlelement, mode);
 
-        XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::normal);
+        XMLPortParam(ParticleEmitter, "lod",    setLODxml, getLODxml, xmlelement, mode).defaultValues(LODParticle::Normal);
         XMLPortParam(ParticleEmitter, "source", setSource, getSource, xmlelement, mode);
     }
@@ -77,6 +77,6 @@
     void ParticleEmitter::registerVariables()
     {
-        registerVariable(this->source_, variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
-        registerVariable((int&)(this->LOD_),    variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
+        registerVariable(this->source_, VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
+        registerVariable((int&)(this->LOD_),    VariableDirection::ToClient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 3280)
@@ -57,12 +57,12 @@
                 { return this->source_; }
 
-            inline void setLOD(LODParticle::LOD level)
+            inline void setLOD(LODParticle::Value level)
                 { this->LOD_ = level; this->LODchanged(); }
-            inline LODParticle::LOD getLOD() const
+            inline LODParticle::Value getLOD() const
                 { return this->LOD_; }
 
         protected:
             inline void setLODxml(unsigned int level)
-                { this->LOD_ = (LODParticle::LOD)level; this->LODchanged(); }
+                { this->LOD_ = (LODParticle::Value)level; this->LODchanged(); }
             inline unsigned int getLODxml() const
                 { return (unsigned int)this->LOD_; }
@@ -73,5 +73,5 @@
             ParticleInterface* particles_;
             std::string        source_;
-            LODParticle::LOD   LOD_;
+            LODParticle::Value   LOD_;
     };
 }
Index: code/trunk/src/orxonox/objects/worldentities/Planet.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/Planet.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/Planet.cc	(revision 3280)
@@ -157,9 +157,9 @@
     void Planet::registerVariables()
     {
-        registerVariable(this->atmosphere_, variableDirection::toclient);
-        registerVariable(this->meshSrc_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
-        registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
-        registerVariable(this->atmosphereSize, variableDirection::toclient);
-        registerVariable(this->imageSize, variableDirection::toclient);
+        registerVariable(this->atmosphere_, VariableDirection::ToClient);
+        registerVariable(this->meshSrc_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
+        registerVariable(this->bCastShadows_, VariableDirection::ToClient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
+        registerVariable(this->atmosphereSize, VariableDirection::ToClient);
+        registerVariable(this->imageSize, VariableDirection::ToClient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/PongBall.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/PongBall.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/PongBall.cc	(revision 3280)
@@ -72,5 +72,5 @@
         registerVariable( this->relMercyOffset_ );
         registerVariable( this->batID_[0] );
-        registerVariable( this->batID_[1], variableDirection::toclient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
+        registerVariable( this->batID_[1], VariableDirection::ToClient, new NetworkCallback<PongBall>( this, &PongBall::applyBats) );
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 3280)
@@ -43,5 +43,5 @@
         RegisterObject(StaticEntity);
         
-        this->setPriority(priority::very_low);
+        this->setPriority(Priority::VeryLow);
 
         this->registerVariables();
@@ -54,6 +54,6 @@
     void StaticEntity::registerVariables()
     {
-        registerVariable(this->getPosition(),    variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
-        registerVariable(this->getOrientation(), variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
+        registerVariable(this->getPosition(),    VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
+        registerVariable(this->getOrientation(), VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 3280)
@@ -175,29 +175,29 @@
     void WorldEntity::registerVariables()
     {
-        registerVariable(this->mainStateName_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
-
-        registerVariable(this->bActive_,        variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
-        registerVariable(this->bVisible_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
-
-        registerVariable(this->getScale3D(),    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
+        registerVariable(this->mainStateName_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
+
+        registerVariable(this->bActive_,        VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
+        registerVariable(this->bVisible_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
+
+        registerVariable(this->getScale3D(),    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
 
         // Physics stuff
-        registerVariable(this->mass_,           variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
-        registerVariable(this->restitution_,    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
-        registerVariable(this->angularFactor_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
-        registerVariable(this->linearDamping_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
-        registerVariable(this->angularDamping_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
-        registerVariable(this->friction_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
+        registerVariable(this->mass_,           VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
+        registerVariable(this->restitution_,    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
+        registerVariable(this->angularFactor_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
+        registerVariable(this->linearDamping_,  VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
+        registerVariable(this->angularDamping_, VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
+        registerVariable(this->friction_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
         registerVariable(this->bCollisionCallbackActive_,
-                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
         registerVariable(this->bCollisionResponseActive_,
-                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionResponseActivityChanged));
         registerVariable((int&)this->collisionTypeSynchronised_,
-                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
         registerVariable(this->bPhysicsActiveSynchronised_,
-                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
 
         // Attach to parent if necessary
-        registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
+        registerVariable(this->parentID_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 3280)
@@ -28,4 +28,6 @@
 
 #include "Pawn.h"
+
+#include <algorithm>
 
 #include "core/CoreIncludes.h"
@@ -117,8 +119,8 @@
     void Pawn::registerVariables()
     {
-        registerVariable(this->bAlive_,        variableDirection::toclient);
-        registerVariable(this->health_,        variableDirection::toclient);
-        registerVariable(this->initialHealth_, variableDirection::toclient);
-        registerVariable(this->bReload_,       variableDirection::toserver);
+        registerVariable(this->bAlive_,        VariableDirection::ToClient);
+        registerVariable(this->health_,        VariableDirection::ToClient);
+        registerVariable(this->initialHealth_, VariableDirection::ToClient);
+        registerVariable(this->bReload_,       VariableDirection::ToServer);
     }
 
@@ -152,5 +154,5 @@
     void Pawn::setHealth(float health)
     {
-        this->health_ = min(health, this->maxHealth_);
+        this->health_ = std::min(health, this->maxHealth_);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 3280)
@@ -90,7 +90,7 @@
     void SpaceShip::registerVariables()
     {
-        registerVariable(this->primaryThrust_,  variableDirection::toclient);
-        registerVariable(this->auxilaryThrust_, variableDirection::toclient);
-        registerVariable(this->rotationThrust_, variableDirection::toclient);
+        registerVariable(this->primaryThrust_,  VariableDirection::ToClient);
+        registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
+        registerVariable(this->rotationThrust_, VariableDirection::ToClient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 3280)
@@ -93,6 +93,6 @@
     void Spectator::registerVariables()
     {
-        registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
-        registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
+        registerVariable(this->bGreetingFlareVisible_, VariableDirection::ToClient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
+        registerVariable(this->bGreeting_,             VariableDirection::ToServer, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     }
 
@@ -145,5 +145,5 @@
         ControllableEntity::setPlayer(player);
 
-//        this->setObjectMode(objectDirection::toclient);
+//        this->setObjectMode(ObjectDirection::ToClient);
     }
 
Index: code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 3280)
@@ -43,5 +43,5 @@
         RegisterObject(TeamBaseMatchBase);
 
-        this->state_ = BaseState::uncontrolled;
+        this->state_ = BaseState::Uncontrolled;
 
         TeamBaseMatch* gametype = dynamic_cast<TeamBaseMatch*>(this->getGametype());
@@ -66,11 +66,11 @@
         switch (this->state_)
         {
-            case BaseState::controlTeam1:
+            case BaseState::ControlTeam1:
                 colour = gametype->getTeamColour(0);
                 break;
-            case BaseState::controlTeam2:
+            case BaseState::ControlTeam2:
                 colour = gametype->getTeamColour(1);
                 break;
-            case BaseState::uncontrolled:
+            case BaseState::Uncontrolled:
             default:
                 colour = ColourValue(0.5, 0.5, 0.5, 1.0);
Index: code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 3280)
@@ -38,9 +38,9 @@
     namespace BaseState
     {
-        enum Enum
+        enum Value
         {
-            uncontrolled,
-            controlTeam1,
-            controlTeam2,
+            Uncontrolled,
+            ControlTeam1,
+            ControlTeam2,
         };
     }
@@ -58,5 +58,5 @@
 
             // Set the state of a base to whatever the argument of the function is
-            void setState(BaseState::Enum state)
+            void setState(BaseState::Value state)
             {
                 this->state_ = state;
@@ -66,5 +66,5 @@
 
             // Get the state of a base as a return value
-            BaseState::Enum getState() const
+            BaseState::Value getState() const
             {
                 return this->state_;
@@ -75,5 +75,5 @@
             void changeTeamColour();
 
-            BaseState::Enum state_;
+            BaseState::Value state_;
     };
 }
Index: code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc	(revision 3280)
@@ -141,5 +141,5 @@
   }
 
-  bool DistanceTrigger::isTriggered(TriggerMode mode)
+  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
   {
     if (Trigger::isTriggered(mode))
Index: code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h	(revision 3280)
@@ -59,5 +59,5 @@
 
     protected:
-      virtual bool isTriggered(TriggerMode mode);
+      virtual bool isTriggered(TriggerMode::Value mode);
       virtual void notifyMaskUpdate() {}
 
Index: code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc	(revision 3280)
@@ -54,5 +54,5 @@
     }
 
-    bool EventTrigger::isTriggered(TriggerMode mode)
+    bool EventTrigger::isTriggered(TriggerMode::Value mode)
     {
         if (Trigger::isTriggered(mode))
Index: code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h	(revision 3280)
@@ -47,5 +47,5 @@
 
         protected:
-            virtual bool isTriggered(TriggerMode mode);
+            virtual bool isTriggered(TriggerMode::Value mode);
 
         private:
Index: code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 3280)
@@ -70,5 +70,5 @@
             
     protected:
-        virtual bool isTriggered(TriggerMode mode) = 0;
+        virtual bool isTriggered(TriggerMode::Value mode) = 0;
         
         /**
Index: code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 3280)
@@ -46,5 +46,5 @@
     RegisterObject(Trigger);
 
-    this->mode_ = TM_EventTriggerAND;
+    this->mode_ = TriggerMode::EventTriggerAND;
 
     this->bFirstTick_ = true;
@@ -163,5 +163,5 @@
   }
 
-  bool Trigger::isTriggered(TriggerMode mode)
+  bool Trigger::isTriggered(TriggerMode::Value mode)
   {
 //    if (this->bUpdating_)
@@ -175,11 +175,11 @@
       switch (mode)
       {
-        case TM_EventTriggerAND:
+        case TriggerMode::EventTriggerAND:
           returnval = checkAnd();
           break;
-        case TM_EventTriggerOR:
+        case TriggerMode::EventTriggerOR:
           returnval = checkOr();
           break;
-        case TM_EventTriggerXOR:
+        case TriggerMode::EventTriggerXOR:
           returnval = checkXor();
           break;
@@ -270,18 +270,18 @@
   {
     if (modeName == "and")
-      this->setMode(TM_EventTriggerAND);
+      this->setMode(TriggerMode::EventTriggerAND);
     else if (modeName == "or")
-      this->setMode(TM_EventTriggerOR);
+      this->setMode(TriggerMode::EventTriggerOR);
     else if (modeName == "xor")
-      this->setMode(TM_EventTriggerXOR);
+      this->setMode(TriggerMode::EventTriggerXOR);
   }
 
   std::string Trigger::getModeString() const
   {
-    if (this->mode_ == TM_EventTriggerAND)
+    if (this->mode_ == TriggerMode::EventTriggerAND)
       return std::string("and");
-    else if (this->mode_ == TM_EventTriggerOR)
+    else if (this->mode_ == TriggerMode::EventTriggerOR)
       return std::string("or");
-    else if (this->mode_ == TM_EventTriggerXOR)
+    else if (this->mode_ == TriggerMode::EventTriggerXOR)
       return std::string("xor");
     else
Index: code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
===================================================================
--- code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3214)
+++ code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 3280)
@@ -41,10 +41,13 @@
 namespace orxonox
 {
-  enum TriggerMode
+  namespace TriggerMode
   {
-    TM_EventTriggerAND,
-    TM_EventTriggerOR,
-    TM_EventTriggerXOR,
-  };
+    enum Value
+    {
+      EventTriggerAND,
+      EventTriggerOR,
+      EventTriggerXOR,
+    };
+  }
 
   class _OrxonoxExport Trigger : public StaticEntity, public Tickable
@@ -64,7 +67,7 @@
 
       void setMode(const std::string& modeName);
-      inline void setMode(TriggerMode mode)
+      inline void setMode(TriggerMode::Value mode)
         { this->mode_ = mode; }
-      inline TriggerMode getMode() const
+      inline TriggerMode::Value getMode() const
         { return mode_; }
 
@@ -103,5 +106,5 @@
     protected:
       inline bool isTriggered() { return this->isTriggered(this->mode_); }
-      virtual bool isTriggered(TriggerMode mode);
+      virtual bool isTriggered(TriggerMode::Value mode);
       virtual void triggered(bool bIsTriggered);
 
@@ -118,5 +121,5 @@
       bool bFirstTick_;
 
-      TriggerMode mode_;
+      TriggerMode::Value mode_;
       bool bInvertMode_;
       bool bSwitch_;
