Port "threading" and "prefetching" from "enumerating".
Refactor.

Move stuff around and rename it.