Refactor the iterator code for the subsection recursor

Per #281.