Extracts code in for loops into smaller methods.