Move iterator to where it's used and update comments.