Oh, I never actually used the list of lines in the file directly, I just iterated over all the lines in the file one at a time. Let's make this simpler.