WIP: rewriting extraction_demo to have less cruft

I want to have better comments at each stage, to know what's going
on (such as which format we're expecting lines, etc., to be in.)
WIP: More rewriting

Still in the middle of things, but saving what I have so far.