Use proper loops; var renaming.