Apply pull request
Update dependencies
Remove leaks reported by mocha (running test in an application that use this module)
change style (I'm not going to publish this).