added nodejs support, prepared package.json for npm publish, prepared testability