Index: code/trunk/src/orxonox/items/Engine.cc
===================================================================
--- code/trunk/src/orxonox/items/Engine.cc	(revision 11052)
+++ code/trunk/src/orxonox/items/Engine.cc	(revision 11071)
@@ -50,5 +50,5 @@
         RegisterObject(Engine);
 
-        this->ship_ = 0;
+        this->ship_ = nullptr;
         this->shipID_ = OBJECTID_UNKNOWN;
         this->relativePosition_ = Vector3::ZERO;
@@ -136,5 +136,5 @@
     void Engine::networkcallback_shipID()
     {
-        this->ship_ = 0;
+        this->ship_ = nullptr;
 
         if (this->shipID_ != OBJECTID_UNKNOWN)
@@ -155,5 +155,5 @@
     void Engine::run(float dt)
     {
-        if (this->ship_ == NULL)
+        if (this->ship_ == nullptr)
         {
             if (this->shipID_ != 0)
@@ -161,5 +161,5 @@
                 this->networkcallback_shipID();
 
-                if (this->ship_ == NULL)
+                if (this->ship_ == nullptr)
                     return;
             }
Index: code/trunk/src/orxonox/items/Engine.h
===================================================================
--- code/trunk/src/orxonox/items/Engine.h	(revision 11052)
+++ code/trunk/src/orxonox/items/Engine.h	(revision 11071)
@@ -59,5 +59,5 @@
             virtual ~Engine();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
             void setConfigValues();
 
@@ -67,5 +67,5 @@
             /**
             @brief Get the SpaceShip this Engine is mounted on.
-            @return Returns a pointer to the SpaceShip. NULL if it isn't mounted on any ship.
+            @return Returns a pointer to the SpaceShip. nullptr if it isn't mounted on any ship.
             */
             inline SpaceShip* getShip() const
Index: code/trunk/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/trunk/src/orxonox/items/MultiStateEngine.cc	(revision 11052)
+++ code/trunk/src/orxonox/items/MultiStateEngine.cc	(revision 11071)
@@ -67,7 +67,7 @@
         else
         {
-            this->defEngineSndBoost_ = 0;
-            this->defEngineSndNormal_ = 0;
-            this->lua_ = 0;
+            this->defEngineSndBoost_ = nullptr;
+            this->defEngineSndNormal_ = nullptr;
+            this->lua_ = nullptr;
         }
         this->state_ = 0;
@@ -85,7 +85,7 @@
             {
                 // We have no ship, so the effects are not attached and won't be destroyed automatically
-                for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
-                    for (std::vector<WorldEntity*>::const_iterator it2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsBegin(); ++it2)
-                        (*it2)->destroy();
+                for (EffectContainer* container : this->effectContainers_)
+                    for (WorldEntity* effect : container->getEffects())
+                        effect->destroy();
                 if (this->defEngineSndNormal_)
                     this->defEngineSndNormal_->destroy();
@@ -124,14 +124,14 @@
                 this->state_ = 0;
                 if (this->getShip()->isBoosting() && forward)
-                    this->state_ = Boost;
+                    this->state_ = EngineState::Boost;
                 else if (forward && !this->state_) // this->state_ == Boost
-                    this->state_ = Normal;
+                    this->state_ = EngineState::Normal;
                 else if (direction.z > 0.0 && velocity.z < 0.0)
-                    this->state_ = Brake;
+                    this->state_ = EngineState::Brake;
                 else
-                    this->state_ = Idle;
-
-                if (this->state_ == Idle && this->getSpeedAdd() > 0)
-                    this->state_ = Normal;
+                    this->state_ = EngineState::Idle;
+
+                if (this->state_ == EngineState::Idle && this->getSpeedAdd() > 0)
+                    this->state_ = EngineState::Normal;
             }
 
@@ -141,33 +141,33 @@
 
                 float pitch = velocity.length();
-                if (this->state_ & Normal)
+                if (this->state_ & EngineState::Normal)
                     defEngineSndNormal_->setPitch(clamp(pitch/MAX_VELOCITY_NORMAL + 1, 0.5f, 2.0f));
-                if (this->state_ & Boost)
+                if (this->state_ & EngineState::Boost)
                     defEngineSndBoost_->setPitch(clamp(pitch/MAX_VELOCITY_BOOST + 1, 0.5f, 2.0f));
 
-                if (changes & Idle)
-                {
-                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & Idle);
+                if (changes & EngineState::Idle)
+                {
+                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & EngineState::Idle);
                     lua_setglobal(this->lua_->getInternalLuaState(), "idle");
                 }
-                if (changes & Normal)
-                {
-                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & Normal);
+                if (changes & EngineState::Normal)
+                {
+                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & EngineState::Normal);
                     lua_setglobal(this->lua_->getInternalLuaState(), "normal");
-                    if (this->state_ & Normal)
+                    if (this->state_ & EngineState::Normal)
                         defEngineSndNormal_->play();
                     else
                         defEngineSndNormal_->stop();
                 }
