Add better support for parallel iterators.
Fix closure references.