Fix test-in-velocity bugs and add compiled lib .js files so they can be published to npm