Changing iterators type

All iterators have been converted to C++11 auto type