Global tidy up and some better error handling

404s weren't really handled well, or at all, and there were quite a few typos in various requests. I've also uniformed the code to some general coding practices.

We're huge fans of your service, but this node.js module was rather counter-intuitive to use. Hopefully this pull request will help solve that issue for any future developers!