Preliminary working version of chunking

Runs chunking without segfaulting. Output matches version without
chunking. Yippeekayay motherf***er.