Cleaning up for publishing to npm.
Made it slightly easier to include in other projects.