Issue 115 eslint

I'm not overly happy with this... but i'm open to reviews before I delete it and try again.
Comments inline.
ESLint was complaining that the `err` object here was conflicting with the higher scope `err` argument.