Add chunk_reader, this way it is easier to reason about the code.
Lets use python generators instead of itertools.