Changed gentent loops from "each" to "each_line".