neaten up a few things and add some more docs
Merge pull request #44 from facebook/wbailey

neaten up a few things and add some more docs