Works for small files. Comitting, so I can experiment with larger files. Incremental.
I removed print statments in preparations for pull in.