Replaces for with iterators with for each

It is C++11 after all