Index: code/branches/cpp11_v2/src/orxonox/Level.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/Level.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/Level.cc	(revision 10821)
@@ -106,8 +106,8 @@
     void Level::networkCallbackTemplatesChanged()
     {
-        for( std::set<std::string>::iterator it = this->networkTemplateNames_.begin(); it!=this->networkTemplateNames_.end(); ++it )
-        {
-            assert(Template::getTemplate(*it));
-            Template::getTemplate(*it)->applyOn(this);
+        for(const auto & elem : this->networkTemplateNames_)
+        {
+            assert(Template::getTemplate(elem));
+            Template::getTemplate(elem)->applyOn(this);
         }
     }
@@ -135,6 +135,6 @@
         //       objects alive when ~Level is called. This is the reason why we cannot directly destroy() the Plugins - instead we need
         //       to call destroyLater() to ensure that no instances from this plugin exist anymore.
-        for (std::list<PluginReference*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)
-            (*it)->destroyLater();
+        for (auto & elem : this->plugins_)
+            (elem)->destroyLater();
         this->plugins_.clear();
     }
@@ -173,8 +173,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        for (const auto & elem : this->objects_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: code/branches/cpp11_v2/src/orxonox/LevelInfo.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/LevelInfo.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/LevelInfo.cc	(revision 10821)
@@ -107,6 +107,6 @@
         SubString substr = SubString(tags, ",", " "); // Split the string into tags.
         const std::vector<std::string>& strings = substr.getAllStrings();
-        for (std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
-            this->addTag(*it, false);
+        for (const auto & strings_it : strings)
+            this->addTag(strings_it, false);
 
         this->tagsUpdated();
@@ -122,6 +122,6 @@
         SubString substr = SubString(ships, ",", " "); // Split the string into tags.
         const std::vector<std::string>& strings = substr.getAllStrings();
-        for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); it++)
-            this->addStartingShip(*it, false);
+        for(const auto & strings_it : strings)
+            this->addStartingShip(strings_it, false);
 
         this->startingshipsUpdated();
Index: code/branches/cpp11_v2/src/orxonox/LevelManager.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/LevelManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/LevelManager.cc	(revision 10821)
@@ -175,6 +175,6 @@
             this->levels_.front()->setActive(true);
             // Make every player enter the newly activated level.
-            for (std::map<unsigned int, PlayerInfo*>::const_iterator it = PlayerManager::getInstance().getClients().begin(); it != PlayerManager::getInstance().getClients().end(); ++it)
-                this->levels_.front()->playerEntered(it->second);
+            for (const auto & elem : PlayerManager::getInstance().getClients())
+                this->levels_.front()->playerEntered(elem.second);
         }
     }