-                if (changes & Brake)
-                {
-                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & Brake);
+                if (changes & EngineState::Brake)
+                {
+                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & EngineState::Brake);
                     lua_setglobal(this->lua_->getInternalLuaState(), "brake");
                 }
-                if (changes & Boost)
-                {
-                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & Boost);
+                if (changes & EngineState::Boost)
+                {
+                    lua_pushboolean(this->lua_->getInternalLuaState(), this->state_ & EngineState::Boost);
                     lua_setglobal(this->lua_->getInternalLuaState(), "boost");
-                    if (this->state_ & Boost)
+                    if (this->state_ & EngineState::Boost)
                         defEngineSndBoost_->play();
                     else
@@ -178,6 +178,6 @@
 
                 // Update all effect conditions
-                for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
-                    (*it)->updateCondition();
+                for (EffectContainer* container : this->effectContainers_)
+                    container->updateCondition();
             }
         }
@@ -198,19 +198,19 @@
             this->getShip()->attach(defEngineSndBoost_);
 
-        for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
-            for (std::vector<WorldEntity*>::const_iterator it2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsEnd(); ++it2)
-                this->getShip()->attach(*it2);
-    }
-
-    void MultiStateEngine::addEffectContainer(EffectContainer* effect)
-    {
-        if (effect == NULL)
+        for (EffectContainer* container : this->effectContainers_)
+            for (WorldEntity* effect : container->getEffects())
+                this->getShip()->attach(effect);
+    }
+
+    void MultiStateEngine::addEffectContainer(EffectContainer* container)
+    {
+        if (container == nullptr)
             return;
-        effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));
-        this->effectContainers_.push_back(effect);
+        container->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));
+        this->effectContainers_.push_back(container);
         if (this->getShip())
         {
-            for (std::vector<WorldEntity*>::const_iterator it = effect->getEffectsBegin(); it != effect->getEffectsBegin(); ++it)
-                this->getShip()->attach(*it);
+            for (WorldEntity* effect : container->getEffects())
+                this->getShip()->attach(effect);
         }
     }
@@ -219,10 +219,11 @@
     {
         unsigned int i = 0;
-        for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
+        for (EffectContainer* effectContainer : this->effectContainers_)
         {
             if (i == index)
-                return (*it);
-        }
-        return NULL;
+                return effectContainer;
+            i++;
+        }
+        return nullptr;
     }
 
