2.0

Npm package, code refactoring, and bug fixes.