Vars variables and ensure it checks for leaks in mocha

There were two unvarred variables in the top of index.js. Also I added `--check-leaks` to the package.json test script declaration to ensure future unvarred variables are caught by the CI.