Index: code/trunk/src/orxonox/items/MultiStateEngine.h
===================================================================
--- code/trunk/src/orxonox/items/MultiStateEngine.h	(revision 11052)
+++ code/trunk/src/orxonox/items/MultiStateEngine.h	(revision 11071)
@@ -41,10 +41,10 @@
     {
         public:
-            enum EngineState
+            struct EngineState
             {
-                Idle    = 1,
-                Normal  = 2,
-                Brake   = 4,
-                Boost   = 8
+                static constexpr int Idle    = 1;
+                static constexpr int Normal  = 2;
+                static constexpr int Brake   = 4;
+                static constexpr int Boost   = 8;
             };
 
@@ -52,9 +52,9 @@
             virtual ~MultiStateEngine();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
-            virtual void run(float dt);
+            virtual void run(float dt) override;
 
-            virtual void addToSpaceShip(SpaceShip* ship);
+            virtual void addToSpaceShip(SpaceShip* ship) override;
 
             void addEffectContainer(EffectContainer* effect);
Index: code/trunk/src/orxonox/items/PartDestructionEvent.cc
===================================================================
--- code/trunk/src/orxonox/items/PartDestructionEvent.cc	(revision 11052)
+++ code/trunk/src/orxonox/items/PartDestructionEvent.cc	(revision 11071)
@@ -98,14 +98,14 @@
         {
             switch (this->targetParam_) {
-            case shieldhealth:
+            case TargetParam::shieldhealth:
                 this->parent_->getParent()->setShieldHealth(operate(this->parent_->getParent()->getShieldHealth()));
                 break;
-            case boostpower:
+            case TargetParam::boostpower:
                 this->parent_->getParent()->setInitialBoostPower(operate(this->parent_->getParent()->getInitialBoostPower()));
                 break;
-            case boostpowerrate:
+            case TargetParam::boostpowerrate:
                 this->parent_->getParent()->setBoostPowerRate(operate(this->parent_->getParent()->getBoostPowerRate()));
                 break;
-            case rotationthrust:
+            case TargetParam::rotationthrust:
                 this->parent_->getParent()->setRotationThrust(operate(this->parent_->getParent()->getRotationThrust()));
                 break;
@@ -120,14 +120,14 @@
         {
             switch (this->targetParam_) {
-            case null:
+            case TargetParam::null:
                 this->parent_->getParent()->getEngineByName(targetName_)->destroy();
                 break;
-            case boostfactor:
+            case TargetParam::boostfactor:
                 this->parent_->getParent()->getEngineByName(targetName_)->setBoostFactor(operate(this->parent_->getParent()->getEngineByName(targetName_)->getBoostFactor()));
                 break;
-            case speedfront:
+            case TargetParam::speedfront:
                 this->parent_->getParent()->getEngineByName(targetName_)->setMaxSpeedFront(operate(this->parent_->getParent()->getEngineByName(targetName_)->getMaxSpeedFront()));
                 break;
-            case accelerationfront:
+            case TargetParam::accelerationfront:
                 this->parent_->getParent()->getEngineByName(targetName_)->setAccelerationFront(operate(this->parent_->getParent()->getEngineByName(targetName_)->getAccelerationFront()));
                 break;
@@ -142,5 +142,5 @@
         {
             switch (this->targetParam_) {
-            case null:
+            case TargetParam::null:
                 if (!this->parent_->getParent()->getShipPartByName(targetName_))
                     return;
@@ -214,20 +214,20 @@
             if (param == "NULL")
             {
-                this->targetParam_ = null;
+                this->targetParam_ = TargetParam::null;
                 return;
             }
             if (param == "boostfactor")
             {
-                this->targetParam_ = boostfactor;
+                this->targetParam_ = TargetParam::boostfactor;
                 return;
             }
             if (param == "speedfront")
             {
-                this->targetParam_ = speedfront;
+                this->targetParam_ = TargetParam::speedfront;
                 return;
             }
             if (param == "accelerationfront")
             {
-                this->targetParam_ = accelerationfront;
+                this->targetParam_ = TargetParam::accelerationfront;
                 return;
             }
@@ -244,20 +244,20 @@
             if (param == "shieldhealth")
             {
-                this->targetParam_ = shieldhealth;
+                this->targetParam_ = TargetParam::shieldhealth;
                 return;
             }
             if (param == "boostpower")
             {
-                this->targetParam_ = boostpower;
+                this->targetParam_ = TargetParam::boostpower;
                 return;
             }
             if (param == "boostpowerrate")
             {
-                this->targetParam_ = boostpowerrate;
+                this->targetParam_ = TargetParam::boostpowerrate;
                 return;
             }
             if (param == "rotationthrust")
             {
-                this->targetParam_ = rotationthrust;
+                this->targetParam_ = TargetParam::rotationthrust;
                 return;
             }
@@ -271,5 +271,5 @@
             if (param == "NULL")
             {
-                this->targetParam_ = null;
+                this->targetParam_ = TargetParam::null;
                 return;
             }
Index: code/trunk/src/orxonox/items/PartDestructionEvent.h
===================================================================
--- code/trunk/src/orxonox/items/PartDestructionEvent.h	(revision 11052)
+++ code/trunk/src/orxonox/items/PartDestructionEvent.h	(revision 11071)
@@ -82,5 +82,5 @@
                     List of all allowed parameters.
                 */
-            enum TargetParam
+            enum class TargetParam
             {
                 shieldhealth,
@@ -100,5 +100,5 @@
             virtual ~PartDestructionEvent();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
             void execute();
Index: code/trunk/src/orxonox/items/ShipPart.cc
===================================================================
--- code/trunk/src/orxonox/items/ShipPart.cc	(revision 11052)
+++ code/trunk/src/orxonox/items/ShipPart.cc	(revision 11071)
@@ -49,5 +49,5 @@
 
     ShipPart::ShipPart(Context* context)
-        : Item(context), parent_(NULL)
+        : Item(context), parent_(nullptr)
     {
         RegisterObject(ShipPart);
@@ -121,5 +121,5 @@
     void ShipPart::addEntity(StaticEntity* entity)
     {
-        OrxAssert(entity != NULL, "The Entity cannot be NULL.");
+        OrxAssert(entity != nullptr, "The Entity cannot be nullptr.");
         this->entityList_.push_back(entity);
     }
@@ -129,10 +129,10 @@
         Get the i-th StaticEntity of the ShipPart.
     @return
-        Returns a pointer to the i-the StaticEntity. NULL if there is no StaticEntity with that index.
+        Returns a pointer to the i-the StaticEntity. nullptr if there is no StaticEntity with that index.
     */
     StaticEntity* ShipPart::getEntity(unsigned int index)
     {
         if(this->entityList_.size() >= index)
-            return NULL;
+            return nullptr;
         else
             return this->entityList_[index];
@@ -142,12 +142,12 @@
     @brief
         Check whether the ShipPart has a particular Entity.
-    @param engine
+    @param search
         A pointer to the Entity to be checked.
     */
-    bool ShipPart::hasEntity(StaticEntity* entity) const
-    {
-        for(unsigned int i = 0; i < this->entityList_.size(); i++)
-        {
-            if(this->entityList_[i] == entity)
+    bool ShipPart::hasEntity(StaticEntity* search) const
+    {
+        for(StaticEntity* entity : this->entityList_)
+        {
+            if(entity == search)
                 return true;
         }
@@ -163,5 +163,5 @@
     void ShipPart::addDestructionEvent(PartDestructionEvent* event)
     {
-        OrxAssert(event != NULL, "The PartDestructionEvent cannot be NULL.");
+        OrxAssert(event != nullptr, "The PartDestructionEvent cannot be nullptr.");
         event->setParent(this);
         this->eventList_.push_back(event);
@@ -172,31 +172,17 @@
         Get the i-th PartDestructionEvent of the ShipPart.
     @return
-        Returns a pointer to the i-the PartDestructionEvent. NULL if there is no PartDestructionEvent with that index.
+        Returns a pointer to the i-the PartDestructionEvent. nullptr if there is no PartDestructionEvent with that index.
     */
     PartDestructionEvent* ShipPart::getDestructionEvent(unsigned int index)
     {
         if(this->eventList_.size() <= index)
-            return NULL;
+            return nullptr;
         else
             return this->eventList_[index];
     }
 
-    void ShipPart::setDamageAbsorption(float value)
-    {
-        this->damageAbsorption_ = value;
-    }
-
     void ShipPart::setParent(ModularSpaceShip* ship)
     {
         this->parent_ = ship;
-    }
-
-    /**
-    @brief
-        Sets the health of the ShipPart.
-    */
-    void ShipPart::setHealth(float health)
-    {
-        this->health_ = health;
     }
 
Index: code/trunk/src/orxonox/items/ShipPart.h
===================================================================
--- code/trunk/src/orxonox/items/ShipPart.h	(revision 11052)
+++ code/trunk/src/orxonox/items/ShipPart.h	(revision 11071)
@@ -47,5 +47,5 @@
             virtual ~ShipPart();
 
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
 
             virtual void handleHit(float damage, float healthdamage, float shielddamage, Pawn* originator);
@@ -64,18 +64,20 @@
             PartDestructionEvent* getDestructionEvent(unsigned int index);
 
-            virtual void setDamageAbsorption(float value);
-            inline float getDamageAbsorption()
+            inline void setDamageAbsorption(float value)
+                { this->damageAbsorption_ = value; }
+            inline float getDamageAbsorption() const
                 { return this->damageAbsorption_; }
 
             void setParent(ModularSpaceShip* ship);
-            inline ModularSpaceShip* getParent()
+            inline ModularSpaceShip* getParent() const
                 { return this->parent_; }
 
             inline void setEventExecution(bool var)
                 { this->eventExecution_ = var; }
-            inline bool isEventExecution()
+            inline bool isEventExecution() const
                 { return this->eventExecution_; }
 
-            virtual void setHealth(float health);
+            inline void setHealth(float health)
+                { this->health_ = health; }
             inline void addHealth(float health)
                 { this->setHealth(this->health_ + health); }
