Use range-based for loops where appropriate
formatting