Changed all iterators to use the new foreach syntax, Because c++11… that's why