C++11 for loop

Changed the for loop to an easier to read C++11 range based for loop.

Also my first pull request.