First draft of iterator.
Convert older code to use new iterator.