Index: code/branches/cpp11_v2/src/orxonox/Scene.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/Scene.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/Scene.cc	(revision 10821)
@@ -220,9 +220,8 @@
         {
             // Remove all WorldEntities and shove them to the queue since they would still like to be in a physical world.
-            for (std::set<WorldEntity*>::const_iterator it = this->physicalObjects_.begin();
-                it != this->physicalObjects_.end(); ++it)
+            for (const auto & elem : this->physicalObjects_)
             {
-                this->physicalWorld_->removeRigidBody((*it)->physicalBody_);
-                this->physicalObjectQueue_.insert(*it);
+                this->physicalWorld_->removeRigidBody((elem)->physicalBody_);
+                this->physicalObjectQueue_.insert(elem);
             }
             this->physicalObjects_.clear();
@@ -256,9 +255,8 @@
             {
                 // Add all scheduled WorldEntities
-                for (std::set<WorldEntity*>::const_iterator it = this->physicalObjectQueue_.begin();
-                    it != this->physicalObjectQueue_.end(); ++it)
+                for (const auto & elem : this->physicalObjectQueue_)
                 {
-                    this->physicalWorld_->addRigidBody((*it)->physicalBody_);
-                    this->physicalObjects_.insert(*it);
+                    this->physicalWorld_->addRigidBody((elem)->physicalBody_);
+                    this->physicalObjects_.insert(elem);
                 }
                 this->physicalObjectQueue_.clear();
@@ -321,8 +319,8 @@
     {
         unsigned int i = 0;
-        for (std::list<BaseObject*>::const_iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+        for (const auto & elem : this->objects_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
Index: code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/collisionshapes/CompoundCollisionShape.cc	(revision 10821)
@@ -65,11 +65,10 @@
         {
             // Delete all children
-            for (std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.begin();
-                it != this->attachedShapes_.end(); ++it)
+            for (auto & elem : this->attachedShapes_)
             {
                 // make sure that the child doesn't want to detach itself --> speedup because of the missing update
-                it->first->notifyDetached();
-                it->first->destroy();
-                if (this->collisionShape_ == it->second)
+                elem.first->notifyDetached();
+                elem.first->destroy();
+                if (this->collisionShape_ == elem.second)
                     this->collisionShape_ = nullptr; // don't destroy it twice
             }
@@ -247,8 +246,8 @@
     {
         unsigned int i = 0;
-        for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); ++it)
+        for (const auto & elem : this->attachedShapes_)
         {
             if (i == index)
-                return it->first;
+                return elem.first;
             ++i;
         }
@@ -267,6 +266,6 @@
         std::vector<CollisionShape*> shapes;
         // Iterate through all attached CollisionShapes and add them to the list of shapes.
-        for(std::map<CollisionShape*, btCollisionShape*>::iterator it = this->attachedShapes_.begin(); it != this->attachedShapes_.end(); it++)
-            shapes.push_back(it->first);
+        for(auto & elem : this->attachedShapes_)
+            shapes.push_back(elem.first);
 
         // Delete the compound shape and create a new one.
@@ -275,7 +274,7 @@
 
         // Re-attach all CollisionShapes.
-        for(std::vector<CollisionShape*>::iterator it = shapes.begin(); it != shapes.end(); it++)
-        {
-            CollisionShape* shape = *it;
+        for(auto shape : shapes)
+        {
+            
             shape->setScale3D(this->getScale3D());
             // Only actually attach if we didn't pick a CompoundCollisionShape with no content.
Index: code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/controllers/FormationController.cc	(revision 10821)
@@ -440,8 +440,8 @@
                 if(newMaster->slaves_.size() > this->maxFormationSize_) continue;
 
-                for(std::vector<FormationController*>::iterator itSlave = this->slaves_.begin(); itSlave != this->slaves_.end(); itSlave++)
+                for(auto & elem : this->slaves_)
                 {
-                    (*itSlave)->myMaster_ = newMaster;
-                    newMaster->slaves_.push_back(*itSlave);
+                    (elem)->myMaster_ = newMaster;
+                    newMaster->slaves_.push_back(elem);
                 }
                 this->slaves_.clear();
@@ -486,5 +486,5 @@
             int i = 1;
 
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
+            for(auto & elem : slaves_)
             {
                 pos = Vector3::ZERO;
@@ -497,6 +497,6 @@
                     dest+=FORMATION_LENGTH*(orient*WorldEntity::BACK);
                 }
-                (*it)->setTargetOrientation(orient);
-                (*it)->setTargetPosition(pos);
+                (elem)->setTargetOrientation(orient);
+                (elem)->setTargetPosition(pos);
                 left=!left;
             }
@@ -569,8 +569,8 @@
         if(this->state_ != MASTER) return;
 
-        for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-        {
-            (*it)->state_ = FREE;
-            (*it)->myMaster_ = nullptr;
+        for(auto & elem : slaves_)
+        {
+            (elem)->state_ = FREE;
+            (elem)->myMaster_ = nullptr;
         }
         this->slaves_.clear();
@@ -584,10 +584,10 @@
         if(this->state_ != MASTER) return;
 
-        for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-        {
-            (*it)->state_ = FREE;
-            (*it)->forceFreedom();
-            (*it)->targetPosition_ = this->targetPosition_;
-            (*it)->bShooting_ = true;
+        for(auto & elem : slaves_)
+        {
+            (elem)->state_ = FREE;
+            (elem)->forceFreedom();
+            (elem)->targetPosition_ = this->targetPosition_;
+            (elem)->bShooting_ = true;
 //             (*it)->getControllableEntity()->fire(0);// fire once for fun
         }
@@ -650,7 +650,7 @@
             this->slaves_.push_back(this->myMaster_);
             //set this as new master
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-            {
-                 (*it)->myMaster_=this;
+            for(auto & elem : slaves_)
+            {
+                 (elem)->myMaster_=this;
             }
             this->myMaster_=nullptr;
@@ -694,9 +694,9 @@
         if (this->state_ == MASTER)
         {
-            for(std::vector<FormationController*>::iterator it = slaves_.begin(); it != slaves_.end(); it++)
-            {
-                 (*it)->formationMode_ = val;
+            for(auto & elem : slaves_)
+            {
+                 (elem)->formationMode_ = val;
                  if (val == ATTACK)
-                     (*it)->forgetTarget();
+                     (elem)->forgetTarget();
             }
         }
Index: code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/controllers/WaypointController.cc	(revision 10821)
@@ -44,8 +44,8 @@
     WaypointController::~WaypointController()
     {
-        for (size_t i = 0; i < this->waypoints_.size(); ++i)
+        for (auto & elem : this->waypoints_)
         {
-            if(this->waypoints_[i])
-                this->waypoints_[i]->destroy();
+            if(elem)
+                elem->destroy();
         }
     }
Index: code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gamestates/GSLevel.cc	(revision 10821)
@@ -251,6 +251,6 @@
 
         // delete states
-        for (size_t i = 0; i < states.size(); ++i)
-            delete states[i];
+        for (auto & state : states)
+            delete state;
     }
 
Index: code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/Dynamicmatch.cc	(revision 10821)
@@ -405,9 +405,9 @@
     void Dynamicmatch::rewardPig()
     {
-        for (std::map< PlayerInfo*, int >::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it) //durch alle Spieler iterieren und alle piggys finden
-        {
-            if (it->second==piggy)//Spieler mit der Pig-party frags++
-            {
-                 this->playerScored(it->first);
+        for (auto & elem : this->playerParty_) //durch alle Spieler iterieren und alle piggys finden
+        {
+            if (elem.second==piggy)//Spieler mit der Pig-party frags++
+            {
+                 this->playerScored(elem.first);
             }
         }
@@ -422,9 +422,9 @@
 
                 std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
-                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
-                {
-                    if ((*it)->isA(Class(TeamColourable)))
+                for (const auto & pawnAttachment : pawnAttachments)
+                {
+                    if ((pawnAttachment)->isA(Class(TeamColourable)))
                     {
-                        TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+                        TeamColourable* tc = orxonox_cast<TeamColourable*>(pawnAttachment);
                         tc->setTeamColour(this->partyColours_[it_player->second]);
                     }
@@ -441,11 +441,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -456,26 +456,26 @@
              if(tutorial&&(!notEnoughKillers)&&(!notEnoughChasers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)//in order to catch nullpointer
+                       if (!elem.first)//in order to catch nullpointer
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -490,11 +490,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -505,26 +505,26 @@
             if(tutorial&&(!notEnoughPigs)&&(!notEnoughChasers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)
+                       if (!elem.first)
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[piggy]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[piggy]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -540,11 +540,11 @@
             if (tutorial) // Announce selectionphase
             {
-             for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-                {
-                    if (!it->first)//in order to catch nullpointer
+             for (auto & elem : this->playerParty_)
+                {
+                    if (!elem.first)//in order to catch nullpointer
                         continue;
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                    this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
                 }
             }
@@ -555,26 +555,26 @@
              if(tutorial&&(!notEnoughPigs)&&(!notEnoughKillers)) //Selection phase over
              {
-                  for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
+                  for (auto & elem : this->playerParty_)
                   {
-                       if (!it->first)
+                       if (!elem.first)
                            continue;
-                       if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                       if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                            continue;
-                       else if (it->second==chaser)
+                       else if (elem.second==chaser)
                        {
                            if (numberOf[killer]>0)
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible. Defend yourself against the killers.",elem.first->getClientID(),partyColours_[piggy]);
                            else
-                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",it->first->getClientID(),partyColours_[piggy]);
+                               this->gtinfo_->sendStaticMessage("Shoot at the victim as often as possible.",elem.first->getClientID(),partyColours_[piggy]);
                            //this->gtinfo_->sendFadingMessage("You're now a chaser.",it->first->getClientID());
                        }
-                       else if (it->second==piggy)
-                       {
-                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==piggy)
+                       {
+                           this->gtinfo_->sendStaticMessage("Either hide or shoot a chaser.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a victim.",it->first->getClientID());
                        }
-                       else if (it->second==killer)
-                       {
-                           this->gtinfo_->sendStaticMessage("Take the chasers down.",it->first->getClientID(),partyColours_[chaser]);
+                       else if (elem.second==killer)
+                       {
+                           this->gtinfo_->sendStaticMessage("Take the chasers down.",elem.first->getClientID(),partyColours_[chaser]);
                            //this->gtinfo_->sendFadingMessage("You're now a killer.",it->first->getClientID());
                        }
@@ -620,9 +620,9 @@
         else if(tutorial) // Announce selectionphase
         {
-            for (std::map<PlayerInfo*, int>::iterator it = this->playerParty_.begin(); it != this->playerParty_.end(); ++it)
-            {
-                if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+            for (auto & elem : this->playerParty_)
+            {
+                if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                     continue;
-                this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",it->first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
+                this->gtinfo_->sendStaticMessage("Selection phase: Shoot at everything that moves.",elem.first->getClientID(),ColourValue(1.0f, 1.0f, 0.5f));
             }
         }
@@ -676,8 +676,8 @@
             unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
             unsigned int index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
-                    return (*it);
+                    return (teamSpawnPoint);
 
                 ++index;
Index: code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/Gametype.cc	(revision 10821)
@@ -139,9 +139,9 @@
         if (!this->gtinfo_->hasStarted())
         {
-            for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+            for (auto & elem : this->players_)
             {
                 // Inform the GametypeInfo that the player is ready to spawn.
-                if(it->first->isHumanPlayer() && it->first->isReadyToSpawn())
-                    this->gtinfo_->playerReadyToSpawn(it->first);
+                if(elem.first->isHumanPlayer() && elem.first->isReadyToSpawn())
+                    this->gtinfo_->playerReadyToSpawn(elem.first);
             }
 
@@ -169,9 +169,9 @@
         }
 
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->getControllableEntity())
-            {
-                ControllableEntity* oldentity = it->first->getControllableEntity();
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->getControllableEntity())
+            {
+                ControllableEntity* oldentity = elem.first->getControllableEntity();
 
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(oldentity->getContext());
@@ -186,8 +186,8 @@
                     entity->setOrientation(oldentity->getWorldOrientation());
                 }
-                it->first->startControl(entity);
+                elem.first->startControl(entity);
             }
             else
-                this->spawnPlayerAsDefaultPawn(it->first);
+                this->spawnPlayerAsDefaultPawn(elem.first);
         }
     }
@@ -341,11 +341,11 @@
             unsigned int index = 0;
             std::vector<SpawnPoint*> activeSpawnPoints;
-            for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
+            for (const auto & elem : this->spawnpoints_)
             {
                 if (index == randomspawn)
-                    fallbackSpawnPoint = (*it);
-
-                if (*it != nullptr && (*it)->isActive())
-                    activeSpawnPoints.push_back(*it);
+                    fallbackSpawnPoint = (elem);
+
+                if (elem != nullptr && (elem)->isActive())
+                    activeSpawnPoints.push_back(elem);
 
                 ++index;
@@ -366,14 +366,14 @@
     void Gametype::assignDefaultPawnsIfNeeded()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (!it->first->getControllableEntity())
-            {
-                it->second.state_ = PlayerState::Dead;
-
-                if (!it->first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
-                {
-                    this->spawnPlayerAsDefaultPawn(it->first);
-                    it->second.state_ = PlayerState::Dead;
+        for (auto & elem : this->players_)
+        {
+            if (!elem.first->getControllableEntity())
+            {
+                elem.second.state_ = PlayerState::Dead;
+
+                if (!elem.first->isReadyToSpawn() || !this->gtinfo_->hasStarted())
+                {
+                    this->spawnPlayerAsDefaultPawn(elem.first);
+                    elem.second.state_ = PlayerState::Dead;
                 }
             }
@@ -404,9 +404,9 @@
                     bool allplayersready = true;
                     bool hashumanplayers = false;
-                    for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+                    for (auto & elem : this->players_)
                     {
-                        if (!it->first->isReadyToSpawn())
+                        if (!elem.first->isReadyToSpawn())
                             allplayersready = false;
-                        if (it->first->isHumanPlayer())
+                        if (elem.first->isHumanPlayer())
                             hashumanplayers = true;
                     }
@@ -430,8 +430,8 @@
     void Gametype::spawnPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isReadyToSpawn() || this->bForceSpawn_)
-                this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isReadyToSpawn() || this->bForceSpawn_)
+                this->spawnPlayer(elem.first);
         }
     }
@@ -439,8 +439,8 @@
     void Gametype::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-                if (it->first->isReadyToSpawn() || this->bForceSpawn_)
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+                if (elem.first->isReadyToSpawn() || this->bForceSpawn_)
+                    this->spawnPlayer(elem.first);
     }
 
@@ -538,9 +538,9 @@
     GSLevelMementoState* Gametype::exportMementoState()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isHumanPlayer() && it->first->getControllableEntity() && it->first->getControllableEntity()->getCamera())
-            {
-                Camera* camera = it->first->getControllableEntity()->getCamera();
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isHumanPlayer() && elem.first->getControllableEntity() && elem.first->getControllableEntity()->getCamera())
+            {
+                Camera* camera = elem.first->getControllableEntity()->getCamera();
 
                 GametypeMementoState* state = new GametypeMementoState();
@@ -559,7 +559,7 @@
         // find correct memento state
         GametypeMementoState* state = nullptr;
-        for (size_t i = 0; i < states.size(); ++i)
-        {
-            state = dynamic_cast<GametypeMementoState*>(states[i]);
+        for (auto & states_i : states)
+        {
+            state = dynamic_cast<GametypeMementoState*>(states_i);
             if (state)
                 break;
@@ -587,12 +587,12 @@
 
         // find correct player and assign default entity with original position & orientation
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if (it->first->isHumanPlayer())
+        for (auto & elem : this->players_)
+        {
+            if (elem.first->isHumanPlayer())
             {
                 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(scene->getContext());
                 entity->setPosition(state->cameraPosition_);
                 entity->setOrientation(state->cameraOrientation_);
-                it->first->startControl(entity);
+                elem.first->startControl(entity);
                 break;
             }
Index: code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/LastManStanding.cc	(revision 10821)
@@ -56,11 +56,11 @@
     void LastManStanding::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                bool alive = (0<playerLives_[it->first]&&(inGame_[it->first]));
-                if (alive&&(it->first->isReadyToSpawn() || this->bForceSpawn_))
-                {
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                bool alive = (0<playerLives_[elem.first]&&(inGame_[elem.first]));
+                if (alive&&(elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                {
+                    this->spawnPlayer(elem.first);
                 }
             }
@@ -114,10 +114,10 @@
     {
         int min=lives;
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->second<=0)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.second<=0)
                 continue;
-            if (it->second<lives)
-                min=it->second;
+            if (elem.second<lives)
+                min=elem.second;
         }
         return min;
@@ -128,13 +128,13 @@
         Gametype::end();
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second > 0)
-                this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+            if (elem.second > 0)
+                this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
             else
-                this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
         }
     }
@@ -237,39 +237,39 @@
                 this->end();
             }
-            for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
-            {
-                if (playerGetLives(it->first)<=0)//Players without lives shouldn't be affected by time.
+            for (auto & elem : this->timeToAct_)
+            {
+                if (playerGetLives(elem.first)<=0)//Players without lives shouldn't be affected by time.
                     continue;
-                it->second-=dt;//Decreases punishment time.
-                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
-                {
-                    playerDelayTime_[it->first]-=dt;
-                    if (playerDelayTime_[it->first]<=0)
-                    this->inGame_[it->first]=true;
-
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                elem.second-=dt;//Decreases punishment time.
+                if (!inGame_[elem.first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
+                {
+                    playerDelayTime_[elem.first]-=dt;
+                    if (playerDelayTime_[elem.first]<=0)
+                    this->inGame_[elem.first]=true;
+
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    int output=1+(int)playerDelayTime_[it->first];
+                    int output=1+(int)playerDelayTime_[elem.first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-                }
-                else if (it->second<0.0f)
-                {
-                    it->second=timeRemaining+3.0f;//reset punishment-timer
-                    if (playerGetLives(it->first)>0)
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
+                }
+                else if (elem.second<0.0f)
+                {
+                    elem.second=timeRemaining+3.0f;//reset punishment-timer
+                    if (playerGetLives(elem.first)>0)
                     {
-                        this->punishPlayer(it->first);
-                        if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                        this->punishPlayer(elem.first);
+                        if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                             return;
                         const std::string& message = ""; // resets Camper-Warning-message
-                        this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
+                        this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
                     }
                 }
-                else if (it->second<timeRemaining/5)//Warning message
-                {
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                else if (elem.second<timeRemaining/5)//Warning message
+                {
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
                     const std::string& message = "Camper Warning! Don't forget to shoot.";
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
                 }
             }
Index: code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/LastTeamStanding.cc	(revision 10821)
@@ -145,11 +145,11 @@
     void LastTeamStanding::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                bool alive = (0 < playerLives_[it->first]&&(inGame_[it->first]));
-                if (alive&&(it->first->isReadyToSpawn() || this->bForceSpawn_))
-                {
-                    this->spawnPlayer(it->first);
+        for (auto & elem : this->players_)
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                bool alive = (0 < playerLives_[elem.first]&&(inGame_[elem.first]));
+                if (alive&&(elem.first->isReadyToSpawn() || this->bForceSpawn_))
+                {
+                    this->spawnPlayer(elem.first);
                 }
             }
@@ -184,39 +184,39 @@
                 this->end();
             }
-            for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
-            {
-                if (playerGetLives(it->first) <= 0)//Players without lives shouldn't be affected by time.
+            for (auto & elem : this->timeToAct_)
+            {
+                if (playerGetLives(elem.first) <= 0)//Players without lives shouldn't be affected by time.
                     continue;
-                it->second -= dt;//Decreases punishment time.
-                if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
-                {
-                    playerDelayTime_[it->first] -= dt;
-                    if (playerDelayTime_[it->first] <= 0)
-                    this->inGame_[it->first] = true;
-
-                    if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                elem.second -= dt;//Decreases punishment time.
+                if (!inGame_[elem.first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
+                {
+                    playerDelayTime_[elem.first] -= dt;
+                    if (playerDelayTime_[elem.first] <= 0)
+                    this->inGame_[elem.first] = true;
+
+                    if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
-                    int output = 1 + (int)playerDelayTime_[it->first];
+                    int output = 1 + (int)playerDelayTime_[elem.first];
                     const std::string& message = "Respawn in " +multi_cast<std::string>(output)+ " seconds." ;//Countdown
-                    this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
-                }
-                else if (it->second < 0.0f)
-                {
-                    it->second = timeRemaining + 3.0f;//reset punishment-timer
-                    if (playerGetLives(it->first) > 0)
+                    this->gtinfo_->sendFadingMessage(message,elem.first->getClientID());
+                }
+                else if (elem.second < 0.0f)
+                {
+                    elem.second = timeRemaining + 3.0f;//reset punishment-timer
+                    if (playerGetLives(elem.first) > 0)
                     {
-                        this->punishPlayer(it->first);
-                        if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                        this->punishPlayer(elem.first);
+                        if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                             return;
                         const std::string& message = ""; // resets Camper-Warning-message
-                        this->gtinfo_->sendFadingMessage(message, it->first->getClientID());
+                        this->gtinfo_->sendFadingMessage(message, elem.first->getClientID());
                     }
                 }
-                else if (it->second < timeRemaining/5)//Warning message
-                {
-                  if (it->first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
+                else if (elem.second < timeRemaining/5)//Warning message
+                {
+                  if (elem.first->getClientID()== NETWORK_PEER_ID_UNKNOWN)
                         continue;
                     const std::string& message = "Camper Warning! Don't forget to shoot.";
-                    this->gtinfo_->sendFadingMessage(message, it->first->getClientID());
+                    this->gtinfo_->sendFadingMessage(message, elem.first->getClientID());
                 }
             }
@@ -229,13 +229,13 @@
         int party = -1;
         //find a player who survived
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-          if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->playerLives_)
+        {
+          if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second > 0)//a player that is alive
+            if (elem.second > 0)//a player that is alive
             {
                 //which party has survived?
-                std::map<PlayerInfo*, int>::iterator it2 = this->teamnumbers_.find(it->first);
+                std::map<PlayerInfo*, int>::iterator it2 = this->teamnumbers_.find(elem.first);
                 if (it2 != this->teamnumbers_.end())
                 {
@@ -255,10 +255,10 @@
     {
         int min = lives;
-        for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
-        {
-            if (it->second <= 0)
+        for (auto & elem : this->playerLives_)
+        {
+            if (elem.second <= 0)
                 continue;
-            if (it->second < lives)
-                min = it->second;
+            if (elem.second < lives)
+                min = elem.second;
         }
         return min;
Index: code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/TeamBaseMatch.cc	(revision 10821)
@@ -152,11 +152,11 @@
         int amountControlled2 = 0;
 
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
-        {
-            if((*it)->getState() == BaseState::ControlTeam1)
+        for (const auto & elem : this->bases_)
+        {
+            if((elem)->getState() == BaseState::ControlTeam1)
             {
                 amountControlled++;
             }
-            if((*it)->getState() == BaseState::ControlTeam2)
+            if((elem)->getState() == BaseState::ControlTeam2)
             {
                 amountControlled2++;
@@ -187,13 +187,13 @@
             }
 
-            for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-            {
-                if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+            for (auto & elem : this->teamnumbers_)
+            {
+                if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                     continue;
 
-                if (it->second == winningteam)
-                    this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+                if (elem.second == winningteam)
+                    this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
                 else
-                    this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                    this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
             }
 
@@ -238,9 +238,9 @@
         int count = 0;
 
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
-        {
-            if ((*it)->getState() == BaseState::ControlTeam1 && team == 0)
+        for (const auto & elem : this->bases_)
+        {
+            if ((elem)->getState() == BaseState::ControlTeam1 && team == 0)
                 count++;
-            if ((*it)->getState() == BaseState::ControlTeam2 && team == 1)
+            if ((elem)->getState() == BaseState::ControlTeam2 && team == 1)
                 count++;
         }
@@ -258,9 +258,9 @@
     {
         unsigned int i = 0;
-        for (std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.begin(); it != this->bases_.end(); ++it)
+        for (const auto & elem : this->bases_)
         {
             i++;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
Index: code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 10821)
@@ -69,10 +69,10 @@
         int winnerTeam = 0;
         int highestScore = 0;
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        for (auto & elem : this->players_)
         {
-            if ( this->getTeamScore(it->first) > highestScore )
+            if ( this->getTeamScore(elem.first) > highestScore )
             {
-                winnerTeam = this->getTeam(it->first);
-                highestScore = this->getTeamScore(it->first);
+                winnerTeam = this->getTeam(elem.first);
+                highestScore = this->getTeamScore(elem.first);
             }
         }
Index: code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/TeamGametype.cc	(revision 10821)
@@ -99,7 +99,7 @@
         std::vector<unsigned int> playersperteam(this->teams_, 0);
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-            if (it->second < static_cast<int>(this->teams_) && it->second >= 0)
-                playersperteam[it->second]++;
+        for (auto & elem : this->teamnumbers_)
+            if (elem.second < static_cast<int>(this->teams_) && elem.second >= 0)
+                playersperteam[elem.second]++;
 
         unsigned int minplayers = static_cast<unsigned int>(-1);
@@ -123,8 +123,8 @@
         if( (this->players_.size() >= maxPlayers_) && (allowedInGame_[player] == true) ) // if there's a "waiting list"
         {
-            for (std::map<PlayerInfo*, bool>::iterator it = this->allowedInGame_.begin(); it != this->allowedInGame_.end(); ++it)
-            {
-                 if(it->second == false) // waiting player found
-                 {it->second = true; break;} // allow player to enter
+            for (auto & elem : this->allowedInGame_)
+            {
+                 if(elem.second == false) // waiting player found
+                 {elem.second = true; break;} // allow player to enter
             }
         }
@@ -141,15 +141,15 @@
     void TeamGametype::spawnDeadPlayersIfRequested()
     {
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)\
-        {
-            if(allowedInGame_[it->first] == false)//check if dead player is allowed to enter
+        for (auto & elem : this->players_)\
+        {
+            if(allowedInGame_[elem.first] == false)//check if dead player is allowed to enter
             {
                 continue;
             }
-            if (it->second.state_ == PlayerState::Dead)
-            {
-                if ((it->first->isReadyToSpawn() || this->bForceSpawn_))
+            if (elem.second.state_ == PlayerState::Dead)
+            {
+                if ((elem.first->isReadyToSpawn() || this->bForceSpawn_))
                 {
-                   this->spawnPlayer(it->first);
+                   this->spawnPlayer(elem.first);
                 }
             }
@@ -178,9 +178,9 @@
         if(!player || this->getTeam(player) == -1)
             return 0;
-        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
-        {
-            if ( this->getTeam(it->first) ==  this->getTeam(player) )
-            {
-                teamscore += it->second.frags_;
+        for (auto & elem : this->players_)
+        {
+            if ( this->getTeam(elem.first) ==  this->getTeam(player) )
+            {
+                teamscore += elem.second.frags_;
             }
         }
@@ -191,7 +191,7 @@
     {
         int teamSize = 0;
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->second == team)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.second == team)
                 teamSize++;
         }
@@ -202,7 +202,7 @@
     {
         int teamSize = 0;
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->second == team  && it->first->isHumanPlayer())
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.second == team  && elem.first->isHumanPlayer())
                 teamSize++;
         }
@@ -241,9 +241,9 @@
             unsigned int index = 0;
             // Get random fallback spawnpoint in case there is no active SpawnPoint.
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
                 {
-                    fallbackSpawnPoint = (*it);
+                    fallbackSpawnPoint = (teamSpawnPoint);
                     break;
                 }
@@ -266,8 +266,8 @@
             randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(teamSpawnPoints.size())));
             index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            for (const auto & teamSpawnPoint : teamSpawnPoints)
             {
                 if (index == randomspawn)
-                    return (*it);
+                    return (teamSpawnPoint);
 
                 ++index;
@@ -364,9 +364,9 @@
 
         std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
-        for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
-        {
-            if ((*it)->isA(Class(TeamColourable)))
-            {
-                TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+        for (const auto & pawnAttachment : pawnAttachments)
+        {
+            if ((pawnAttachment)->isA(Class(TeamColourable)))
+            {
+                TeamColourable* tc = orxonox_cast<TeamColourable*>(pawnAttachment);
                 tc->setTeamColour(this->teamcolours_[teamNr]);
             }
@@ -376,15 +376,15 @@
     void TeamGametype::announceTeamWin(int winnerTeam)
     {
-        for (std::map<PlayerInfo*, int>::iterator it3 = this->teamnumbers_.begin(); it3 != this->teamnumbers_.end(); ++it3)
-        {
-            if (it3->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
-            if (it3->second == winnerTeam)
-            {
-                this->gtinfo_->sendAnnounceMessage("Your team has won the match!", it3->first->getClientID());
+            if (elem.second == winnerTeam)
+            {
+                this->gtinfo_->sendAnnounceMessage("Your team has won the match!", elem.first->getClientID());
             }
             else
             {
-                this->gtinfo_->sendAnnounceMessage("Your team has lost the match!", it3->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("Your team has lost the match!", elem.first->getClientID());
             }
         }   
Index: code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/gametypes/UnderAttack.cc	(revision 10821)
@@ -74,13 +74,13 @@
         this->gameEnded_ = true;
 
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-        {
-            if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+        for (auto & elem : this->teamnumbers_)
+        {
+            if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                 continue;
 
-            if (it->second == attacker_)
-                this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+            if (elem.second == attacker_)
+                this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
             else
-                this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
         }
     }
@@ -155,13 +155,13 @@
                 ChatManager::message(message);
 
-                for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-                {
-                    if (it->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                for (auto & elem : this->teamnumbers_)
+                {
+                    if (elem.first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
                         continue;
 
-                    if (it->second == 1)
-                        this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
+                    if (elem.second == 1)
+                        this->gtinfo_->sendAnnounceMessage("You have won the match!", elem.first->getClientID());
                     else
-                        this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
+                        this->gtinfo_->sendAnnounceMessage("You have lost the match!", elem.first->getClientID());
                 }
             }
Index: code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/interfaces/PickupCarrier.cc	(revision 10821)
@@ -135,9 +135,9 @@
         // Go recursively through all children to check whether they are the target.
         std::vector<PickupCarrier*>* children = this->getCarrierChildren();
-        for(std::vector<PickupCarrier*>::iterator it = children->begin(); it != children->end(); it++)
+        for(auto & elem : *children)
         {
-            if(pickup->isTarget(*it))
+            if(pickup->isTarget(elem))
             {
-                target = *it;
+                target = elem;
                 break;
             }
Index: code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/interfaces/Pickupable.cc	(revision 10821)
@@ -160,7 +160,7 @@
     {
         // Iterate through all targets of this Pickupable.
-        for(std::list<Identifier*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
+        for(const auto & elem : this->targets_)
         {
-            if(identifier->isA(*it))
+            if(identifier->isA(elem))
                 return true;
         }
Index: code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/items/MultiStateEngine.cc	(revision 10821)
@@ -219,8 +219,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
+        for (const auto & elem : this->effectContainers_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
+            i++;
         }
         return nullptr;
Index: code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/items/ShipPart.cc	(revision 10821)
@@ -148,7 +148,7 @@
     bool ShipPart::hasEntity(StaticEntity* entity) const
     {
-        for(unsigned int i = 0; i < this->entityList_.size(); i++)
-        {
-            if(this->entityList_[i] == entity)
+        for(auto & elem : this->entityList_)
+        {
+            if(elem == entity)
                 return true;
         }
Index: code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc	(revision 10821)
@@ -62,6 +62,6 @@
     OverlayGroup::~OverlayGroup()
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->destroy();
+        for (const auto & elem : hudElements_)
+            (elem)->destroy();
         this->hudElements_.clear();
     }
@@ -86,6 +86,6 @@
     void OverlayGroup::setScale(const Vector2& scale)
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->scale(scale / this->scale_);
+        for (const auto & elem : hudElements_)
+            (elem)->scale(scale / this->scale_);
         this->scale_ = scale;
     }
@@ -94,6 +94,6 @@
     void OverlayGroup::setScroll(const Vector2& scroll)
     {
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->scroll(scroll - this->scroll_);
+        for (const auto & elem : hudElements_)
+            (elem)->scroll(scroll - this->scroll_);
         this->scroll_ = scroll;
     }
@@ -147,6 +147,6 @@
         SUPER( OverlayGroup, changedVisibility );
 
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed
+        for (const auto & elem : hudElements_)
+            (elem)->changedVisibility(); //inform all Child Overlays that our visibility has changed
     }
 
@@ -155,6 +155,6 @@
         this->owner_ = owner;
 
-        for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)
-            (*it)->setOwner(owner);
+        for (const auto & elem : hudElements_)
+            (elem)->setOwner(owner);
     }
 
Index: code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc	(revision 10821)
@@ -407,10 +407,10 @@
         if (ambient != nullptr)
         {
-            for (AmbientList::iterator it = this->ambientSounds_.begin(); it != this->ambientSounds_.end(); ++it)
-            {
-                if (it->first == ambient)
+            for (auto & elem : this->ambientSounds_)
+            {
+                if (elem.first == ambient)
                 {
-                    it->second = true;
-                    this->fadeOut(it->first);
+                    elem.second = true;
+                    this->fadeOut(elem.first);
                     return;
                 }
Index: code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/sound/SoundStreamer.cc	(revision 10821)
@@ -68,5 +68,5 @@
         int current_section;
 
-        for(int i = 0; i < 4; i++)
+        for(auto & initbuffer : initbuffers)
         {
             long ret = ov_read(&vf, inbuffer, sizeof(inbuffer), 0, 2, 1, &current_section);
@@ -82,5 +82,5 @@
             }
 
-            alBufferData(initbuffers[i], format, &inbuffer, ret, vorbisInfo->rate);
+            alBufferData(initbuffer, format, &inbuffer, ret, vorbisInfo->rate);
         }
         alSourceQueueBuffers(audioSource, 4, initbuffers);
Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/weaponsystem/Munition.cc	(revision 10821)
@@ -55,6 +55,6 @@
     Munition::~Munition()
     {
-        for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
-            delete it->second;
+        for (auto & elem : this->currentMagazines_)
+            delete elem.second;
     }
 
@@ -268,6 +268,6 @@
         {
             // Return true if any of the current magazines is not full (loading counts as full although it returns 0 munition)
-            for (std::map<WeaponMode*, Magazine*>::const_iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
-                if (it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
+            for (const auto & elem : this->currentMagazines_)
+                if (elem.second->munition_ < this->maxMunitionPerMagazine_ && elem.second->bLoaded_)
                     return true;
         }
@@ -316,10 +316,10 @@
             {
                 bool change = false;
-                for (std::map<WeaponMode*, Magazine*>::iterator it = this->currentMagazines_.begin(); it != this->currentMagazines_.end(); ++it)
+                for (auto & elem : this->currentMagazines_)
                 {
                     // Add munition if the magazine isn't full (but only to loaded magazines)
-                    if (amount > 0 && it->second->munition_ < this->maxMunitionPerMagazine_ && it->second->bLoaded_)
+                    if (amount > 0 && elem.second->munition_ < this->maxMunitionPerMagazine_ && elem.second->bLoaded_)
                     {
-                        it->second->munition_++;
+                        elem.second->munition_++;
                         amount--;
                         change = true;
Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/weaponsystem/Weapon.cc	(revision 10821)
@@ -61,6 +61,6 @@
                 this->weaponPack_->removeWeapon(this);
 
-            for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-                it->second->destroy();
+            for (auto & elem : this->weaponmodes_)
+                elem.second->destroy();
         }
     }
@@ -85,8 +85,8 @@
     {
         unsigned int i = 0;
-        for (std::multimap<unsigned int, WeaponMode*>::const_iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
+        for (const auto & elem : this->weaponmodes_)
         {
             if (i == index)
-                return it->second;
+                return elem.second;
 
             ++i;
@@ -136,6 +136,6 @@
     void Weapon::reload()
     {
-        for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-            it->second->reload();
+        for (auto & elem : this->weaponmodes_)
+            elem.second->reload();
     }
 
@@ -148,6 +148,6 @@
     void Weapon::notifyWeaponModes()
     {
-        for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
-            it->second->setWeapon(this);
+        for (auto & elem : this->weaponmodes_)
+            elem.second->setWeapon(this);
     }
 }
Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponPack.cc	(revision 10821)
@@ -76,6 +76,6 @@
     void WeaponPack::fire(unsigned int weaponmode)
     {
-        for (std::vector<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
-            (*it)->fire(weaponmode);
+        for (auto & elem : this->weapons_)
+            (elem)->fire(weaponmode);
     }
 
@@ -86,6 +86,6 @@
     void WeaponPack::reload()
     {
-        for (std::vector<Weapon *>::iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
-            (*it)->reload();
+        for (auto & elem : this->weapons_)
+            (elem)->reload();
     }
 
@@ -114,8 +114,8 @@
         unsigned int i = 0;
 
-        for (std::vector<Weapon *>::const_iterator it = this->weapons_.begin(); it != this->weapons_.end(); ++it)
+        for (const auto & elem : this->weapons_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -132,8 +132,8 @@
     {
         unsigned int i = 0;
-        for (std::set<DefaultWeaponmodeLink*>::const_iterator it = this->links_.begin(); it != this->links_.end(); ++it)
+        for (const auto & elem : this->links_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
 
             ++i;
@@ -144,7 +144,7 @@
     unsigned int WeaponPack::getDesiredWeaponmode(unsigned int firemode) const
     {
-        for (std::set<DefaultWeaponmodeLink*>::const_iterator it = this->links_.begin(); it != this->links_.end(); ++it)
-            if ((*it)->getFiremode() == firemode)
-                return (*it)->getWeaponmode();
+        for (const auto & elem : this->links_)
+            if ((elem)->getFiremode() == firemode)
+                return (elem)->getWeaponmode();
 
         return WeaponSystem::WEAPON_MODE_UNASSIGNED;
Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSet.cc	(revision 10821)
@@ -63,7 +63,7 @@
     {
         // Fire all WeaponPacks with their defined weaponmode
-        for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
-            if (it->second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
-                it->first->fire(it->second);
+        for (auto & elem : this->weaponpacks_)
+            if (elem.second != WeaponSystem::WEAPON_MODE_UNASSIGNED)
+                elem.first->fire(elem.second);
     }
 
@@ -71,6 +71,6 @@
     {
         // Reload all WeaponPacks with their defined weaponmode
-        for (std::map<WeaponPack*, unsigned int>::iterator it = this->weaponpacks_.begin(); it != this->weaponpacks_.end(); ++it)
-            it->first->reload();
+        for (auto & elem : this->weaponpacks_)
+            elem.first->reload();
     }
 
Index: code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/weaponsystem/WeaponSystem.cc	(revision 10821)
@@ -106,9 +106,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<WeaponSlot*>::const_iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
+        for (const auto & elem : this->weaponSlots_)
         {
             ++i;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
@@ -153,9 +153,9 @@
     {
         unsigned int i = 0;
-        for (std::map<unsigned int, WeaponSet*>::const_iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
+        for (const auto & elem : this->weaponSets_)
         {
             ++i;
             if (i > index)
-                return it->second;
+                return elem.second;
         }
         return nullptr;
@@ -168,7 +168,7 @@
 
         unsigned int freeSlots = 0;
-        for (std::vector<WeaponSlot*>::iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
-        {
-            if (!(*it)->isOccupied())
+        for (auto & elem : this->weaponSlots_)
+        {
+            if (!(elem)->isOccupied())
                 ++freeSlots;
         }
@@ -184,10 +184,10 @@
         // Attach all weapons to the first free slots (and to the Pawn)
         unsigned int i = 0;
-        for (std::vector<WeaponSlot*>::iterator it = this->weaponSlots_.begin(); it != this->weaponSlots_.end(); ++it)
-        {
-            if (!(*it)->isOccupied() && i < wPack->getNumWeapons())
+        for (auto & elem : this->weaponSlots_)
+        {
+            if (!(elem)->isOccupied() && i < wPack->getNumWeapons())
             {
                 Weapon* weapon = wPack->getWeapon(i);
-                (*it)->attachWeapon(weapon);
+                (elem)->attachWeapon(weapon);
                 this->getPawn()->attach(weapon);
                 ++i;
@@ -196,9 +196,9 @@
 
         // Assign the desired weaponmode to the firemodes
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-        {
-            unsigned int weaponmode = wPack->getDesiredWeaponmode(it->first);
+        for (auto & elem : this->weaponSets_)
+        {
+            unsigned int weaponmode = wPack->getDesiredWeaponmode(elem.first);
             if (weaponmode != WeaponSystem::WEAPON_MODE_UNASSIGNED)
-                it->second->setWeaponmodeLink(wPack, weaponmode);
+                elem.second->setWeaponmodeLink(wPack, weaponmode);
         }
 
@@ -219,6 +219,6 @@
 
         // Remove all added links from the WeaponSets
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-            it->second->removeWeaponmodeLink(wPack);
+        for (auto & elem : this->weaponSets_)
+            elem.second->removeWeaponmodeLink(wPack);
 
         // Remove the WeaponPack from the WeaponSystem
@@ -231,9 +231,9 @@
     {
         unsigned int i = 0;
-        for (std::vector<WeaponPack*>::const_iterator it = this->weaponPacks_.begin(); it != this->weaponPacks_.end(); ++it)
+        for (const auto & elem : this->weaponPacks_)
         {
             ++i;
             if (i > index)
-                return (*it);
+                return (elem);
         }
         return nullptr;
@@ -268,7 +268,7 @@
         // Check if the WeaponSet belongs to this WeaponSystem
         bool foundWeaponSet = false;
-        for (std::map<unsigned int, WeaponSet *>::iterator it2 = this->weaponSets_.begin(); it2 != this->weaponSets_.end(); ++it2)
-        {
-            if (it2->second == wSet)
+        for (auto & elem : this->weaponSets_)
+        {
+            if (elem.second == wSet)
             {
                 foundWeaponSet = true;
@@ -296,6 +296,6 @@
     void WeaponSystem::reload()
     {
-        for (std::map<unsigned int, WeaponSet *>::iterator it = this->weaponSets_.begin(); it != this->weaponSets_.end(); ++it)
-            it->second->reload();
+        for (auto & elem : this->weaponSets_)
+            elem.second->reload();
     }
 
Index: code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc	(revision 10821)
@@ -165,8 +165,8 @@
     {
         unsigned int i = 0;
-        for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
+        for (const auto & elem : this->cameraPositions_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -180,7 +180,7 @@
 
         unsigned int counter = 0;
-        for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
-        {
-            if ((*it) == this->currentCameraPosition_)
+        for (const auto & elem : this->cameraPositions_)
+        {
+            if ((elem) == this->currentCameraPosition_)
                 break;
             counter++;
@@ -477,7 +477,7 @@
         if (parent)
         {
-            for (std::list<StrongPtr<CameraPosition>>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
-                if ((*it)->getIsAbsolute())
-                    parent->attach((*it));
+            for (auto & elem : this->cameraPositions_)
+                if ((elem)->getIsAbsolute())
+                    parent->attach((elem));
         }
     }
Index: code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/EffectContainer.cc	(revision 10821)
@@ -89,7 +89,7 @@
     {
         unsigned int i = 0;
-        for (std::vector<WorldEntity*>::const_iterator it = this->effects_.begin(); it != this->effects_.end(); ++it)
+        for (const auto & elem : this->effects_)
             if (i == index)
-                return (*it);
+                return (elem);
         return nullptr;
     }
Index: code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/WorldEntity.cc	(revision 10821)
@@ -233,14 +233,14 @@
 
             // iterate over all children and change their activity as well
-            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
+            for (const auto & elem : this->getAttachedObjects())
             {
                 if(!this->isActive())
                 {
-                    (*it)->bActiveMem_ = (*it)->isActive();
-                    (*it)->setActive(this->isActive());
+                    (elem)->bActiveMem_ = (elem)->isActive();
+                    (elem)->setActive(this->isActive());
                 }
                 else
                 {
-                    (*it)->setActive((*it)->bActiveMem_);
+                    (elem)->setActive((elem)->bActiveMem_);
                 }
             }
@@ -259,14 +259,14 @@
         {
             // iterate over all children and change their visibility as well
-            for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++)
+            for (const auto & elem : this->getAttachedObjects())
             {
                 if(!this->isVisible())
                 {
-                    (*it)->bVisibleMem_ = (*it)->isVisible();
-                    (*it)->setVisible(this->isVisible());
+                    (elem)->bVisibleMem_ = (elem)->isVisible();
+                    (elem)->setVisible(this->isVisible());
                 }
                 else
                 {
-                    (*it)->setVisible((*it)->bVisibleMem_);
+                    (elem)->setVisible((elem)->bVisibleMem_);
                 }
             }
@@ -518,8 +518,8 @@
     {
         unsigned int i = 0;
-        for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
+        for (const auto & elem : this->children_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             ++i;
         }
@@ -938,6 +938,6 @@
         // Recalculate mass
         this->childrenMass_ = 0.0f;
-        for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-            this->childrenMass_ += (*it)->getMass();
+        for (const auto & elem : this->children_)
+            this->childrenMass_ += (elem)->getMass();
         recalculateMassProps();
         // Notify parent WE
Index: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/ModularSpaceShip.cc	(revision 10821)
@@ -99,13 +99,13 @@
             }
             // iterate through all attached parts
-            for(unsigned int j = 0; j < this->partList_.size(); j++)
+            for(auto & elem : this->partList_)
             {
                 // if the name of the part matches the name of the object, add the object to that parts entitylist (unless it was already done).
-                if((this->partList_[j]->getName() == this->getAttachedObject(i)->getName()) && !this->partList_[j]->hasEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i))))
+                if((elem->getName() == this->getAttachedObject(i)->getName()) && !elem->hasEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i))))
                 {
                     // The Entity is added to the part's entityList_
-                    this->partList_[j]->addEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i)));
+                    elem->addEntity(orxonox_cast<StaticEntity*>(this->getAttachedObject(i)));
                     // An entry in the partMap_ is created, assigning the part to the entity.
-                    this->addPartEntityAssignment((StaticEntity*)(this->getAttachedObject(i)), this->partList_[j]);
+                    this->addPartEntityAssignment((StaticEntity*)(this->getAttachedObject(i)), elem);
                 }
             }
@@ -146,8 +146,8 @@
     ShipPart* ModularSpaceShip::getPartOfEntity(StaticEntity* entity) const
     {
-        for (std::map<StaticEntity*, ShipPart*>::const_iterator it = this->partMap_.begin(); it != this->partMap_.end(); ++it)
-        {
-            if (it->first == entity)
-                return it->second;
+        for (const auto & elem : this->partMap_)
+        {
+            if (elem.first == entity)
+                return elem.second;
         }
         return nullptr;
@@ -242,9 +242,9 @@
     ShipPart* ModularSpaceShip::getShipPartByName(std::string name)
     {
-        for(std::vector<ShipPart*>::iterator it = this->partList_.begin(); it != this->partList_.end(); ++it)
-        {
-            if(orxonox_cast<ShipPart*>(*it)->getName() == name)
-            {
-                return orxonox_cast<ShipPart*>(*it);
+        for(auto & elem : this->partList_)
+        {
+            if(orxonox_cast<ShipPart*>(elem)->getName() == name)
+            {
+                return orxonox_cast<ShipPart*>(elem);
             }
         }
@@ -261,7 +261,7 @@
     bool ModularSpaceShip::hasShipPart(ShipPart* part) const
     {
-        for(unsigned int i = 0; i < this->partList_.size(); i++)
-        {
-            if(this->partList_[i] == part)
+        for(auto & elem : this->partList_)
+        {
+            if(elem == part)
                 return true;
         }
Index: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/SpaceShip.cc	(revision 10821)
@@ -158,6 +158,6 @@
 
         // Run the engines
-        for(std::vector<Engine*>::iterator it = this->engineList_.begin(); it != this->engineList_.end(); it++)
-            (*it)->run(dt);
+        for(auto & elem : this->engineList_)
+            (elem)->run(dt);
 
         if (this->hasLocalController())
@@ -318,7 +318,7 @@
     bool SpaceShip::hasEngine(Engine* engine) const
     {
-        for(unsigned int i = 0; i < this->engineList_.size(); i++)
-        {
-            if(this->engineList_[i] == engine)
+        for(auto & elem : this->engineList_)
+        {
+            if(elem == engine)
                 return true;
         }
@@ -350,7 +350,7 @@
     Engine* SpaceShip::getEngineByName(const std::string& name)
     {
-        for(size_t i = 0; i < this->engineList_.size(); ++i)
-            if(this->engineList_[i]->getName() == name)
-                return this->engineList_[i];
+        for(auto & elem : this->engineList_)
+            if(elem->getName() == name)
+                return elem;
 
         orxout(internal_warning) << "Couldn't find Engine with name \"" << name << "\"." << endl;
@@ -396,6 +396,6 @@
     void SpaceShip::addSpeedFactor(float factor)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedMultiply(factor);
+        for(auto & elem : this->engineList_)
+            elem->addSpeedMultiply(factor);
     }
 
@@ -408,6 +408,6 @@
     void SpaceShip::addSpeed(float speed)
     {
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-            this->engineList_[i]->addSpeedAdd(speed);
+        for(auto & elem : this->engineList_)
+            elem->addSpeedAdd(speed);
     }
 
@@ -436,8 +436,8 @@
     {
         float speed=0;
-        for(unsigned int i=0; i<this->engineList_.size(); i++)
-        {
-            if(this->engineList_[i]->getMaxSpeedFront() > speed)
-                speed = this->engineList_[i]->getMaxSpeedFront();
+        for(auto & elem : this->engineList_)
+        {
+            if(elem->getMaxSpeedFront() > speed)
+                speed = elem->getMaxSpeedFront();
         }
         return speed;
Index: code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc	(revision 10821)
@@ -80,9 +80,9 @@
 
         std::set<WorldEntity*> attachments = this->getAttachedObjects();
-        for (std::set<WorldEntity*>::iterator it = attachments.begin(); it != attachments.end(); ++it)
+        for (const auto & attachment : attachments)
         {
-            if ((*it)->isA(Class(TeamColourable)))
+            if ((attachment)->isA(Class(TeamColourable)))
             {
-                TeamColourable* tc = orxonox_cast<TeamColourable*>(*it);
+                TeamColourable* tc = orxonox_cast<TeamColourable*>(attachment);
                 tc->setTeamColour(colour);
             }
