Implement init() and chunkComplete() methods. Cleanup.

* Add `init()` and `chunkComplete()` methods to easy customization
* Update README to make it easier to read on github
* Code cleanup (fixed indenting)