Use C++11-style iterations

"for" loops look better