Applying style guide

So. It seems pretty gigantic, but that's mostly because whitespace.

Mostly what I have done is:

* No lines exceed 80 characters,
* Any variables/functions not exposed by the API are `snake_case`,
* Using `prototype` for attaching functions
* Using javascript's loose sense of truthiness/falsiness when it benefits us
* Refactored the call to `request` to avoid duplication in API
* Other minor stuffs