[fix] remove nested tests, use tape instead of tap
[fix] simplify tests
[fix] Use tape test runner on npm test
[feature] Test and implement validation of parameters
[fix] Don't leak variables
[feature] Add option to have a customized error handler