Now works as NPM module