Use an iterator to make selecting the entries we're interested in easier.
Corrected silly variable name.