Merge pull request #15 from xiangli-cmu/master

check http status before decode json. This fixes #11
Make doc-comment style more consistent, fix typos.
Merge pull request #16 from juliusv/fix-comments-and-typos

Make doc-comment style more consistent, fix typos.
solve conflicts