client library refactor.

I took @matthewfl's work on the client library and fixed it up a bit.
There were some idiom issues, some conventions that we're followed,
and a couple of OOP things that _really_ bugged me.

I'm happy with this now, other than two things: we are doing OO terribly
with this whole response thing, and we should also implement DELETE.