Merge "Use for-int loops to avoid allocating iterators" into main