publish to npm

cleanup various bugs