Improve npm packaging so it can be installed by npm and imported by a client