DRY and simplify code, add comments, other small cleanup

* Add and standardize comments
* Stream JSON response rather than buffering
* Fix typos
* Check the error from ParseForm
* Allow omission of client_secret auth when using query params
* DRY example code
* Shorten function names
Merge pull request #2 from burnto/dry-simplify-document

DRY, add docs/comments, other minor cleanup