Method renaming to represent the loop. Some further refactorings.