Index: code/trunk/src/libraries/core/GUIManager.cc
===================================================================
--- code/trunk/src/libraries/core/GUIManager.cc	(revision 11082)
+++ code/trunk/src/libraries/core/GUIManager.cc	(revision 11083)
@@ -104,4 +104,6 @@
 #include "util/OrxAssert.h"
 #include "util/output/BaseWriter.h"
+#include "util/StringUtils.h"
+#include "util/SubString.h"
 #include "config/ConfigValueIncludes.h"
 #include "Core.h"
Index: code/trunk/src/libraries/core/class/SubclassIdentifier.h
===================================================================
--- code/trunk/src/libraries/core/class/SubclassIdentifier.h	(revision 11082)
+++ code/trunk/src/libraries/core/class/SubclassIdentifier.h	(revision 11083)
@@ -92,5 +92,5 @@
         public:
             /// Constructor: Automaticaly assigns the Identifier of the given class.
-            SubclassIdentifier()
+            SubclassIdentifier() : identifier_(nullptr)
             {
                 this->identifier_ = ClassIdentifier<T>::getIdentifier();
@@ -98,5 +98,5 @@
 
             /// Constructor: Assigns the given Identifier.
-            SubclassIdentifier(Identifier* identifier)
+            SubclassIdentifier(Identifier* identifier) : identifier_(nullptr)
             {
                 this->operator=(identifier);
@@ -105,5 +105,5 @@
             /// Copyconstructor: Assigns the identifier of another SubclassIdentifier.
             template <class O>
-            SubclassIdentifier(const SubclassIdentifier<O>& identifier)
+            SubclassIdentifier(const SubclassIdentifier<O>& identifier) : identifier_(nullptr)
             {
                 this->operator=(identifier.getIdentifier());
Index: code/trunk/src/libraries/core/input/KeyBinder.cc
===================================================================
--- code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 11082)
+++ code/trunk/src/libraries/core/input/KeyBinder.cc	(revision 11083)
@@ -67,5 +67,5 @@
         for (unsigned int i = 0; i < KeyCode::numberOfKeys; i++)
         {
-            const std::string& keyname = KeyCode::ByString[i];
+            const std::string keyname = KeyCode::ByString[i];
             if (!keyname.empty())
                 keys_[i].name_ = std::string("Key") + keyname;
Index: code/trunk/src/libraries/network/MasterServer.cc
===================================================================
--- code/trunk/src/libraries/network/MasterServer.cc	(revision 11082)
+++ code/trunk/src/libraries/network/MasterServer.cc	(revision 11083)
@@ -253,4 +253,6 @@
     /* convert to string */
     std::string ip = std::string( addrconv );
+    /* output debug info about the data that has come */
+    helper_output_debug(event, addrconv);
     /* delete addrconv */
     if( addrconv ) free( addrconv );
@@ -259,6 +261,4 @@
     char * packetdata = (char *)event->packet->data;
 
-    /* output debug info about the data that has come */
-    helper_output_debug( event, addrconv );
 
     /* GAME SERVER OR CLIENT CONNECTION? */
@@ -332,5 +332,5 @@
   {
     /***** ENTER MAIN LOOP *****/
-    ENetEvent *event = (ENetEvent *)calloc(sizeof(ENetEvent), sizeof(char));
+    ENetEvent *event = (ENetEvent *)calloc(1, sizeof(ENetEvent));
     if( event == nullptr )
     {
Index: code/trunk/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/trunk/src/libraries/network/packet/Gamestate.cc	(revision 11082)
+++ code/trunk/src/libraries/network/packet/Gamestate.cc	(revision 11083)
@@ -489,5 +489,5 @@
 Gamestate* Gamestate::diffVariables(Gamestate *base)
 {
-  assert(this && base); assert(data_ && base->data_);
+  assert(base); assert(data_ && base->data_);
   assert(!header_.isCompressed() && !base->header_.isCompressed());
   assert(!header_.isDiffed());
Index: code/trunk/src/libraries/network/packet/ServerInformation.cc
===================================================================
--- code/trunk/src/libraries/network/packet/ServerInformation.cc	(revision 11082)
+++ code/trunk/src/libraries/network/packet/ServerInformation.cc	(revision 11083)
@@ -55,5 +55,5 @@
       // Save ACK
       uint8_t* temp = event->packet->data;
-      char* ack = new char[strlen(LAN_DISCOVERY_ACK)+1];
+      char* ack = nullptr;
       loadAndIncrease((char*&)ack, temp);
 
@@ -64,4 +64,5 @@
       // Save Server Name
       loadAndIncrease(this->serverName_, temp);
+      delete[] ack;
     }
 
@@ -74,8 +75,8 @@
     {
       std::string payload = this->serverName_ + Ogre::StringConverter::toString(this->clientNumber_);
-      uint32_t size = returnSize((char*&)LAN_DISCOVERY_ACK) + returnSize(payload);
+      uint32_t size = returnSize(LAN_DISCOVERY_ACK) + returnSize(payload);
       uint8_t* temp = new uint8_t[size];
       uint8_t* temp2 = temp;
-      saveAndIncrease((char*&)LAN_DISCOVERY_ACK, temp2);
+      saveAndIncrease(LAN_DISCOVERY_ACK, temp2);
       saveAndIncrease(payload, temp2);
       ENetPacket* packet = enet_packet_create( temp, size, 0 );
Index: code/trunk/src/libraries/util/Serialise.h
===================================================================
--- code/trunk/src/libraries/util/Serialise.h	(revision 11082)
+++ code/trunk/src/libraries/util/Serialise.h	(revision 11083)
@@ -48,5 +48,5 @@
     template <class T> inline uint32_t returnSize( const T& variable );
     /** @brief loads the value of a variable out of the bytestream and increases the mem pointer */
-    template <class T> inline void loadAndIncrease( const T& variable, uint8_t*& mem );
+    template <class T> inline void loadAndIncrease( T& variable, uint8_t*& mem );
     /** @brief saves the value of a variable into the bytestream and increases the mem pointer */
     template <class T> inline void saveAndIncrease( const T& variable, uint8_t*& mem );
@@ -57,13 +57,14 @@
   // =========== char*
 
-  inline uint32_t returnSize( char*& variable )
+  inline uint32_t returnSize(const char*& variable )
   {
     return strlen(variable)+1;
   }
 
-  inline void saveAndIncrease( char*& variable, uint8_t*& mem )
+  inline void saveAndIncrease(const char*& variable, uint8_t*& mem )
   {
-    strcpy((char*)mem, variable);
-    mem += returnSize(variable);
+    uint32_t len = returnSize(variable);
+    std::memcpy(mem, variable, len);
+    mem += len;
   }
 
@@ -72,7 +73,7 @@
     if( variable )
       delete variable;
-    uint32_t len = strlen((char*)mem)+1;
+    uint32_t len = returnSize((const char*&)mem);
     variable = new char[len];
-    strcpy((char*)variable, (char*)mem);
+    std::memcpy(variable, mem, len);
     mem += len;
   }
@@ -92,5 +93,5 @@
     }
 
-    template <> inline void loadAndIncrease( const bool& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( bool& variable, uint8_t*& mem )
     {
         *(uint8_t*)( &variable ) = *static_cast<uint8_t*>(mem);
@@ -116,5 +117,5 @@
     }
 
-    template <> inline void loadAndIncrease( const char& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( char& variable, uint8_t*& mem )
     {
         *(uint8_t*)( &variable ) = *static_cast<uint8_t*>(mem);
@@ -140,5 +141,5 @@
     }
 
-    template <> inline void loadAndIncrease( const unsigned char& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( unsigned char& variable, uint8_t*& mem )
     {
         *(uint8_t*)( &variable ) = *static_cast<uint8_t*>(mem);
@@ -164,5 +165,5 @@
     }
 
-    template <> inline void loadAndIncrease( const short& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( short& variable, uint8_t*& mem )
     {
         *(short*)( &variable ) = *(int16_t*)(mem);
@@ -188,5 +189,5 @@
     }
 
-    template <> inline void loadAndIncrease( const unsigned short& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( unsigned short& variable, uint8_t*& mem )
     {
         *(unsigned short*)( &variable ) = *(uint16_t*)(mem);
@@ -212,5 +213,5 @@
     }
 
-    template <> inline void loadAndIncrease( const int& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( int& variable, uint8_t*& mem )
     {
         *(int *)( &variable ) = *(int32_t*)(mem);
@@ -236,5 +237,5 @@
     }
 
-    template <> inline void loadAndIncrease( const unsigned int& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( unsigned int& variable, uint8_t*& mem )
     {
         *(unsigned int*)( &variable ) = *(uint32_t*)(mem);
@@ -260,5 +261,5 @@
     }
 
-    template <> inline void loadAndIncrease( const long& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( long& variable, uint8_t*& mem )
     {
         *(long*)( &variable ) = *(int32_t*)(mem);
@@ -284,5 +285,5 @@
     }
 
-    template <> inline void loadAndIncrease( const unsigned long& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( unsigned long& variable, uint8_t*& mem )
     {
         *(unsigned long*)( &variable ) = *(uint32_t*)(mem);
@@ -308,5 +309,5 @@
     }
 
-    template <> inline void loadAndIncrease( const long long& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( long long& variable, uint8_t*& mem )
     {
         *(long long*)( &variable ) = *(int64_t*)(mem);
@@ -332,5 +333,5 @@
     }
 
-    template <> inline void loadAndIncrease( const unsigned long long& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( unsigned long long& variable, uint8_t*& mem )
     {
         *(unsigned long long*)( &variable ) = *(uint64_t*)(mem);
@@ -356,5 +357,5 @@
     }
 
-    template <> inline void loadAndIncrease( const float& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( float& variable, uint8_t*& mem )
     {
         *(uint32_t*)( &variable ) = *(uint32_t*)(mem);
@@ -380,5 +381,5 @@
     }
 
-    template <> inline void loadAndIncrease( const double& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( double& variable, uint8_t*& mem )
     {
         *(uint64_t*)( &variable ) = *(uint64_t*)(mem);
@@ -404,5 +405,5 @@
     }
 
-    template <> inline void loadAndIncrease( const long double& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( long double& variable, uint8_t*& mem )
     {
         double temp;
@@ -438,5 +439,5 @@
     }
 
-    template <> inline void loadAndIncrease( const std::string& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( std::string& variable, uint8_t*& mem )
     {
         *(std::string*)( &variable ) = (const char *)mem;
@@ -464,5 +465,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Degree& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Degree& variable, uint8_t*& mem )
     {
         Ogre::Real* r = (Ogre::Real*)mem;
@@ -491,5 +492,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Radian& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Radian& variable, uint8_t*& mem )
     {
         Ogre::Real* r = (Ogre::Real*)mem;
@@ -517,5 +518,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Vector2& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Vector2& variable, uint8_t*& mem )
     {
         loadAndIncrease( variable.x, mem );
@@ -542,5 +543,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Vector3& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Vector3& variable, uint8_t*& mem )
     {
         loadAndIncrease( variable.x, mem );
@@ -570,5 +571,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Vector4& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Vector4& variable, uint8_t*& mem )
     {
         loadAndIncrease( variable.w, mem );
@@ -600,5 +601,5 @@
     }
 
-    template <> inline void loadAndIncrease( const Quaternion& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( Quaternion& variable, uint8_t*& mem )
     {
         loadAndIncrease( variable.w, mem );
@@ -630,5 +631,5 @@
     }
 
-    template <> inline void loadAndIncrease( const ColourValue& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( ColourValue& variable, uint8_t*& mem )
     {
         loadAndIncrease( variable.r, mem );
@@ -657,5 +658,5 @@
     }
 
-    template <> inline void loadAndIncrease( const mbool& variable, uint8_t*& mem )
+    template <> inline void loadAndIncrease( mbool& variable, uint8_t*& mem )
     {
         loadAndIncrease( (unsigned char&)((mbool&)variable).getMemory(), mem );
Index: code/trunk/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 11082)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.cc	(revision 11083)
@@ -397,9 +397,9 @@
     bool SpaceRaceController::vergleicheQuader(const Vector3& pointToPoint, const Vector3& groesse)
     {
-        if(abs(pointToPoint.x) < groesse.x)
+        if(std::abs(pointToPoint.x) < groesse.x)
             return true;
-        if(abs(pointToPoint.y) < groesse.y)
+        if(std::abs(pointToPoint.y) < groesse.y)
             return true;
-        if(abs(pointToPoint.z) < groesse.z)
+        if(std::abs(pointToPoint.z) < groesse.z)
             return true;
         return false;
Index: code/trunk/src/modules/hover/TimeHUD.cc
===================================================================
--- code/trunk/src/modules/hover/TimeHUD.cc	(revision 11082)
+++ code/trunk/src/modules/hover/TimeHUD.cc	(revision 11083)
@@ -82,7 +82,7 @@
         {
             this->setCaption(getTimeString(this->time_));
+            if (this->hoverGame_->getNumberOfFlags() == 0)
+                setRunning(false);
         }
-        if(this->hoverGame_->getNumberOfFlags() == 0)
-            setRunning(false);
         
     }
Index: code/trunk/src/modules/invader/Invader.cc
===================================================================
--- code/trunk/src/modules/invader/Invader.cc	(revision 11082)
+++ code/trunk/src/modules/invader/Invader.cc	(revision 11083)
@@ -129,5 +129,5 @@
                 newPawn->addTemplate("enemyinvader");
             }
-            newPawn->setPlayer(player);
+            newPawn->setInvaderPlayer(player);
             newPawn->level = level;
             // spawn enemy at random points in front of player.
Index: code/trunk/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.cc	(revision 11082)
+++ code/trunk/src/modules/invader/InvaderEnemy.cc	(revision 11083)
@@ -58,5 +58,5 @@
         if (player != nullptr)
         {
-            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
+            float newZ = 2/(pow(std::abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
             setVelocity(Vector3(1000.f - level * 100 , 0, newZ));
         }
Index: code/trunk/src/modules/invader/InvaderEnemy.h
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.h	(revision 11082)
+++ code/trunk/src/modules/invader/InvaderEnemy.h	(revision 11083)
@@ -49,5 +49,5 @@
             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
             virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs) override;
-            virtual void setPlayer(InvaderShip* player){this->player = player;}
+            virtual void setInvaderPlayer(InvaderShip* player){this->player = player;}
 
             int level;
Index: code/trunk/src/modules/invader/InvaderEnemyShooter.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemyShooter.cc	(revision 11082)
+++ code/trunk/src/modules/invader/InvaderEnemyShooter.cc	(revision 11083)
@@ -63,6 +63,6 @@
             float distPlayer = player->getPosition().z - getPosition().z;
             // orxout() << "i'm different!" << endl;
-            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * distPlayer;
-            setVelocity(Vector3(950 - abs(distPlayer), 0, newZ));
+            float newZ = 2/(pow(std::abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * distPlayer;
+            setVelocity(Vector3(950 - std::abs(distPlayer), 0, newZ));
         }
         Pawn::tick(dt);
Index: code/trunk/src/modules/objects/ForceField.cc
===================================================================
--- code/trunk/src/modules/objects/ForceField.cc	(revision 11082)
+++ code/trunk/src/modules/objects/ForceField.cc	(revision 11083)
@@ -63,5 +63,5 @@
         //Standard Values
         this->setDirection(Vector3::ZERO);
-        this->setVelocity(100);
+        this->setFieldVelocity(100);
         this->setDiameter(500);
         this->setMassDiameter(0);   //! We allow point-masses
@@ -88,5 +88,5 @@
         SUPER(ForceField, XMLPort, xmlelement, mode);
 
-        XMLPortParam(ForceField, "velocity", setVelocity, getVelocity, xmlelement, mode).defaultValues(100);
+        XMLPortParam(ForceField, "velocity", setFieldVelocity, getFieldVelocity, xmlelement, mode).defaultValues(100);
         XMLPortParam(ForceField, "diameter", setDiameter, getDiameter, xmlelement, mode).defaultValues(500);
         XMLPortParam(ForceField, "massDiameter", setMassDiameter, getMassDiameter, xmlelement, mode).defaultValues(0);
Index: code/trunk/src/modules/objects/ForceField.h
===================================================================
--- code/trunk/src/modules/objects/ForceField.h	(revision 11082)
+++ code/trunk/src/modules/objects/ForceField.h	(revision 11083)
@@ -98,5 +98,5 @@
             @param vel The velocity to be set.
             */
-            inline void setVelocity(float vel)
+            inline void setFieldVelocity(float vel)
                 { this->velocity_ = vel; }
             /**
@@ -104,5 +104,5 @@
             @return Returns the velocity of the ForceField.
             */
-            inline float getVelocity()
+            inline float getFieldVelocity()
                 { return this->velocity_; }
 
Index: code/trunk/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 11082)
+++ code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 11083)
@@ -221,5 +221,5 @@
                     }
                 }
-                if(/* humanItem &&*/ abs(this->maxDistance_ - distance) < this->showDistance_ )
+                if(/* humanItem &&*/ std::abs(this->maxDistance_ - distance) < this->showDistance_ )
                 {
                     this->displayBoundaries(currentPawn, 1.0f - fabs(this->maxDistance_ - distance) / this->showDistance_); // Show the boundary
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 11082)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 11083)
@@ -97,5 +97,5 @@
             virtual ~DistanceTrigger();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); // Method for creating a DistanceTrigger object through XML.
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; // Method for creating a DistanceTrigger object through XML.
 
             void addTarget(const std::string& targets); // Add some target to the DistanceTrigger.
Index: code/trunk/src/modules/objects/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 11082)
+++ code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 11083)
@@ -73,5 +73,5 @@
             virtual ~EventTrigger();
 
-            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); // Creates an event port.
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override; // Creates an event port.
 
             /**
Index: code/trunk/src/modules/overlays/hud/ChatOverlay.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 11082)
+++ code/trunk/src/modules/overlays/hud/ChatOverlay.cc	(revision 11083)
@@ -73,5 +73,5 @@
         Timer* timer = new Timer();
         this->timers_.insert(timer); // store the timer in a set to destroy it in the destructor
-        const ExecutorPtr& executor = createExecutor(createFunctor(&ChatOverlay::dropMessage, this));
+        const ExecutorPtr executor = createExecutor(createFunctor(&ChatOverlay::dropMessage, this));
         executor->setDefaultValues(timer);
         timer->setTimer(this->displayTime_, false, executor, true);
Index: code/trunk/src/modules/pickup/items/ShrinkPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 11082)
+++ code/trunk/src/modules/pickup/items/ShrinkPickup.cc	(revision 11083)
@@ -277,6 +277,9 @@
             {
                 Pawn* pawn = this->carrierToPawnHelper();
-                if(pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                if (pawn == nullptr) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+                {
                     this->Pickupable::destroy();
+                    return;
+                }
 
                 this->timeRemainig_ -= dt;
Index: code/trunk/src/modules/pong/Pong.cc
===================================================================
--- code/trunk/src/modules/pong/Pong.cc	(revision 11082)
+++ code/trunk/src/modules/pong/Pong.cc	(revision 11083)
@@ -326,5 +326,5 @@
     PlayerInfo* Pong::getLeftPlayer() const
     {
-        if (this->bat_ != nullptr && this->bat_[0] != nullptr)
+        if (this->bat_[0] != nullptr)
             return this->bat_[0]->getPlayer();
         else
@@ -340,5 +340,5 @@
     PlayerInfo* Pong::getRightPlayer() const
     {
-        if (this->bat_ != nullptr && this->bat_[1] != nullptr)
+        if (this->bat_[1] != nullptr)
             return this->bat_[1]->getPlayer();
         else
Index: code/trunk/src/modules/questsystem/QuestListener.cc
===================================================================
--- code/trunk/src/modules/questsystem/QuestListener.cc	(revision 11082)
+++ code/trunk/src/modules/questsystem/QuestListener.cc	(revision 11083)
@@ -81,8 +81,13 @@
         XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
 
-        if(this->quest_ != nullptr)
+        std::string questid;
+
+        if (this->quest_ != nullptr)
+        {
             this->quest_->addListener(this); // Adds the QuestListener to the Quests list of listeners.
-
-        orxout(verbose, context::quests) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << endl;
+            questid = this->quest_->getId();
+        }
+
+        orxout(verbose, context::quests) << "QuestListener created for quest: {" << questid << "} with mode '" << this->getMode() << "'." << endl;
     }
 
Index: code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h
===================================================================
--- code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h	(revision 11082)
+++ code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h	(revision 11083)
@@ -61,6 +61,4 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method for creating a ChangeQuestStatus object through XML.
 
-            virtual bool invoke(PlayerInfo* player) = 0; //!< Invokes the QuestEffect.
-
         protected:
             /**
Index: code/trunk/src/modules/tetris/Tetris.cc
===================================================================
--- code/trunk/src/modules/tetris/Tetris.cc	(revision 11082)
+++ code/trunk/src/modules/tetris/Tetris.cc	(revision 11083)
@@ -140,5 +140,5 @@
             const Vector3& currentStonePosition = someStone->getPosition(); //!< Saves the position of the currentStone
 
-            if((position.x == currentStonePosition.x) && abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
+            if((position.x == currentStonePosition.x) && std::abs(position.y-currentStonePosition.y) < this->center_->getStoneSize())
                 return false;
         }
@@ -222,7 +222,7 @@
         if(position.y < this->center_->getStoneSize()/2.0f) //!< If the stone has reached the bottom of the level
         {
-            float baseOffset = abs(stone->getPosition().y);
+            float baseOffset = std::abs(stone->getPosition().y);
             if (this->activeBrick_->getRotationCount() == 1 || this->activeBrick_->getRotationCount() == 3)
-                baseOffset = abs(stone->getPosition().x);
+                baseOffset = std::abs(stone->getPosition().x);
             float yOffset = baseOffset + this->center_->getStoneSize()/2.0f;//calculate offset
             if(yOffset < 0) //catch brake-throughs
Index: code/trunk/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 11082)
+++ code/trunk/src/modules/tetris/TetrisBrick.cc	(revision 11083)
@@ -213,5 +213,5 @@
         {
             const Vector3& position = this->getPosition();
-            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            Vector3 newPos = Vector3(position.x+value.x/std::abs(value.x)*this->size_, position.y, position.z);
             if(!this->isValidMove(newPos))
                 return;
Index: code/trunk/src/modules/tetris/TetrisStone.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisStone.cc	(revision 11082)
+++ code/trunk/src/modules/tetris/TetrisStone.cc	(revision 11083)
@@ -92,5 +92,5 @@
         {
             const Vector3& position = this->getPosition();
-            Vector3 newPos = Vector3(position.x+value.x/abs(value.x)*this->size_, position.y, position.z);
+            Vector3 newPos = Vector3(position.x+value.x/std::abs(value.x)*this->size_, position.y, position.z);
             if(!this->tetris_->isValidMove(this, newPos))
                 return;
Index: code/trunk/src/modules/towerdefense/TDCoordinate.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TDCoordinate.cc	(revision 11082)
+++ code/trunk/src/modules/towerdefense/TDCoordinate.cc	(revision 11083)
@@ -66,10 +66,10 @@
         float tileScale = 100;
 
-        Vector3 *coord = new Vector3();
-        coord->x= (_x-8) * tileScale;
-        coord->y= (_y-8) * tileScale;
-        coord->z=0;
+        Vector3 coord;
+        coord.x= (_x-8) * tileScale;
+        coord.y= (_y-8) * tileScale;
+        coord.z=0;
 
-        return *coord;
+        return coord;
     }
 }
Index: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11082)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc	(revision 11083)
@@ -377,5 +377,4 @@
     {        
         TowerDefenseField* thisField = fields_[thisCoord->GetX()][thisCoord->GetY()];
-        TDCoordinate* nextCoord = new TDCoordinate(0,0);
 
         if (thisField->getType() != TowerDefenseFieldType::STREET && thisField->getType() != TowerDefenseFieldType::START)
@@ -384,4 +383,6 @@
         }
 
+        TDCoordinate* nextCoord = new TDCoordinate(0, 0);
+
         if (thisField->getAngle() == 0)
         {
@@ -406,4 +407,5 @@
         }
 
+        delete nextCoord;
         return nullptr;
     }
Index: code/trunk/src/modules/weapons/projectiles/GravityBombField.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11082)
+++ code/trunk/src/modules/weapons/projectiles/GravityBombField.cc	(revision 11083)
@@ -34,5 +34,5 @@
         fieldExploded_ = false;
 
-        setVelocity(FORCE_SPHERE_START_STRENGTH);
+        setFieldVelocity(FORCE_SPHERE_START_STRENGTH);
         setDiameter(2*FORCE_SPHERE_START_RADIUS);
         setMode(modeSphere_s);
@@ -158,5 +158,5 @@
         
         setDiameter(forceSphereRadius_*2);
-        setVelocity(forceStrength_);
+        setFieldVelocity(forceStrength_);
         if(lifetime_>0) particleSphere_->setScale(forceSphereRadius_/FORCE_SPHERE_START_RADIUS);
         bombModel_->setScale(modelScaling_);
Index: code/trunk/src/orxonox/chat/ChatInputHandler.cc
===================================================================
--- code/trunk/src/orxonox/chat/ChatInputHandler.cc	(revision 11082)
+++ code/trunk/src/orxonox/chat/ChatInputHandler.cc	(revision 11083)
@@ -214,7 +214,10 @@
   {
     /* sanity checks */
-    if( !tocolor )
-      orxout(internal_warning) << "Empty ListBoxTextItem given to "
-        "ChatInputhandler::sub_setcolor()." << endl;
+    if (!tocolor)
+    {
+        orxout(internal_warning) << "Empty ListBoxTextItem given to "
+            "ChatInputhandler::sub_setcolor()." << endl;
+        return;
+    }
 
     /* "hash" the name */
Index: code/trunk/src/orxonox/controllers/ActionpointController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ActionpointController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/ActionpointController.cc	(revision 11083)
@@ -74,5 +74,5 @@
     void ActionpointController::tick(float dt)
     {
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this->getControllableEntity() || !this->isActive())
             return;
 
@@ -86,6 +86,4 @@
         }
 
-        if (!this || !this->getControllableEntity())
-            return;
         //fly
         if (this->bHasTargetPosition_)
@@ -98,7 +96,4 @@
         }
         
-
-        if (!this || !this->getControllableEntity())
-            return;
         //don't fire rocket each tick
         if (timeout_ <= 0)
@@ -111,6 +106,4 @@
         }
 
-        if (!this || !this->getControllableEntity())
-            return;
         //sometimes dodge, sometimes attack
         if (this->ticks_ % 80 <= 10)
@@ -123,6 +116,4 @@
         }
 
-        if (!this || !this->getControllableEntity())
-            return;
         //fire if you can
         if (this->bShooting_)
@@ -140,5 +131,5 @@
     void ActionpointController::action()
     {
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this->getControllableEntity() || !this->isActive())
             return;
 
@@ -152,6 +143,4 @@
             this->startAttackingEnemiesThatAreClose();
         }
-        if (!this || !this->getControllableEntity())
-            return;
 
         //No action -> pop one from stack
@@ -161,18 +150,10 @@
             if (this->parsedActionpoints_.empty() && this->loopActionpoints_.empty() && this->bDefaultFightAll_)
             {
-                if (!this || !this->getControllableEntity())
-                    return;
                 Point p = { Action::FIGHTALL, "", Vector3::ZERO, false };
                 this->parsedActionpoints_.push_back (p);
             }
-            if (!this || !this->getControllableEntity())
-                return;
             this->executeActionpoint();
-            if (!this || !this->getControllableEntity())
-                return;
             this->bTakenOver_ = false;
         }
-        if (!this || !this->getControllableEntity())
-            return;
 
         //Action fightall -> fight till nobody alive
@@ -185,15 +166,9 @@
                 if (newTarget)
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->setAction (Action::FIGHTALL, newTarget);
                 }
                 else
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->nextActionpoint();
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->executeActionpoint();
     
@@ -207,21 +182,13 @@
             {
                 //----find a target----
-                ControllableEntity* newTarget = this->closestTarget();  
-                if (!this || !this->getControllableEntity())
-                    return;  
+                ControllableEntity* newTarget = this->closestTarget();
                 if (newTarget && 
                         CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->setAction (Action::FIGHT, newTarget);
                 }
                 else
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->nextActionpoint();
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->executeActionpoint();
                 }
@@ -235,20 +202,12 @@
                 {
                     ControllableEntity* newTarget = this->closestTarget();
-                    if (!this || !this->getControllableEntity())
-                        return;
                     if (newTarget && 
                         CommonController::distance (this->getControllableEntity(), newTarget) < this->attackRange_)
                     {
-                        if (!this || !this->getControllableEntity())
-                            return;
                         this->setAction (Action::FIGHT, newTarget);
                     }
                     else
                     {
-                        if (!this || !this->getControllableEntity())
-                            return;
                         this->nextActionpoint();
-                        if (!this || !this->getControllableEntity())
-                            return;
                         this->executeActionpoint();
                     }
@@ -260,9 +219,5 @@
             if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
             {
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->nextActionpoint();   
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->executeActionpoint();
             }
@@ -272,26 +227,14 @@
             if (!this->getProtect())
             {
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->nextActionpoint();
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->executeActionpoint(); 
             }
-            if (!this || !this->getControllableEntity())
-                return;
             this->stayNearProtect();
         }
         else if (this->action_ == Action::ATTACK)
         {   
-            if (!this || !this->getControllableEntity())
-                return;
             if (!this->hasTarget())
             {
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->nextActionpoint();
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->executeActionpoint();
             }
@@ -408,5 +351,5 @@
     void ActionpointController::setAction (Action action, ControllableEntity* target)
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         this->action_ = action;
@@ -425,5 +368,5 @@
     void ActionpointController::setAction (Action action, const Vector3& target)
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         this->action_ = action;
@@ -436,5 +379,5 @@
     void ActionpointController::setAction (Action action, const Vector3& target,  const Quaternion& orient )
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         this->action_ = action;
@@ -454,5 +397,5 @@
     void ActionpointController::executeActionpoint()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
 
@@ -473,7 +416,4 @@
         else
         {
-            if (!this || !this->getControllableEntity())
-                return;
-
             this->setTarget(nullptr);
             this->setTargetPosition(this->getControllableEntity()->getWorldPosition());
@@ -481,21 +421,13 @@
             return;
         }
-        if (!this || !this->getControllableEntity())
-            return;
         if (!this->bLoop_ && this->parsedActionpoints_.back().inLoop)
         {
             //MOVES all points that are in loop to a loop vector
             this->fillLoop();
-            if (!this || !this->getControllableEntity())
-                return;
             this->bLoop_ = true;
             executeActionpoint();
             return;
         }
-        if (!this || !this->getControllableEntity())
-            return;
         this->setAction (p.action);
-        if (!this || !this->getControllableEntity())
-            return;
 
         switch (this->action_)
@@ -508,6 +440,4 @@
                 for (Pawn* pawn : ObjectList<Pawn>())
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     if (CommonController::getName(pawn) == targetName)
                     {
@@ -520,13 +450,7 @@
             {
                 this->setTargetPosition( p.position );
-                if (!this || !this->getControllableEntity())
-                    return;
                 if (this->squaredDistanceToTarget() <= this->squaredaccuracy_)
                 {
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->nextActionpoint();
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->executeActionpoint();
                 }
@@ -535,6 +459,4 @@
             case Action::PROTECT:
             {
-                if (!this || !this->getControllableEntity())
-                    return;
 
                 std::string protectName = p.name;
@@ -582,6 +504,4 @@
                     if (CommonController::getName(pawn) == targetName)
                     {
-                        if (!this || !this->getControllableEntity())
-                            return;
                         this->setTarget (static_cast<ControllableEntity*>(pawn));
                     }
@@ -590,6 +510,4 @@
                 {
                     this->nextActionpoint();
-                    if (!this || !this->getControllableEntity())
-                        return;
                     this->executeActionpoint();
                 }
@@ -604,5 +522,5 @@
     void ActionpointController::stayNearProtect()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
 
@@ -626,6 +544,4 @@
     void ActionpointController::nextActionpoint()
     {
-        if (!this || !this->getControllableEntity())
-            return;
         if (this->bLoop_)
         {
@@ -653,5 +569,5 @@
     void ActionpointController::moveBackToTop()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
 
@@ -684,9 +600,7 @@
     void ActionpointController::takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b)
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         this->parsedActionpoints_ = vector;
-        if (!this || !this->getControllableEntity())
-            return;
         this->loopActionpoints_ = loop;
         this->bLoop_ = b;
@@ -701,5 +615,5 @@
     Pawn* ActionpointController::closestTarget()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return nullptr;
 
@@ -709,6 +623,4 @@
         for (Pawn* pawn : ObjectList<Pawn>())
         {
-            if (!this || !this->getControllableEntity())
-                return nullptr;
             if ( CommonController::sameTeam (this->getControllableEntity(), static_cast<ControllableEntity*>(pawn), gt) )
                 continue;
@@ -730,11 +642,9 @@
     void ActionpointController::startAttackingEnemiesThatAreClose()
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         
         if (!this->target_ || (this->target_ && CommonController::distance (this->getControllableEntity(), this->target_) > this->attackRange_))
         {
-            if (!this || !this->getControllableEntity())
-                return;
             Pawn* newTarget = this->closestTarget();
             if ( newTarget && 
@@ -742,6 +652,4 @@
                     <= this->attackRange_ )
             {
-                if (!this || !this->getControllableEntity())
-                    return;
                 this->setTarget(newTarget);
                 if (this->bLoop_ && !this->bPatrolling_)
Index: code/trunk/src/orxonox/controllers/DivisionController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/DivisionController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/DivisionController.cc	(revision 11083)
@@ -57,10 +57,8 @@
     void DivisionController::action()
     {   
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this->getControllableEntity() || !this->isActive())
             return;
         
         ActionpointController::action();
-        if (!this || !this->getControllableEntity())
-            return;
         if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
         {
Index: code/trunk/src/orxonox/controllers/FightingController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/FightingController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/FightingController.cc	(revision 11083)
@@ -58,5 +58,5 @@
     void FightingController::lookAtTarget(float dt)
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return;
         ControllableEntity* entity = this->getControllableEntity();
@@ -124,7 +124,4 @@
         Vector3 diffUnit = diffVector/diffLength;
 
-        if (!this || !this->getControllableEntity())
-            return;
-
         //too far? well, come closer then
         if (diffLength > this->attackRange_)
@@ -142,6 +139,4 @@
             this->bKeepFormation_ = false;
 
-            if (!this || !this->getControllableEntity())
-                return;
             if (!this->bDodge_)
             {
@@ -217,5 +212,5 @@
     float FightingController::squaredDistanceToTarget()  const
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return 0;
         if (!this->target_ || !this->getControllableEntity())
@@ -237,5 +232,5 @@
     Pawn* FightingController::closestTarget() const
     {
-        if (!this || !this->getControllableEntity())
+        if (!this->getControllableEntity())
             return nullptr;
 
Index: code/trunk/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/ScriptController.cc	(revision 11083)
@@ -227,18 +227,18 @@
           { 
             // Specify the axis
-            Vector3* a;
+            Vector3 a;
               switch ((int) currentEvent.d) {
                 case 3:
-                  a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl),
+                  a = Vector3(this->currentEvent.v1.x + this->currentEvent.e*cos(2*math::pi*dl),
                                   this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
                                   this->currentEvent.v1.z);
                 break;
                 case 2:
-                  a = new Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl),
+                  a = Vector3(this->currentEvent.v1.x + this->currentEvent.e*sin(2*math::pi*dl),
                                   this->currentEvent.v1.y,
                                   this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
                 break;
                 case 1:
-                  a = new Vector3(this->currentEvent.v1.x,
+                  a = Vector3(this->currentEvent.v1.x,
                                   this->currentEvent.v1.y + this->currentEvent.e*sin(2*math::pi*dl),
                                   this->currentEvent.v1.z + this->currentEvent.e*cos(2*math::pi*dl));
@@ -246,5 +246,5 @@
               }
 
-            this->entity_->setPosition(*a);
+            this->entity_->setPosition(a);
 
             /* Look at the specified position */
Index: code/trunk/src/orxonox/controllers/SectionController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/SectionController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/SectionController.cc	(revision 11083)
@@ -59,5 +59,5 @@
     void SectionController::action()
     {
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this->getControllableEntity() || !this->isActive())
             return;
 
@@ -66,6 +66,4 @@
         {
             ActionpointController* newDivisionLeader = findNewDivisionLeader();
-            if (!this || !this->getControllableEntity())
-                return;
 
             this->myDivisionLeader_ = newDivisionLeader;
@@ -78,6 +76,4 @@
         {
             ActionpointController::action();
-            if (!this || !this->getControllableEntity())
-                return;
             if (!(this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()))
             {
@@ -98,6 +94,4 @@
             else if (!this->myDivisionLeader_->bKeepFormation_)
             {
-                if (!this || !this->getControllableEntity())
-                    return;
 
                 if (!this->hasTarget())
@@ -121,5 +115,5 @@
         if (action == Action::FIGHT || action == Action::FIGHTALL || action == Action::ATTACK)
         {
-            Pawn* target;
+            Pawn* target = nullptr;
             //----if he has a target----
             if (this->myDivisionLeader_->hasTarget())
Index: code/trunk/src/orxonox/controllers/WingmanController.cc
===================================================================
--- code/trunk/src/orxonox/controllers/WingmanController.cc	(revision 11082)
+++ code/trunk/src/orxonox/controllers/WingmanController.cc	(revision 11083)
@@ -58,5 +58,5 @@
     void WingmanController::action()
     {
-        if (!this || !this->getControllableEntity() || !this->isActive())
+        if (!this->getControllableEntity() || !this->isActive())
             return;
         //----If no leader, find one----
@@ -64,6 +64,4 @@
         {
             ActionpointController* newLeader = (findNewLeader());
-            if (!this || !this->getControllableEntity())
-                return;
 
             this->myLeader_ = newLeader;
@@ -92,6 +90,4 @@
             else if (!this->myLeader_->bKeepFormation_)
             {
-                if (!this || !this->getControllableEntity())
-                    return;
 
                 if (!this->hasTarget())
Index: code/trunk/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastManStanding.cc	(revision 11082)
+++ code/trunk/src/orxonox/gametypes/LastManStanding.cc	(revision 11083)
@@ -88,5 +88,5 @@
                 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                     return true;
-                const std::string& message = ""; // resets Camper-Warning-message
+                const std::string message = ""; // resets Camper-Warning-message
                 this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
             }
@@ -195,5 +195,5 @@
             if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                 return;
-            const std::string& message = ""; // resets Camper-Warning-message
+            const std::string message = ""; // resets Camper-Warning-message
             this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
         }
@@ -262,5 +262,5 @@
                         if (mapEntry.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                             return;
-                        const std::string& message = ""; // resets Camper-Warning-message
+                        const std::string message = ""; // resets Camper-Warning-message
                         this->gtinfo_->sendFadingMessage(message,mapEntry.first->getClientID());
                     }
@@ -270,5 +270,5 @@
                     if (mapEntry.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    const std::string& message = "Camper Warning! Don't forget to shoot.";
+                    const std::string message = "Camper Warning! Don't forget to shoot.";
                     this->gtinfo_->sendFadingMessage(message,mapEntry.first->getClientID());
                 }
Index: code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 11082)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 11083)
@@ -136,5 +136,5 @@
                 if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                     return true;
-                const std::string& message = ""; // resets Camper-Warning-message
+                const std::string message = ""; // resets Camper-Warning-message
                 this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
             }
@@ -170,5 +170,5 @@
             if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                 return;
-            const std::string& message = ""; // resets Camper-Warning-message
+            const std::string message = ""; // resets Camper-Warning-message
             this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
         }
@@ -209,5 +209,5 @@
                         if (mapEntry.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                             return;
-                        const std::string& message = ""; // resets Camper-Warning-message
+                        const std::string message = ""; // resets Camper-Warning-message
                         this->gtinfo_->sendFadingMessage(message, mapEntry.first->getClientID());
                     }
@@ -217,5 +217,5 @@
                   if (mapEntry.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    const std::string& message = "Camper Warning! Don't forget to shoot.";
+                    const std::string message = "Camper Warning! Don't forget to shoot.";
                     this->gtinfo_->sendFadingMessage(message, mapEntry.first->getClientID());
                 }
Index: code/trunk/src/orxonox/graphics/LensFlare.cc
===================================================================
--- code/trunk/src/orxonox/graphics/LensFlare.cc	(revision 11082)
+++ code/trunk/src/orxonox/graphics/LensFlare.cc	(revision 11083)
@@ -34,11 +34,15 @@
 #include "LensFlare.h"
 
+#include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 #include "graphics/Billboard.h"
 #include "CameraManager.h"
+#include "Camera.h"
 #include "RenderQueueListener.h"
+#include "Scene.h"
 
 #include <OgreSphere.h>
 #include <OgreRenderWindow.h>
+#include <OgreCamera.h>
 
 namespace orxonox
Index: code/trunk/src/orxonox/graphics/LensFlare.h
===================================================================
--- code/trunk/src/orxonox/graphics/LensFlare.h	(revision 11082)
+++ code/trunk/src/orxonox/graphics/LensFlare.h	(revision 11083)
@@ -41,4 +41,5 @@
 #include "core/GraphicsManager.h"
 #include "util/Math.h"
+#include "tools/interfaces/Tickable.h"
 #include "worldentities/StaticEntity.h"
 #include "graphics/Billboard.h"
Index: code/trunk/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 11082)
+++ code/trunk/src/orxonox/weaponsystem/Munition.cc	(revision 11083)
@@ -544,5 +544,5 @@
         if (bUseReloadTime && munition->reloadTime_ > 0 && munition->deployment_ != MunitionDeployment::Stack)
         {
-            const ExecutorPtr& executor = createExecutor(createFunctor(&Magazine::loaded, this));
+            const ExecutorPtr executor = createExecutor(createFunctor(&Magazine::loaded, this));
             executor->setDefaultValues(munition);
 
Index: code/trunk/src/orxonox/worldentities/StaticEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/StaticEntity.cc	(revision 11082)
+++ code/trunk/src/orxonox/worldentities/StaticEntity.cc	(revision 11083)
@@ -54,6 +54,7 @@
     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));
+        // Ugly const casts, but are valid because position and orientation are not actually const
+        registerVariable(const_cast<Vector3&>(this->getPosition()),    VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
+        registerVariable(const_cast<Quaternion&>(this->getOrientation()), VariableDirection::ToClient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
     }
 
Index: code/trunk/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 11082)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 11083)
@@ -190,5 +190,6 @@
         registerVariable(this->bVisible_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
 
-        registerVariable(this->getScale3D(),    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
+        // Ugly const cast, but is valid because the scale is not actually const
+        registerVariable(const_cast<Vector3&>(this->getScale3D()),    VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
 
         // Physics stuff
Index: code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h	(revision 11082)
+++ code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h	(revision 11083)
@@ -46,16 +46,16 @@
             virtual ~FpsPlayer();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void tick(float dt);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void tick(float dt) override;
             void registerVariables();
             void setConfigValues();
 
-            virtual void moveFrontBack(const Vector2& value);
-            virtual void moveRightLeft(const Vector2& value);
-            virtual void moveUpDown(const Vector2& value);
+            virtual void moveFrontBack(const Vector2& value) override;
+            virtual void moveRightLeft(const Vector2& value) override;
+            virtual void moveUpDown(const Vector2& value) override;
 
-            virtual void rotateYaw(const Vector2& value);
-            virtual void rotatePitch(const Vector2& value);
-            virtual void rotateRoll(const Vector2& value);
+            virtual void rotateYaw(const Vector2& value) override;
+            virtual void rotatePitch(const Vector2& value) override;
+            virtual void rotateRoll(const Vector2& value) override;
 
 
@@ -65,5 +65,5 @@
                 { return this->meshSrc_; }
 
-            void boost(bool bBoost); //acctually jump
+            void boost(bool bBoost) override; //actually jump
 
             virtual void fire();
@@ -71,9 +71,9 @@
             virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
 
-            virtual void addedWeaponPack(WeaponPack* wPack);
+            virtual void addedWeaponPack(WeaponPack* wPack) override;
 
         protected:
-            virtual void setPlayer(PlayerInfo* player);
-            virtual void startLocalHumanControl();
+            virtual void setPlayer(PlayerInfo* player) override;
+            virtual void startLocalHumanControl() override;
             bool bInvertYAxis_;
 
@@ -89,5 +89,5 @@
 
         private:
-            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
+            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const override;
             float speed_;
 
Index: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11082)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 11083)
@@ -235,6 +235,6 @@
 
         // This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
-        if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)
-            this->moveRightLeft(-lift_ / 5.0f * value * sqrt(abs(this->getLocalVelocity().z)));
+        if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
+            this->moveRightLeft(-lift_ / 5.0f * value * sqrt(std::abs(this->getLocalVelocity().z)));
     }
 
@@ -257,6 +257,6 @@
 
         // This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
-        if (this->getLocalVelocity().z < 0 && abs(this->getLocalVelocity().z) < stallSpeed_)
-            this->moveUpDown(lift_ / 5.0f * pitch * sqrt(abs(this->getLocalVelocity().z)));
+        if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
+            this->moveUpDown(lift_ / 5.0f * pitch * sqrt(std::abs(this->getLocalVelocity().z)));
     }
 
@@ -505,5 +505,5 @@
             this->shakeDt_ += dt;
 
-            float frequency = this->shakeFrequency_ * (square(abs(this->getLocalVelocity().z)));
+            float frequency = this->shakeFrequency_ * (square(std::abs(this->getLocalVelocity().z)));
 
             if (this->shakeDt_ >= 1.0f/frequency)
