Refactor build and packaging

Yeah, up on npm.