Index: code/branches/cpp11_v2/src/libraries/core/BaseObject.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/BaseObject.cc	(revision 10821)
@@ -234,8 +234,8 @@
     {
         unsigned int i = 0;
-        for (std::set<Template*>::const_iterator it = this->templates_.begin(); it != this->templates_.end(); ++it)
+        for (const auto & elem : this->templates_)
         {
             if (i == index)
-                return (*it);
+                return (elem);
             i++;
         }
@@ -269,11 +269,11 @@
     {
         unsigned int i = 0;
-        for (std::map<BaseObject*, std::string>::const_iterator it = this->eventSources_.begin(); it != this->eventSources_.end(); ++it)
-        {
-            if (it->second != state)
+        for (const auto & elem : this->eventSources_)
+        {
+            if (elem.second != state)
                 continue;
 
             if (i == index)
-                return it->first;
+                return elem.first;
             ++i;
         }
@@ -296,8 +296,8 @@
     {
         unsigned int i = 0;
-        for (std::set<BaseObject*>::const_iterator it = this->eventListenersXML_.begin(); it != this->eventListenersXML_.end(); ++it)
+        for (const auto & elem : this->eventListenersXML_)
         {
             if (i == index)
-                return *it;
+                return elem;
             ++i;
         }
@@ -358,8 +358,8 @@
         Event event(activate, originator, name);
 
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-        {
-            event.statename_ = (*it)->eventSources_[this];
-            (*it)->processEvent(event);
+        for (const auto & elem : this->eventListeners_)
+        {
+            event.statename_ = (elem)->eventSources_[this];
+            (elem)->processEvent(event);
         }
     }
@@ -370,6 +370,6 @@
     void BaseObject::fireEvent(Event& event)
     {
-        for (std::set<BaseObject*>::iterator it = this->eventListeners_.begin(); it != this->eventListeners_.end(); ++it)
-            (*it)->processEvent(event);
+        for (const auto & elem : this->eventListeners_)
+            (elem)->processEvent(event);
     }
 
@@ -474,7 +474,7 @@
 
             // iterate through all states and get the event sources
-            for (std::list<std::string>::iterator it = eventnames.begin(); it != eventnames.end(); ++it)
+            for (auto & statename : eventnames)
             {
-                const std::string& statename = (*it);
+                
 
                 // if the event state is already known, continue with the next state
Index: code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc	(revision 10821)
@@ -293,8 +293,8 @@
         {
             // No it's not: Search for classes inheriting from the given class and add the rules for them
-            for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
-                if ((*it)->isA(this->root_->getClass()))
-                    if (overwrite || (!this->nodeExists(*it))) // If we don't want to overwrite, only add nodes that don't already exist
-                        this->add(this->root_, *it, bInclude, overwrite);
+            for (const auto & elem : subclass->getDirectChildren())
+                if ((elem)->isA(this->root_->getClass()))
+                    if (overwrite || (!this->nodeExists(elem))) // If we don't want to overwrite, only add nodes that don't already exist
+                        this->add(this->root_, elem, bInclude, overwrite);
         }
 
@@ -325,10 +325,10 @@
         {
             // Search for an already existing node, containing the subclass we want to add
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
+            for (auto & elem : node->subnodes_)
             {
-                if (subclass->isA((*it)->getClass()))
+                if (subclass->isA((elem)->getClass()))
                 {
                     // We've found an existing node -> delegate the work with a recursive function-call and return
-                    this->add(*it, subclass, bInclude, overwrite);
+                    this->add(elem, subclass, bInclude, overwrite);
                     return;
                 }
@@ -392,6 +392,6 @@
         if (!subclass)
             return;
-        for (std::set<const Identifier*>::const_iterator it = subclass->getDirectChildren().begin(); it != subclass->getDirectChildren().end(); ++it)
-            this->add(*it, this->isIncluded(*it), false, false);
+        for (const auto & elem : subclass->getDirectChildren())
+            this->add(elem, this->isIncluded(elem), false, false);
 
         this->add(subclass, bInclude, false, clean);
@@ -435,7 +435,7 @@
 
             // Go through the list of subnodes and look for a node containing the searched subclass and delegate the request by a recursive function-call.
-            for (std::list<ClassTreeMaskNode*>::iterator it = node->subnodes_.begin(); it != node->subnodes_.end(); ++it)
-                if (subclass->isA((*it)->getClass()))
-                    return isIncluded(*it, subclass);
+            for (auto & elem : node->subnodes_)
+                if (subclass->isA((elem)->getClass()))
+                    return isIncluded(elem, subclass);
 
             // There is no subnode containing our class -> the rule of the current node takes in effect
@@ -957,6 +957,6 @@
             // The bool is "false", meaning they have no subnodes and therefore need no further checks
             if (node->isIncluded())
-                for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it)
-                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, false));
+                for (const auto & elem : directChildren)
+                    this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(elem, false));
         }
     }
Index: code/branches/cpp11_v2/src/libraries/core/Core.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Core.cc	(revision 10821)
@@ -279,7 +279,7 @@
 
         const std::vector<std::string>& modulePaths = ApplicationPaths::getInstance().getModulePaths();
-        for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it)
-        {
-            ModuleInstance* module = new ModuleInstance(*it);
+        for (const auto & modulePath : modulePaths)
+        {
+            ModuleInstance* module = new ModuleInstance(modulePath);
             this->loadModule(module);
             this->modules_.push_back(module);
@@ -309,7 +309,7 @@
     void Core::unloadModules()
     {
-        for (std::list<ModuleInstance*>::iterator it = this->modules_.begin(); it != this->modules_.end(); ++it)
-        {
-            ModuleInstance* module = (*it);
+        for (auto module : this->modules_)
+        {
+            
             this->unloadModule(module);
             delete module;
Index: code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/CoreStaticInitializationHandler.cc	(revision 10821)
@@ -99,6 +99,6 @@
         std::set<Identifier*> identifiers;
         const std::set<StaticallyInitializedInstance*>& instances = module->getInstances(StaticInitialization::IDENTIFIER);
-        for (std::set<StaticallyInitializedInstance*>::const_iterator it = instances.begin(); it != instances.end(); ++it)
-            identifiers.insert(&static_cast<StaticallyInitializedIdentifier*>(*it)->getIdentifier());
+        for (const auto & instance : instances)
+            identifiers.insert(&static_cast<StaticallyInitializedIdentifier*>(instance)->getIdentifier());
 
         // destroy objects. some objects may survive this at first because they still have strong pointers pointing at them. this is
@@ -106,16 +106,16 @@
         // that objects within one module may reference each other by strong pointers. but it is not allowed that objects from another
         // module (which is not unloaded) uses strong pointers to point at objects inside the unloaded module. this will lead to a crash.
-        for (std::set<Identifier*>::iterator it = identifiers.begin(); it != identifiers.end(); ++it)
-            (*it)->destroyObjects();
+        for (const auto & identifier : identifiers)
+            (identifier)->destroyObjects();
 
         // check if all objects were really destroyed. this is not the case if an object is referenced by a strong pointer from another
         // module (or if two objects inside this module reference each other). this will lead to a crash and must be fixed (e.g. by
         // changing object dependencies; or by changing the logic that allows modules to be unloaded).
-        for (std::set<Identifier*>::iterator it = identifiers.begin(); it != identifiers.end(); ++it)
+        for (const auto & identifier : identifiers)
         {
-            ObjectListBase* objectList = Context::getRootContext()->getObjectList(*it);
+            ObjectListBase* objectList = Context::getRootContext()->getObjectList(identifier);
             if (objectList->size() > 0)
             {
-                orxout(internal_error) << "There are still " << objectList->size() << " objects of type " << (*it)->getName()
+                orxout(internal_error) << "There are still " << objectList->size() << " objects of type " << (identifier)->getName()
                     << " after unloading the Identifier. This may lead to a crash" << endl;
             }
@@ -123,12 +123,12 @@
 
         // destroy object-lists in all contexts
-        for (std::set<Identifier*>::iterator it_identifier = identifiers.begin(); it_identifier != identifiers.end(); ++it_identifier)
+        for (const auto & identifier : identifiers)
         {
             // only do this if the Identifier is not a Context itself; otherwise we delete the list we're iterating over
-            if (!(*it_identifier)->isExactlyA(Class(Context)))
+            if (!(identifier)->isExactlyA(Class(Context)))
             {
                 // iterate over all contexts
                 for (ObjectList<Context>::iterator it_context = ObjectList<Context>::begin(); it_context != ObjectList<Context>::end(); ++it_context)
-                    it_context->destroyObjectList((*it_identifier));
+                    it_context->destroyObjectList((identifier));
             }
         }
Index: code/branches/cpp11_v2/src/libraries/core/Game.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Game.cc	(revision 10821)
@@ -612,6 +612,6 @@
         // Check if graphics is still required
         bool graphicsRequired = false;
-        for (unsigned i = 0; i < loadedStates_.size(); ++i)
-            graphicsRequired |= loadedStates_[i]->getInfo().bGraphicsMode;
+        for (auto & elem : loadedStates_)
+            graphicsRequired |= elem->getInfo().bGraphicsMode;
         if (!graphicsRequired)
             this->unloadGraphics(!this->bAbort_); // if abort is false, that means the game is still running while unloading graphics. in this case we load a graphics manager without renderer (to keep all necessary ogre instances alive)
Index: code/branches/cpp11_v2/src/libraries/core/Language.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Language.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Language.cc	(revision 10821)
@@ -107,6 +107,6 @@
     Language::~Language()
     {
-        for (std::map<std::string, LanguageEntry*>::iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-            delete (it->second);
+        for (auto & elem : this->languageEntries_)
+            delete (elem.second);
     }
 
@@ -319,7 +319,7 @@
 
         // Iterate through the list an write the lines into the file
-        for (std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.begin(); it != this->languageEntries_.end(); ++it)
-        {
-            file << it->second->getLabel() << '=' << it->second->getDefault() << endl;
+        for (const auto & elem : this->languageEntries_)
+        {
+            file << elem.second->getLabel() << '=' << elem.second->getDefault() << endl;
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/Loader.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Loader.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Loader.cc	(revision 10821)
@@ -165,7 +165,7 @@
                         std::ostringstream message;
                         message << "Possible sources of error:" << endl;
-                        for (std::vector<std::pair<std::string, size_t>>::iterator it = linesources.begin(); it != linesources.end(); ++it)
+                        for (auto & linesource : linesources)
                         {
-                            message << it->first << ", Line " << it->second << endl;
+                            message << linesource.first << ", Line " << linesource.second << endl;
                         }
                         orxout(user_error, context::loader) << message.str() << endl;
@@ -261,7 +261,7 @@
         {
             bool expectedValue = true;
-            for (std::map<size_t, bool>::iterator it = luaTags.begin(); it != luaTags.end(); ++it)
-            {
-                if (it->second == expectedValue)
+            for (auto & luaTag : luaTags)
+            {
+                if (luaTag.second == expectedValue)
                     expectedValue = !expectedValue;
                 else
Index: code/branches/cpp11_v2/src/libraries/core/LuaState.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/LuaState.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/LuaState.cc	(revision 10821)
@@ -326,7 +326,7 @@
     /*static*/ bool LuaState::addToluaInterface(int (*function)(lua_State*), const std::string& name)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
-        {
-            if (it->first == name || it->second == function)
+        for (const auto & interface : getToluaInterfaces())
+        {
+            if (interface.first == name || interface.second == function)
             {
                 orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl;
@@ -337,6 +337,6 @@
 
         // Open interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator it = getInstances().begin(); it != getInstances().end(); ++it)
-            (*function)((*it)->luaState_);
+        for (const auto & state : getInstances())
+            (*function)(state->luaState_);
 
         // Return dummy bool
@@ -354,8 +354,8 @@
 
         // Close interface in all LuaStates
-        for (std::vector<LuaState*>::const_iterator itState = getInstances().begin(); itState != getInstances().end(); ++itState)
-        {
-            lua_pushnil((*itState)->luaState_);
-            lua_setglobal((*itState)->luaState_, it->first.c_str());
+        for (const auto & state : getInstances())
+        {
+            lua_pushnil(state->luaState_);
+            lua_setglobal(state->luaState_, it->first.c_str());
         }
 
@@ -369,14 +369,14 @@
     /*static*/ void LuaState::openToluaInterfaces(lua_State* state)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
-            (*it->second)(state);
+        for (const auto & interface : getToluaInterfaces())
+            (interface.second)(state);
     }
 
     /*static*/ void LuaState::closeToluaInterfaces(lua_State* state)
     {
-        for (ToluaInterfaceMap::const_iterator it = getToluaInterfaces().begin(); it != getToluaInterfaces().end(); ++it)
+        for (const auto & interface : getToluaInterfaces())
         {
             lua_pushnil(state);
-            lua_setglobal(state, it->first.c_str());
+            lua_setglobal(state, interface.first.c_str());
         }
     }
Index: code/branches/cpp11_v2/src/libraries/core/Namespace.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Namespace.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Namespace.cc	(revision 10821)
@@ -53,6 +53,6 @@
     {
         if (this->bRoot_)
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
-                delete (*it);
+            for (auto & elem : this->representingNamespaces_)
+                delete elem;
     }
 
@@ -80,7 +80,7 @@
             for (unsigned int i = 0; i < tokens.size(); i++)
             {
-                for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)
+                for (auto & elem : this->getNamespace()->representingNamespaces_)
                 {
-                    std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);
+                    std::set<NamespaceNode*> temp = elem->getNodeRelative(tokens[i]);
                     this->representingNamespaces_.insert(temp.begin(), temp.end());
                 }
@@ -93,8 +93,8 @@
         if (this->bAutogeneratedFileRootNamespace_)
         {
-            for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
+            for (auto & elem : this->representingNamespaces_)
             {
-                (*it)->setRoot(true);
-                (*it)->setHidden(true);
+                elem->setRoot(true);
+                elem->setHidden(true);
             }
         }
@@ -114,9 +114,9 @@
     bool Namespace::includes(const Namespace* ns) const
     {
-        for (std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)
+        for (const auto & elem1 : this->representingNamespaces_)
         {
-            for (std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)
+            for (const auto & elem2 : ns->representingNamespaces_)
             {
-                if ((*it1)->includes(*it2))
+                if (elem1->includes(elem2))
                 {
                     if (this->operator_ == "or")
@@ -149,10 +149,11 @@
 
         int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
+        for (const auto & elem : this->representingNamespaces_)
         {
             if (i > 0)
                 output += " / ";
 
-            output += (*it)->toString();
+            output += elem->toString();
+            i++;
         }
 
@@ -165,10 +166,11 @@
 
         int i = 0;
-        for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
+        for (const auto & elem : this->representingNamespaces_)
         {
             if (i > 0)
                 output += '\n';
 
-            output += (*it)->toString(indentation);
+            output += elem->toString(indentation);
+            i++;
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/NamespaceNode.cc	(revision 10821)
@@ -103,9 +103,9 @@
                 bool bFoundMatchingNamespace = false;
 
-                for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
+                for (auto & elem : this->subnodes_)
                 {
-                    if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
+                    if (elem.first.find(firstPart) == (elem.first.size() - firstPart.size()))
                     {
-                        std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
+                        std::set<NamespaceNode*> temp2 = elem.second->getNodeRelative(secondPart);
                         nodes.insert(temp2.begin(), temp2.end());
                         bFoundMatchingNamespace = true;
@@ -132,6 +132,6 @@
         else
         {
-            for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-                if (it->second->includes(ns))
+            for (const auto & elem : this->subnodes_)
+                if (elem.second->includes(ns))
                     return true;
         }
@@ -167,6 +167,6 @@
         std::string output = (indentation + this->name_ + '\n');
 
-        for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
-            output += it->second->toString(indentation + "  ");
+        for (const auto & elem : this->subnodes_)
+            output += elem.second->toString(indentation + "  ");
 
         return output;
Index: code/branches/cpp11_v2/src/libraries/core/Resource.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/Resource.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/Resource.cc	(revision 10821)
@@ -58,7 +58,7 @@
         DataStreamListPtr resources(new Ogre::DataStreamList());
         const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
+        for (const auto & group : groups)
         {
-            DataStreamListPtr temp = Ogre::ResourceGroupManager::getSingleton().openResources(pattern, *it);
+            DataStreamListPtr temp = Ogre::ResourceGroupManager::getSingleton().openResources(pattern, group);
             resources->insert(resources->end(), temp->begin(), temp->end());
         }
@@ -121,7 +121,7 @@
         StringVectorPtr resourceNames(new Ogre::StringVector());
         const Ogre::StringVector& groups = Ogre::ResourceGroupManager::getSingleton().getResourceGroups();
-        for (Ogre::StringVector::const_iterator it = groups.begin(); it != groups.end(); ++it)
+        for (const auto & group : groups)
         {
-            StringVectorPtr temp = Ogre::ResourceGroupManager::getSingleton().findResourceNames(*it, pattern);
+            StringVectorPtr temp = Ogre::ResourceGroupManager::getSingleton().findResourceNames(group, pattern);
             resourceNames->insert(resourceNames->end(), temp->begin(), temp->end());
         }
Index: code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifier.cc	(revision 10821)
@@ -87,15 +87,15 @@
         for (std::list<const Identifier*>::const_iterator it = this->directParents_.begin(); it != this->directParents_.end(); ++it)
             const_cast<Identifier*>(*it)->directChildren_.erase(this);
-        for (std::set<const Identifier*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
-            const_cast<Identifier*>(*it)->parents_.remove(this);
-        for (std::set<const Identifier*>::const_iterator it = this->directChildren_.begin(); it != this->directChildren_.end(); ++it)
-            const_cast<Identifier*>(*it)->directParents_.remove(this);
-
-        for (std::map<std::string, ConfigValueContainer*>::iterator it = this->configValues_.begin(); it != this->configValues_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortParamContainer*>::iterator it = this->xmlportParamContainers_.begin(); it != this->xmlportParamContainers_.end(); ++it)
-            delete (it->second);
-        for (std::map<std::string, XMLPortObjectContainer*>::iterator it = this->xmlportObjectContainers_.begin(); it != this->xmlportObjectContainers_.end(); ++it)
-            delete (it->second);
+        for (const auto & elem : this->children_)
+            const_cast<Identifier*>(elem)->parents_.remove(this);
+        for (const auto & elem : this->directChildren_)
+            const_cast<Identifier*>(elem)->directParents_.remove(this);
+
+        for (auto & elem : this->configValues_)
+            delete (elem.second);
+        for (auto & elem : this->xmlportParamContainers_)
+            delete (elem.second);
+        for (auto & elem : this->xmlportObjectContainers_)
+            delete (elem.second);
     }
 
@@ -157,7 +157,7 @@
         if (this->directParents_.empty())
         {
-            for (std::list<const Identifier*>::const_iterator it = initializationTrace.begin(); it != initializationTrace.end(); ++it)
-                if (*it != this)
-                    this->parents_.push_back(*it);
+            for (const auto & elem : initializationTrace)
+                if (elem != this)
+                    this->parents_.push_back(elem);
         }
         else
@@ -261,20 +261,20 @@
 
         // if any parent class is virtual, it will be instantiated first, so we need to add them first.
-        for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-        {
-            if ((*it_parent)->isVirtualBase())
+        for (const auto & elem : this->parents_)
+        {
+            if ((elem)->isVirtualBase())
             {
-                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
+                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(elem)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(elem)->parents_.end(); ++it_parent_parent)
                     this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
-                this->addIfNotExists(expectedIdentifierTrace, *it_parent);
+                this->addIfNotExists(expectedIdentifierTrace, elem);
             }
         }
 
         // now all direct parents get created recursively. already added identifiers (e.g. virtual base classes) are not added again.
-        for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
-        {
-            for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
+        for (const auto & elem : this->directParents_)
+        {
+            for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(elem)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(elem)->parents_.end(); ++it_parent_parent)
                 this->addIfNotExists(expectedIdentifierTrace, *it_parent_parent);
-            this->addIfNotExists(expectedIdentifierTrace, *it_parent);
+            this->addIfNotExists(expectedIdentifierTrace, elem);
         }
 
@@ -285,6 +285,6 @@
 
             orxout(internal_warning) << "  Actual trace (after creating a sample instance):" << endl << "    ";
-            for (std::list<const Identifier*>::const_iterator it_parent = this->parents_.begin(); it_parent != this->parents_.end(); ++it_parent)
-                orxout(internal_warning) << " " << (*it_parent)->getName();
+            for (const auto & elem : this->parents_)
+                orxout(internal_warning) << " " << (elem)->getName();
             orxout(internal_warning) << endl;
 
@@ -295,6 +295,6 @@
 
             orxout(internal_warning) << "  Direct parents (according to class hierarchy definitions):" << endl << "    ";
-            for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
-                orxout(internal_warning) << " " << (*it_parent)->getName();
+            for (const auto & elem : this->directParents_)
+                orxout(internal_warning) << " " << (elem)->getName();
             orxout(internal_warning) << endl;
         }
Index: code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/Identifier.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/class/Identifier.h	(revision 10821)
@@ -462,6 +462,6 @@
 
         if (updateChildren)
-            for (std::set<const Identifier*>::const_iterator it = this->getChildren().begin(); it != this->getChildren().end(); ++it)
-                (*it)->updateConfigValues(false);
+            for (const auto & elem : this->getChildren())
+                (elem)->updateConfigValues(false);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc	(revision 10821)
@@ -93,7 +93,7 @@
         {
             Context temporaryContext(nullptr);
-            for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
+            for (auto identifier : this->identifiers_)
             {
-                Identifier* identifier = (*it);
+                
                 if (identifier->isInitialized())
                     continue;
@@ -127,6 +127,6 @@
 
         // finish the initialization of all identifiers
-        for (std::set<Identifier*>::const_iterator it = initializedIdentifiers.begin(); it != initializedIdentifiers.end(); ++it)
-            (*it)->finishInitialization();
+        for (const auto & initializedIdentifier : initializedIdentifiers)
+            (initializedIdentifier)->finishInitialization();
 
         // only check class hierarchy in dev mode because it's an expensive operation and it requires a developer to fix detected problems anyway.
@@ -144,26 +144,26 @@
     {
         // check if there are any uninitialized identifiers remaining
-        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            if (!(*it)->isInitialized())
-                orxout(internal_error) << "Identifier was registered late and is not initialized: " << (*it)->getName() << " / " << (*it)->getTypeInfo().name() << endl;
+        for (const auto & elem : this->identifiers_)
+            if (!(elem)->isInitialized())
+                orxout(internal_error) << "Identifier was registered late and is not initialized: " << (elem)->getName() << " / " << (elem)->getTypeInfo().name() << endl;
 
         // for all initialized identifiers, check if a sample instance behaves as expected according to the class hierarchy
         Context temporaryContext(nullptr);
-        for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1)
+        for (const auto & initializedIdentifier : initializedIdentifiers)
         {
-            if (!(*it1)->hasFactory())
+            if (!(initializedIdentifier)->hasFactory())
                 continue;
 
-            Identifiable* temp = (*it1)->fabricate(&temporaryContext);
-
-            for (std::set<Identifier*>::const_iterator it2 = this->identifiers_.begin(); it2 != this->identifiers_.end(); ++it2)
+            Identifiable* temp = (initializedIdentifier)->fabricate(&temporaryContext);
+
+            for (const auto & elem : this->identifiers_)
             {
-                bool isA_AccordingToRtti = (*it2)->canDynamicCastObjectToIdentifierClass(temp);
-                bool isA_AccordingToClassHierarchy = temp->isA((*it2));
+                bool isA_AccordingToRtti = (elem)->canDynamicCastObjectToIdentifierClass(temp);
+                bool isA_AccordingToClassHierarchy = temp->isA((elem));
 
                 if (isA_AccordingToRtti != isA_AccordingToClassHierarchy)
                 {
-                    orxout(internal_error) << "Class hierarchy does not match RTTI: Class hierarchy claims that " << (*it1)->getName() <<
-                        (isA_AccordingToClassHierarchy ? " is a " : " is not a ") << (*it2)->getName() << " but RTTI says the opposite." << endl;
+                    orxout(internal_error) << "Class hierarchy does not match RTTI: Class hierarchy claims that " << (initializedIdentifier)->getName() <<
+                        (isA_AccordingToClassHierarchy ? " is a " : " is not a ") << (elem)->getName() << " but RTTI says the opposite." << endl;
                 }
             }
@@ -184,6 +184,6 @@
     {
         orxout(internal_status) << "Destroy class-hierarchy" << endl;
-        for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            (*it)->reset();
+        for (const auto & elem : this->identifiers_)
+            (elem)->reset();
     }
 
@@ -260,7 +260,7 @@
     {
         // TODO: use std::type_index and a map to find identifiers by type_info (only with c++11)
-        for (std::set<Identifier*>::iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
-            if ((*it)->getTypeInfo() == typeInfo)
-                return (*it);
+        for (const auto & elem : this->identifiers_)
+            if ((elem)->getTypeInfo() == typeInfo)
+                return (elem);
         return nullptr;
     }
Index: code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc	(revision 10821)
@@ -77,6 +77,6 @@
             bool groupIsVisible(const std::map<std::string, ConsoleCommand*>& group, bool bOnlyShowHidden)
             {
-                for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = group.begin(); it_command != group.end(); ++it_command)
-                    if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
+                for (const auto & elem : group)
+                    if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden)
                         return true;
 
@@ -100,7 +100,7 @@
                 // get all the groups that are visible (except the shortcut group "")
                 const std::map<std::string, std::map<std::string, ConsoleCommand*>>& commands = ConsoleCommandManager::getInstance().getCommands();
-                for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group)
-                    if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0))
-                        groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first)));
+                for (const auto & command : commands)
+                    if (groupIsVisible(command.second, bOnlyShowHidden) && command.first != "" && (fragmentLC == "" || getLowercase(command.first).find(fragmentLC) == 0))
+                        groupList.push_back(ArgumentCompletionListElement(command.first, getLowercase(command.first)));
 
                 // now add all shortcuts (in group "")
@@ -113,7 +113,7 @@
 
                     // add the shortcuts
-                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(it_command->first).find(fragmentLC) == 0))
-                            groupList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                    for (const auto & elem : it_group->second)
+                        if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden && (fragmentLC == "" || getLowercase(elem.first).find(fragmentLC) == 0))
+                            groupList.push_back(ArgumentCompletionListElement(elem.first, getLowercase(elem.first)));
                 }
 
@@ -146,7 +146,7 @@
                 if (it_group != ConsoleCommandManager::getInstance().getCommands().end())
                 {
-                    for (std::map<std::string, ConsoleCommand*>::const_iterator it_command = it_group->second.begin(); it_command != it_group->second.end(); ++it_command)
-                        if (it_command->second->isActive() && it_command->second->hasAccess() && (!it_command->second->isHidden())^bOnlyShowHidden)
-                            commandList.push_back(ArgumentCompletionListElement(it_command->first, getLowercase(it_command->first)));
+                    for (const auto & elem : it_group->second)
+                        if (elem.second->isActive() && elem.second->hasAccess() && (!elem.second->isHidden())^bOnlyShowHidden)
+                            commandList.push_back(ArgumentCompletionListElement(elem.first, getLowercase(elem.first)));
                 }
 
@@ -281,6 +281,6 @@
 
             const std::set<std::string>& names = SettingsConfigFile::getInstance().getSectionNames();
-            for (std::set<std::string>::const_iterator it = names.begin(); it != names.end(); ++it)
-                sectionList.push_back(ArgumentCompletionListElement(*it, getLowercase(*it)));
+            for (const auto & name : names)
+                sectionList.push_back(ArgumentCompletionListElement(name, getLowercase(name)));
 
             return sectionList;
Index: code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc	(revision 10821)
@@ -306,6 +306,6 @@
                 // the user typed 1-2 arguments, check what he tried to type and print a suitable error
                 std::string groupLC = getLowercase(this->getToken(0));
-                for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
-                    if (it_group->first == groupLC)
+                for (const auto & elem : ConsoleCommandManager::getInstance().getCommandsLC())
+                    if (elem.first == groupLC)
                         return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\".";
 
@@ -328,11 +328,11 @@
 
         // iterate through all groups and their commands and calculate the distance to the current command. keep the best.
-        for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group)
-        {
-            if (it_group->first != "")
-            {
-                for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
-                {
-                    std::string command = it_group->first + " " + it_name->first;
+        for (const auto & elem : ConsoleCommandManager::getInstance().getCommandsLC())
+        {
+            if (elem.first != "")
+            {
+                for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = elem.second.begin(); it_name != elem.second.end(); ++it_name)
+                {
+                    std::string command = elem.first + " " + it_name->first;
                     unsigned int distance = getLevenshteinDistance(command, token0_LC + " " + token1_LC);
                     if (distance < nearestDistance)
@@ -349,7 +349,7 @@
         if (it_group !=  ConsoleCommandManager::getInstance().getCommandsLC().end())
         {
-            for (std::map<std::string, ConsoleCommand*>::const_iterator it_name = it_group->second.begin(); it_name != it_group->second.end(); ++it_name)
-            {
-                std::string command = it_name->first;
+            for (const auto & elem : it_group->second)
+            {
+                std::string command = elem.first;
                 unsigned int distance = getLevenshteinDistance(command, token0_LC);
                 if (distance < nearestDistance)
@@ -429,6 +429,6 @@
     {
         size_t count = 0;
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-            if (it->getComparable() != "")
+        for (const auto & elem : list)
+            if (elem.getComparable() != "")
                 ++count;
         return count;
@@ -495,13 +495,13 @@
         {
             // only one (non-empty) value in the list - search it and return it
-            for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-            {
-                if (it->getComparable() != "")
+            for (const auto & elem : list)
+            {
+                if (elem.getComparable() != "")
                 {
                     // arguments that have a separate string to be displayed need a little more care - just return them without modification. add a space character to the others.
-                    if (it->hasDisplay())
-                        return (it->getString());
+                    if (elem.hasDisplay())
+                        return (elem.getString());
                     else
-                        return (it->getString() + ' ');
+                        return (elem.getString() + ' ');
                 }
             }
@@ -517,8 +517,8 @@
                 char tempComparable = '\0';
                 char temp = '\0';
-                for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-                {
-                    const std::string& argumentComparable = it->getComparable();
-                    const std::string& argument = it->getString();
+                for (const auto & elem : list)
+                {
+                    const std::string& argumentComparable = elem.getComparable();
+                    const std::string& argument = elem.getString();
 
                     // ignore empty arguments
@@ -560,10 +560,10 @@
     {
         std::string output;
-        for (ArgumentCompletionList::const_iterator it = list.begin(); it != list.end(); ++it)
-        {
-            output += it->getDisplay();
+        for (const auto & elem : list)
+        {
+            output += elem.getDisplay();
 
             // add a space character between two elements for all non-empty arguments
-            if (it->getComparable() != "")
+            if (elem.getComparable() != "")
                 output += ' ';
         }
Index: code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc	(revision 10821)
@@ -75,6 +75,6 @@
         this->baseFunctor_ = executor->getFunctor();
 
-        for (size_t i = 0; i < MAX_FUNCTOR_ARGUMENTS; ++i)
-            this->argumentCompleter_[i] = nullptr;
+        for (auto & elem : this->argumentCompleter_)
+            elem = nullptr;
 
         this->keybindMode_ = KeybindMode::OnPress;
Index: code/branches/cpp11_v2/src/libraries/core/command/Shell.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/Shell.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/Shell.cc	(revision 10821)
@@ -258,6 +258,6 @@
         vectorize(text, '\n', &lines);
 
-        for (size_t i = 0; i < lines.size(); ++i)
-            this->addLine(lines[i], type);
+        for (auto & line : lines)
+            this->addLine(line, type);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/TclThreadList.h	(revision 10821)
@@ -262,6 +262,6 @@
         boost::shared_lock<boost::shared_mutex> lock(this->mutex_);
 
-        for (typename std::list<T>::const_iterator it = this->list_.begin(); it != this->list_.end(); ++it)
-            if (*it == value)
+        for (const auto & elem : this->list_)
+            if (elem == value)
                 return true;
 
Index: code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/command/TclThreadManager.cc	(revision 10821)
@@ -551,7 +551,7 @@
 
         std::list<unsigned int> threads;
-        for (std::map<unsigned int, TclInterpreterBundle*>::const_iterator it = this->interpreterBundles_.begin(); it != this->interpreterBundles_.end(); ++it)
-            if (it->first > 0 && it->first <= this->numInterpreterBundles_) // only list autonumbered interpreters (created with create()) - exclude the default interpreter 0 and all manually numbered interpreters)
-                threads.push_back(it->first);
+        for (const auto & elem : this->interpreterBundles_)
+            if (elem.first > 0 && elem.first <= this->numInterpreterBundles_) // only list autonumbered interpreters (created with create()) - exclude the default interpreter 0 and all manually numbered interpreters)
+                threads.push_back(elem.first);
         return threads;
     }
Index: code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/commandline/CommandLineParser.cc	(revision 10821)
@@ -124,21 +124,21 @@
             std::string shortcut;
             std::string value;
-            for (unsigned int i = 0; i < arguments.size(); ++i)
-            {
-                if (arguments[i].size() != 0)
+            for (auto & argument : arguments)
+            {
+                if (argument.size() != 0)
                 {
                     // sure not ""
-                    if (arguments[i][0] == '-')
+                    if (argument[0] == '-')
                     {
                         // start with "-"
-                        if (arguments[i].size() == 1)
+                        if (argument.size() == 1)
                         {
                             // argument[i] is "-", probably a minus sign
                             value += "- ";
                         }
-                        else if (arguments[i][1] <= 57 && arguments[i][1] >= 48)
+                        else if (argument[1] <= 57 && argument[1] >= 48)
                         {
                             // negative number as a value
-                            value += arguments[i] + ' ';
+                            value += argument + ' ';
                         }
                         else
@@ -161,13 +161,13 @@
                             }
 
-                            if (arguments[i][1] == '-')
+                            if (argument[1] == '-')
                             {
                                 // full name argument with "--name"
-                                name = arguments[i].substr(2);
+                                name = argument.substr(2);
                             }
                             else
                             {
                                 // shortcut with "-s"
-                                shortcut = arguments[i].substr(1);
+                                shortcut = argument.substr(1);
                             }
 
@@ -186,5 +186,5 @@
 
                         // Concatenate strings as long as there's no new argument by "-" or "--"
-                        value += arguments[i] + ' ';
+                        value += argument + ' ';
                     }
                 }
Index: code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc	(revision 10821)
@@ -234,9 +234,9 @@
         }
 
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            file << (*it)->getFileEntry() << endl;
-
-            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (*it)->getEntriesBegin(); it_entries != (*it)->getEntriesEnd(); ++it_entries)
+        for (const auto & elem : this->sections_)
+        {
+            file << (elem)->getFileEntry() << endl;
+
+            for (std::list<ConfigFileEntry*>::const_iterator it_entries = (elem)->getEntriesBegin(); it_entries != (elem)->getEntriesEnd(); ++it_entries)
                 file << (*it_entries)->getFileEntry() << endl;
 
@@ -280,7 +280,7 @@
     ConfigFileSection* ConfigFile::getSection(const std::string& section) const
     {
-        for (std::list<ConfigFileSection*>::const_iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
+        for (const auto & elem : this->sections_)
+            if ((elem)->getName() == section)
+                return (elem);
         return nullptr;
     }
@@ -291,7 +291,7 @@
     ConfigFileSection* ConfigFile::getOrCreateSection(const std::string& section)
     {
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-            if ((*it)->getName() == section)
-                return (*it);
+        for (auto & elem : this->sections_)
+            if ((elem)->getName() == section)
+                return (elem);
 
         this->bUpdated_ = true;
@@ -307,10 +307,10 @@
         bool sectionsUpdated = false;
 
-        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
-        {
-            if ((*it)->bUpdated_)
+        for (auto & elem : this->sections_)
+        {
+            if ((elem)->bUpdated_)
             {
                 sectionsUpdated = true;
-                (*it)->bUpdated_ = false;
+                (elem)->bUpdated_ = false;
             }
         }
Index: code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc	(revision 10821)
@@ -53,7 +53,7 @@
     ConfigFileManager::~ConfigFileManager()
     {
-        for (std::array<ConfigFile*, 3>::const_iterator it = this->configFiles_.begin(); it != this->configFiles_.end(); ++it)
-            if (*it)
-                delete (*it);
+        for (const auto & elem : this->configFiles_)
+            if (elem)
+                delete (elem);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc	(revision 10821)
@@ -80,8 +80,8 @@
     {
         unsigned int size = 0;
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
-            if ((*it)->getName() == name)
-                if ((*it)->getIndex() >= size)
-                    size = (*it)->getIndex() + 1;
+        for (const auto & elem : this->entries_)
+            if ((elem)->getName() == name)
+                if ((elem)->getIndex() >= size)
+                    size = (elem)->getIndex() + 1;
         return size;
     }
@@ -105,8 +105,8 @@
     ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name) const
     {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        for (const auto & elem : this->entries_)
         {
-            if ((*it)->getName() == name)
-                return *it;
+            if ((elem)->getName() == name)
+                return elem;
         }
         return nullptr;
@@ -121,8 +121,8 @@
     ConfigFileEntry* ConfigFileSection::getEntry(const std::string& name, unsigned int index) const
     {
-        for (std::list<ConfigFileEntry*>::const_iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
+        for (const auto & elem : this->entries_)
         {
-            if (((*it)->getName() == name) && ((*it)->getIndex() == index))
-                return *it;
+            if (((elem)->getName() == name) && ((elem)->getIndex() == index))
+                return elem;
         }
         return nullptr;
Index: code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h	(revision 10821)
@@ -130,6 +130,6 @@
 
                 this->value_ = V();
-                for (unsigned int i = 0; i < defvalue.size(); i++)
-                    this->valueVector_.push_back(MultiType(defvalue[i]));
+                for (auto & elem : defvalue)
+                    this->valueVector_.push_back(MultiType(elem));
 
                 this->initVector();
@@ -183,6 +183,6 @@
                     std::vector<T> temp = *value;
                     value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
+                    for (auto & elem : this->valueVector_)
+                        value->push_back(elem);
 
                     if (value->size() != temp.size())
@@ -211,6 +211,6 @@
                 {
                     value->clear();
-                    for (unsigned int i = 0; i < this->valueVector_.size(); ++i)
-                        value->push_back(this->valueVector_[i]);
+                    for (auto & elem : this->valueVector_)
+                        value->push_back(elem);
                 }
                 return *this;
Index: code/branches/cpp11_v2/src/libraries/core/input/Button.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/Button.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/Button.cc	(revision 10821)
@@ -196,11 +196,11 @@
 
                     // add command to the buffer if not yet existing
-                    for (unsigned int iParamCmd = 0; iParamCmd < paramCommandBuffer_->size(); iParamCmd++)
-                    {
-                        if ((*paramCommandBuffer_)[iParamCmd]->evaluation_.getConsoleCommand()
+                    for (auto & elem : *paramCommandBuffer_)
+                    {
+                        if (elem->evaluation_.getConsoleCommand()
                             == eval.getConsoleCommand())
                         {
                             // already in list
-                            cmd->paramCommand_ = (*paramCommandBuffer_)[iParamCmd];
+                            cmd->paramCommand_ = elem;
                             break;
                         }
Index: code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputBuffer.cc	(revision 10821)
@@ -110,10 +110,10 @@
     void InputBuffer::insert(const std::string& input, bool update)
     {
-        for (unsigned int i = 0; i < input.size(); ++i)
-        {
-            this->insert(input[i], false);
+        for (auto & elem : input)
+        {
+            this->insert(elem, false);
 
             if (update)
-                this->updated(input[i], false);
+                this->updated(elem, false);
         }
 
@@ -170,8 +170,8 @@
     void InputBuffer::updated()
     {
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((*it)->bListenToAllChanges_)
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((elem)->bListenToAllChanges_)
+                (elem)->callFunction();
         }
     }
@@ -179,8 +179,8 @@
     void InputBuffer::updated(const char& update, bool bSingleInput)
     {
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((!(*it)->trueKeyFalseChar_) && ((*it)->bListenToAllChanges_ || ((*it)->char_ == update)) && (!(*it)->bOnlySingleInput_ || bSingleInput))
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((!(elem)->trueKeyFalseChar_) && ((elem)->bListenToAllChanges_ || ((elem)->char_ == update)) && (!(elem)->bOnlySingleInput_ || bSingleInput))
+                (elem)->callFunction();
         }
     }
@@ -201,8 +201,8 @@
             return;
 
-        for (std::list<BaseInputBufferListenerTuple*>::iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-        {
-            if ((*it)->trueKeyFalseChar_ && ((*it)->key_ == evt.getKeyCode()))
-                (*it)->callFunction();
+        for (auto & elem : this->listeners_)
+        {
+            if ((elem)->trueKeyFalseChar_ && ((elem)->key_ == evt.getKeyCode()))
+                (elem)->callFunction();
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h	(revision 10821)
@@ -158,12 +158,12 @@
 
             // Call all the states with the held button event
-            for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)
-                for (unsigned int iS = 0; iS < inputStates_.size(); ++iS)
-                    inputStates_[iS]->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
-                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB]));
+            for (auto & button : pressedButtons_)
+                for (auto & state : inputStates_)
+                    state->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
+                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
 
             // Call states with device update events
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->update(time.getDeltaTime(), this->getDeviceID());
+            for (auto & elem : inputStates_)
+                elem->update(time.getDeltaTime(), this->getDeviceID());
 
             static_cast<DeviceClass*>(this)->updateImpl(time);
@@ -196,6 +196,6 @@
 
             // Call states
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+            for (auto & elem : inputStates_)
+                elem->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
@@ -218,6 +218,6 @@
 
             // Call states
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
+            for (auto & elem : inputStates_)
+                elem->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc	(revision 10821)
@@ -373,9 +373,9 @@
         // check whether a state has changed its EMPTY situation
         bool bUpdateRequired = false;
-        for (std::map<int, InputState*>::iterator it = activeStates_.begin(); it != activeStates_.end(); ++it)
-        {
-            if (it->second->hasExpired())
-            {
-                it->second->resetExpiration();
+        for (auto & elem : activeStates_)
+        {
+            if (elem.second->hasExpired())
+            {
+                elem.second->resetExpiration();
                 bUpdateRequired = true;
             }
@@ -391,6 +391,6 @@
 
         // Collect function calls for the update
-        for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i)
-            activeStatesTicked_[i]->update(time.getDeltaTime());
+        for (auto & elem : activeStatesTicked_)
+            elem->update(time.getDeltaTime());
 
         // Execute all cached function calls in order
@@ -401,6 +401,6 @@
         // If we delay the calls, then OIS and and the InputStates are not anymore
         // in the call stack and can therefore be edited.
-        for (size_t i = 0; i < this->callBuffer_.size(); ++i)
-            this->callBuffer_[i]();
+        for (auto & elem : this->callBuffer_)
+            elem();
 
         this->callBuffer_.clear();
@@ -437,13 +437,13 @@
         // Using an std::set to avoid duplicates
         std::set<InputState*> tempSet;
-        for (unsigned int i = 0; i < devices_.size(); ++i)
-            if (devices_[i] != nullptr)
-                for (unsigned int iState = 0; iState < devices_[i]->getStateListRef().size(); ++iState)
-                    tempSet.insert(devices_[i]->getStateListRef()[iState]);
+        for (auto & elem : devices_)
+            if (elem != nullptr)
+                for (unsigned int iState = 0; iState < elem->getStateListRef().size(); ++iState)
+                    tempSet.insert(elem->getStateListRef()[iState]);
 
         // Copy the content of the std::set back to the actual vector
         activeStatesTicked_.clear();
-        for (std::set<InputState*>::const_iterator it = tempSet.begin();it != tempSet.end(); ++it)
-            activeStatesTicked_.push_back(*it);
+        for (const auto & elem : tempSet)
+            activeStatesTicked_.push_back(elem);
 
         // Check whether we have to change the mouse mode
Index: code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/JoyStick.cc	(revision 10821)
@@ -186,6 +186,6 @@
     void JoyStick::clearBuffersImpl()
     {
-        for (int j = 0; j < 4; ++j)
-            povStates_[j] = 0;
+        for (auto & elem : povStates_)
+            elem = 0;
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc	(revision 10821)
@@ -153,7 +153,7 @@
     void KeyBinder::buttonThresholdChanged()
     {
-        for (unsigned int i = 0; i < allHalfAxes_.size(); i++)
-            if (!allHalfAxes_[i]->bButtonThresholdUser_)
-                allHalfAxes_[i]->buttonThreshold_ = this->buttonThreshold_;
+        for (auto & elem : allHalfAxes_)
+            if (!elem->bButtonThresholdUser_)
+                elem->buttonThreshold_ = this->buttonThreshold_;
     }
 
@@ -383,6 +383,6 @@
             it->second->clear();
 
-        for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
-            delete paramCommandBuffer_[i];
+        for (auto & elem : paramCommandBuffer_)
+            delete elem;
         paramCommandBuffer_.clear();
     }
@@ -394,7 +394,7 @@
     {
         // iterate over all buttons
-        for (std::map<std::string, Button*>::iterator it = this->allButtons_.begin(); it != this->allButtons_.end(); ++it)
-        {
-            Button* button = it->second;
+        for (const auto & elem : this->allButtons_)
+        {
+            Button* button = elem.second;
 
             // iterate over all modes
@@ -465,6 +465,6 @@
         this->mousePosition_[1] = 0.0f;
 
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
-            mouseAxes_[i].reset();
+        for (auto & elem : mouseAxes_)
+            elem.reset();
     }
 
@@ -505,5 +505,5 @@
         }
 
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
+        for (auto & elem : mouseAxes_)
         {
             // Why dividing relative value by dt? The reason lies in the simple fact, that when you
@@ -515,8 +515,8 @@
             {
                 // just ignore if dt == 0.0 because we have multiplied by 0.0 anyway..
-                mouseAxes_[i].relVal_ /= dt;
-            }
-
-            tickHalfAxis(mouseAxes_[i]);
+                elem.relVal_ /= dt;
+            }
+
+            tickHalfAxis(elem);
         }
     }
Index: code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h	(revision 10821)
@@ -226,13 +226,13 @@
     {
         // execute all buffered bindings (additional parameter)
-        for (unsigned int i = 0; i < paramCommandBuffer_.size(); i++)
+        for (auto & elem : paramCommandBuffer_)
         {
-            paramCommandBuffer_[i]->rel_ *= dt;
-            paramCommandBuffer_[i]->execute();
+            elem->rel_ *= dt;
+            elem->execute();
         }
 
         // always reset the relative movement of the mouse
-        for (unsigned int i = 0; i < MouseAxisCode::numberOfAxes * 2; i++)
-            mouseAxes_[i].relVal_ = 0.0f;
+        for (auto & elem : mouseAxes_)
+            elem.relVal_ = 0.0f;
     }
 }// tolua_export
Index: code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/input/Mouse.cc	(revision 10821)
@@ -82,6 +82,6 @@
             IntVector2 rel(e.state.X.rel, e.state.Y.rel);
             IntVector2 clippingSize(e.state.width, e.state.height);
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->mouseMoved(abs, rel, clippingSize);
+            for (auto & elem : inputStates_)
+                elem->mouseMoved(abs, rel, clippingSize);
         }
 
@@ -89,6 +89,6 @@
         if (e.state.Z.rel != 0)
         {
-            for (unsigned int i = 0; i < inputStates_.size(); ++i)
-                inputStates_[i]->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
+            for (auto & elem : inputStates_)
+                elem->mouseScrolled(e.state.Z.abs, e.state.Z.rel);
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/module/DynLibManager.cc	(revision 10821)
@@ -75,8 +75,8 @@
     {
         // Unload & delete resources in turn
-        for (DynLibList::iterator it = mLibList.begin(); it != mLibList.end(); ++it)
+        for (auto & elem : mLibList)
         {
-            it->second->unload();
-            delete it->second;
+            elem.second->unload();
+            delete elem.second;
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc	(revision 10821)
@@ -59,6 +59,6 @@
     {
         const std::set<StaticallyInitializedInstance*>& instances = this->staticallyInitializedInstancesByType_[type];
-        for (std::set<StaticallyInitializedInstance*>::iterator it = instances.begin(); it != instances.end(); ++it)
-            (*it)->load();
+        for (const auto & instance : instances)
+            (instance)->load();
     }
 
@@ -75,6 +75,6 @@
         std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>> copy(this->staticallyInitializedInstancesByType_);
         this->staticallyInitializedInstancesByType_.clear();
-        for (std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>>::iterator it1 = copy.begin(); it1 != copy.end(); ++it1)
-            for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2)
+        for (auto & elem : copy)
+            for (std::set<StaticallyInitializedInstance*>::iterator it2 = elem.second.begin(); it2 != elem.second.end(); ++it2)
                 delete (*it2);
     }
Index: code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc	(revision 10821)
@@ -59,8 +59,8 @@
         ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr);
 
-        for (std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it)
-            delete it->second;
-        for (std::map<std::string, Plugin*>::iterator it = this->plugins_.begin(); it != this->plugins_.end(); ++it)
-            delete it->second;
+        for (auto & elem : this->references_)
+            delete elem.second;
+        for (auto & elem : this->plugins_)
+            delete elem.second;
     }
 
@@ -68,8 +68,8 @@
     {
         const std::vector<std::string>& pluginPaths = ApplicationPaths::getInstance().getPluginPaths();
-        for (std::vector<std::string>::const_iterator it = pluginPaths.begin(); it != pluginPaths.end(); ++it)
+        for (auto libraryName : pluginPaths)
         {
             std::string name;
-            std::string libraryName = (*it);
+            
             std::string filename = libraryName +  + specialConfig::pluginExtension;
             std::ifstream infile(filename.c_str());
Index: code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/module/StaticInitializationManager.cc	(revision 10821)
@@ -50,6 +50,6 @@
     {
         // attention: loading a module may add new handlers to the list
-        for (std::list<StaticInitializationHandler*>::iterator it = this->handlers_.begin(); it != this->handlers_.end(); ++it)
-            (*it)->loadModule(module);
+        for (auto & elem : this->handlers_)
+            (elem)->loadModule(module);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/object/Context.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/Context.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/object/Context.cc	(revision 10821)
@@ -70,6 +70,6 @@
         // unregister context from object lists before object lists are destroyed
         this->unregisterObject();
-        for (size_t i = 0; i < this->objectLists_.size(); ++i)
-            delete this->objectLists_[i];
+        for (auto & elem : this->objectLists_)
+            delete elem;
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/object/Listable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/Listable.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/object/Listable.cc	(revision 10821)
@@ -76,6 +76,6 @@
     void Listable::unregisterObject()
     {
-        for (size_t i = 0; i < this->elements_.size(); ++i)
-            Listable::deleteObjectListElement(this->elements_[i]);
+        for (auto & elem : this->elements_)
+            Listable::deleteObjectListElement(elem);
         this->elements_.clear();
     }
@@ -91,8 +91,8 @@
         this->elements_.clear();
 
-        for (size_t i = 0; i < copy.size(); ++i)
+        for (auto & elem : copy)
         {
-            copy[i]->changeContext(this->context_, context);
-            Listable::deleteObjectListElement(copy[i]);
+            elem->changeContext(this->context_, context);
+            Listable::deleteObjectListElement(elem);
         }
 
Index: code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/object/ObjectListBase.cc	(revision 10821)
@@ -92,6 +92,6 @@
     void ObjectListBase::notifyRemovalListeners(ObjectListBaseElement* element) const
     {
-        for (std::vector<ObjectListElementRemovalListener*>::const_iterator it = this->listeners_.begin(); it != this->listeners_.end(); ++it)
-            (*it)->removedElement(element);
+        for (const auto & elem : this->listeners_)
+            (elem)->removedElement(element);
     }
 
Index: code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.cc	(revision 10821)
@@ -73,12 +73,12 @@
     void ScopeManager::activateListenersForScope(ScopeID::Value scope)
     {
-        for (std::set<ScopeListener*>::iterator it = this->listeners_[scope].begin(); it != this->listeners_[scope].end(); ++it)
-            this->activateListener(*it);
+        for (const auto & elem : this->listeners_[scope])
+            this->activateListener(elem);
     }
 
     void ScopeManager::deactivateListenersForScope(ScopeID::Value scope)
     {
-        for (std::set<ScopeListener*>::iterator it = this->listeners_[scope].begin(); it != this->listeners_[scope].end(); ++it)
-            this->deactivateListener(*it);
+        for (const auto & elem : this->listeners_[scope])
+            this->deactivateListener(elem);
     }
 
Index: code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/network/FunctionCall.cc	(revision 10821)
@@ -131,7 +131,7 @@
   *(uint32_t*)(mem+2*sizeof(uint32_t)) = this->objectID_;
   mem += 3*sizeof(uint32_t);
-  for( std::vector<MultiType>::iterator it = this->arguments_.begin(); it!=this->arguments_.end(); ++it )
+  for(auto & elem : this->arguments_)
   {
-    it->exportData( mem );
+    elem.exportData( mem );
   }
 }
Index: code/branches/cpp11_v2/src/libraries/network/Host.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/network/Host.cc	(revision 10821)
@@ -80,9 +80,9 @@
   void Host::addPacket(ENetPacket *packet, int clientID, uint8_t channelID)
   {
-    for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
+    for(auto & instances_ : instances_s)
     {
-      if( (*it)->isActive() )
+      if( (instances_)->isActive() )
       {
-        (*it)->queuePacket(packet, clientID, channelID);
+        (instances_)->queuePacket(packet, clientID, channelID);
       }
     }
@@ -97,7 +97,7 @@
   void Host::sendChat(const std::string& message, unsigned int sourceID, unsigned int targetID)
   {
-    for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it )
-      if( (*it)->isActive() )
-        (*it)->doSendChat(message, sourceID, targetID);
+    for(auto & instances_ : instances_s)
+      if( (instances_)->isActive() )
+        (instances_)->doSendChat(message, sourceID, targetID);
   }
 
@@ -114,9 +114,9 @@
   bool Host::isServer()
   {
-    for (std::vector<Host*>::iterator it=instances_s.begin(); it!=instances_s.end(); ++it )
+    for (auto & instances_ : instances_s)
     {
-      if( (*it)->isActive() )
+      if( (instances_)->isActive() )
       {
-        if( (*it)->isServer_() )
+        if( (instances_)->isServer_() )
           return true;
       }
Index: code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10821)
@@ -88,6 +88,6 @@
     }
     // delete all Synchronisable Variables from syncList_ ( which are also in stringList_ )
-    for(std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin(); it!=syncList_.end(); it++)
-      delete (*it);
+    for(auto & elem : syncList_)
+      delete (elem);
     syncList_.clear();
     stringList_.clear();
Index: code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/tools/DebugDrawer.cc	(revision 10821)
@@ -392,11 +392,11 @@
             manualObject->estimateVertexCount(lineVertices.size());
             manualObject->estimateIndexCount(lineIndices.size());
-            for (std::list<VertexPair>::iterator i = lineVertices.begin(); i != lineVertices.end(); i++)
+            for (auto & elem : lineVertices)
             {
-                manualObject->position(i->first);
-                manualObject->colour(i->second);
+                manualObject->position(elem.first);
+                manualObject->colour(elem.second);
             }
-            for (std::list<int>::iterator i = lineIndices.begin(); i != lineIndices.end(); i++)
-                manualObject->index(*i);
+            for (auto & elem : lineIndices)
+                manualObject->index(elem);
         }
         else
@@ -409,11 +409,11 @@
             manualObject->estimateVertexCount(triangleVertices.size());
             manualObject->estimateIndexCount(triangleIndices.size());
-            for (std::list<VertexPair>::iterator i = triangleVertices.begin(); i != triangleVertices.end(); i++)
+            for (auto & elem : triangleVertices)
             {
-                manualObject->position(i->first);
-                manualObject->colour(i->second.r, i->second.g, i->second.b, fillAlpha);
+                manualObject->position(elem.first);
+                manualObject->colour(elem.second.r, elem.second.g, elem.second.b, fillAlpha);
             }
-            for (std::list<int>::iterator i = triangleIndices.begin(); i != triangleIndices.end(); i++)
-                manualObject->index(*i);
+            for (auto & elem : triangleIndices)
+                manualObject->index(elem);
         }
         else
Index: code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/tools/IcoSphere.cc	(revision 10821)
@@ -116,7 +116,7 @@
             std::list<TriangleIndices> faces2;
 
-            for (std::list<TriangleIndices>::iterator j = faces.begin(); j != faces.end(); j++)
+            for (auto f : faces)
             {
-                TriangleIndices f = *j;
+                
                 int a = getMiddlePoint(f.v1, f.v2);
                 int b = getMiddlePoint(f.v2, f.v3);
@@ -194,8 +194,8 @@
     void IcoSphere::addToLineIndices(int baseIndex, std::list<int>* target) const
     {
-        for (std::list<LineIndices>::const_iterator i = lineIndices.begin(); i != lineIndices.end(); i++)
+        for (const auto & elem : lineIndices)
         {
-            target->push_back(baseIndex + (*i).v1);
-            target->push_back(baseIndex + (*i).v2);
+            target->push_back(baseIndex + (elem).v1);
+            target->push_back(baseIndex + (elem).v2);
         }
     }
@@ -203,9 +203,9 @@
     void IcoSphere::addToTriangleIndices(int baseIndex, std::list<int>* target) const
     {
-        for (std::list<TriangleIndices>::const_iterator i = faces.begin(); i != faces.end(); i++)
+        for (const auto & elem : faces)
         {
-            target->push_back(baseIndex + (*i).v1);
-            target->push_back(baseIndex + (*i).v2);
-            target->push_back(baseIndex + (*i).v3);
+            target->push_back(baseIndex + (elem).v1);
+            target->push_back(baseIndex + (elem).v2);
+            target->push_back(baseIndex + (elem).v3);
         }
     }
@@ -217,6 +217,6 @@
         transform.setScale(Ogre::Vector3(scale, scale, scale));
 
-        for (int i = 0; i < (int) vertices.size(); i++)
-            target->push_back(VertexPair(transform * vertices[i], colour));
+        for (auto & elem : vertices)
+            target->push_back(VertexPair(transform * elem, colour));
 
         return vertices.size();
Index: code/branches/cpp11_v2/src/libraries/tools/Shader.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/tools/Shader.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/tools/Shader.cc	(revision 10821)
@@ -197,23 +197,23 @@
     {
         // iterate through the list of parameters
-        for (std::list<ParameterContainer>::iterator it = this->parameters_.begin(); it != this->parameters_.end(); ++it)
-        {
-            Ogre::Technique* techniquePtr = materialPtr->getTechnique(it->technique_);
+        for (auto & elem : this->parameters_)
+        {
+            Ogre::Technique* techniquePtr = materialPtr->getTechnique(elem.technique_);
             if (techniquePtr)
             {
-                Ogre::Pass* passPtr = techniquePtr->getPass(it->pass_);
+                Ogre::Pass* passPtr = techniquePtr->getPass(elem.pass_);
                 if (passPtr)
                 {
                     // change the value of the parameter depending on its type
-                    if (it->value_.isType<int>())
-                        passPtr->getFragmentProgramParameters()->setNamedConstant(it->parameter_, it->value_.get<int>());
-                    else if (it->value_.isType<float>())
-                        passPtr->getFragmentProgramParameters()->setNamedConstant(it->parameter_, it->value_.get<float>());
+                    if (elem.value_.isType<int>())
+                        passPtr->getFragmentProgramParameters()->setNamedConstant(elem.parameter_, elem.value_.get<int>());
+                    else if (elem.value_.isType<float>())
+                        passPtr->getFragmentProgramParameters()->setNamedConstant(elem.parameter_, elem.value_.get<float>());
                 }
                 else
-                    orxout(internal_warning) << "No pass " << it->pass_ << " in technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl;
+                    orxout(internal_warning) << "No pass " << elem.pass_ << " in technique " << elem.technique_ << " in compositor \"" << this->compositorName_ << "\" or pass has no shader." << endl;
             }
             else
-                orxout(internal_warning) << "No technique " << it->technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl;
+                orxout(internal_warning) << "No technique " << elem.technique_ << " in compositor \"" << this->compositorName_ << "\" or technique has no pass with shader." << endl;
         }
         this->parameters_.clear();
@@ -228,6 +228,6 @@
         {
             const Ogre::Root::PluginInstanceList& plugins = Ogre::Root::getSingleton().getInstalledPlugins();
-            for (size_t i = 0; i < plugins.size(); ++i)
-                if (plugins[i]->getName() == "Cg Program Manager")
+            for (auto & plugin : plugins)
+                if (plugin->getName() == "Cg Program Manager")
                     return true;
         }
Index: code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/DisplayStringConversions.h	(revision 10821)
@@ -51,7 +51,7 @@
             {
                 Ogre::UTFString::code_point cp;
-                for (unsigned int i = 0; i < input.size(); ++i)
+                for (auto & elem : input)
                 {
-                  cp = input[i];
+                  cp = elem;
                   cp &= 0xFF;
                   output->append(1, cp);
Index: code/branches/cpp11_v2/src/libraries/util/Serialise.h
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/Serialise.h	(revision 10821)
@@ -672,6 +672,6 @@
     {
         uint32_t tempsize = sizeof(uint32_t); // for the number of entries
-        for( typename std::set<T>::iterator it=((std::set<T>*)(&variable))->begin(); it!=((std::set<T>*)(&variable))->end(); ++it)
-            tempsize += returnSize( *it );
+        for(const auto & elem : *((std::set<T>*)(&variable)))
+            tempsize += returnSize( elem );
         return tempsize;
     }
Index: code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/SignalHandler.cc	(revision 10821)
@@ -81,7 +81,7 @@
     void SignalHandler::dontCatch()
     {
-      for ( SignalRecList::iterator it = sigRecList.begin(); it != sigRecList.end(); it++ )
-      {
-        signal( it->signal, it->handler );
+      for (auto & elem : sigRecList)
+      {
+        signal( elem.signal, elem.handler );
       }
 
@@ -133,7 +133,7 @@
       }
 
-      for ( SignalCallbackList::iterator it = SignalHandler::getInstance().callbackList.begin(); it != SignalHandler::getInstance().callbackList.end(); it++  )
-      {
-        (*(it->cb))( it->someData );
+      for (auto & elem : SignalHandler::getInstance().callbackList)
+      {
+        (*(elem.cb))( elem.someData );
       }
 
Index: code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/SmallObjectAllocator.cc	(revision 10821)
@@ -53,6 +53,6 @@
     SmallObjectAllocator::~SmallObjectAllocator()
     {
-        for (std::vector<char*>::iterator it = this->blocks_.begin(); it != this->blocks_.end(); ++it)
-            delete[] *it;
+        for (auto & elem : this->blocks_)
+            delete[] elem;
     }
 
Index: code/branches/cpp11_v2/src/libraries/util/StringUtils.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/StringUtils.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/StringUtils.cc	(revision 10821)
@@ -262,7 +262,7 @@
         std::string output(str.size() * 2, ' ');
         size_t i = 0;
-        for (size_t pos = 0; pos < str.size(); ++pos)
-        {
-            switch (str[pos])
+        for (auto & elem : str)
+        {
+            switch (elem)
             {
             case '\\': output[i] = '\\'; output[i + 1] = '\\'; break;
@@ -276,5 +276,5 @@
             case  '"': output[i] = '\\'; output[i + 1] =  '"'; break;
             case '\0': output[i] = '\\'; output[i + 1] =  '0'; break;
-            default  : output[i] = str[pos]; ++i; continue;
+            default  : output[i] = elem; ++i; continue;
             }
             i += 2;
@@ -336,7 +336,7 @@
     void lowercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(tolower((*str)[i]));
+        for (auto & elem : *str)
+        {
+            elem = static_cast<char>(tolower(elem));
         }
     }
@@ -353,7 +353,7 @@
     void uppercase(std::string* str)
     {
-        for (size_t i = 0; i < str->size(); ++i)
-        {
-            (*str)[i] = static_cast<char>(toupper((*str)[i]));
+        for (auto & elem : *str)
+        {
+            elem = static_cast<char>(toupper(elem));
         }
     }
@@ -460,9 +460,9 @@
     {
         size_t j = 0;
-        for (size_t i = 0; i < str.size(); ++i)
-        {
-            if (str[i] == target)
+        for (auto & elem : str)
+        {
+            if (elem == target)
             {
-                str[i] = replacement;
+                elem = replacement;
                 ++j;
             }
Index: code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/output/BaseWriter.cc	(revision 10821)
@@ -116,7 +116,7 @@
 
         // iterate over all strings in the config-vector
-        for (size_t i = 0; i < this->configurableAdditionalContexts_.size(); ++i)
+        for (auto & full_name : this->configurableAdditionalContexts_)
         {
-            const std::string& full_name = this->configurableAdditionalContexts_[i];
+            
 
             // split the name into main-name and sub-name (if given; otherwise sub-name remains empty). both names are separated by ::
Index: code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/output/MemoryWriter.cc	(revision 10821)
@@ -65,7 +65,7 @@
     void MemoryWriter::resendOutput(OutputListener* listener) const
     {
-        for (size_t i = 0; i < this->messages_.size(); ++i)
+        for (auto & message : this->messages_)
         {
-            const Message& message = this->messages_[i];
+            
             listener->unfilteredOutput(message.level, *message.context, message.lines);
         }
Index: code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/output/OutputListener.cc	(revision 10821)
@@ -111,6 +111,6 @@
         this->levelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedLevelMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedLevelMask(this);
     }
 
@@ -142,6 +142,6 @@
         this->additionalContextsLevelMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsLevelMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedAdditionalContextsLevelMask(this);
     }
 
@@ -153,6 +153,6 @@
         this->additionalContextsMask_ = mask;
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->updatedAdditionalContextsMask(this);
+        for (auto & elem : this->listeners_)
+            elem->updatedAdditionalContextsMask(this);
     }
 
Index: code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/output/OutputManager.cc	(revision 10821)
@@ -132,6 +132,6 @@
         vectorize(message, '\n', &lines);
 
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->listeners_[i]->unfilteredOutput(level, context, lines);
+        for (auto & elem : this->listeners_)
+            elem->unfilteredOutput(level, context, lines);
     }
 
@@ -179,6 +179,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getLevelMask();
+        for (auto & elem : this->listeners_)
+            mask |= elem->getLevelMask();
         this->combinedLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -190,6 +190,6 @@
     {
         int mask = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            mask |= this->listeners_[i]->getAdditionalContextsLevelMask();
+        for (auto & elem : this->listeners_)
+            mask |= elem->getAdditionalContextsLevelMask();
         this->combinedAdditionalContextsLevelMask_ = static_cast<OutputLevel>(mask);
     }
@@ -201,6 +201,6 @@
     {
         this->combinedAdditionalContextsMask_ = 0;
-        for (size_t i = 0; i < this->listeners_.size(); ++i)
-            this->combinedAdditionalContextsMask_ |= this->listeners_[i]->getAdditionalContextsMask();
+        for (auto & elem : this->listeners_)
+            this->combinedAdditionalContextsMask_ |= elem->getAdditionalContextsMask();
     }
 
Index: code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc	(revision 10818)
+++ code/branches/cpp11_v2/src/libraries/util/output/SubcontextOutputListener.cc	(revision 10821)
@@ -79,8 +79,8 @@
 
         // compose the mask of subcontexts and build the set of sub-context-IDs
-        for (std::set<const OutputContextContainer*>::const_iterator it = subcontexts.begin(); it != subcontexts.end(); ++it)
+        for (const auto & subcontext : subcontexts)
         {
-            this->subcontextsCheckMask_ |= (*it)->mask;
-            this->subcontexts_.insert((*it)->sub_id);
+            this->subcontextsCheckMask_ |= (subcontext)->mask;
+            this->subcontexts_.insert((subcontext)->sub_id);
         }
 
