Common js

Added common js style module exporting so that it can be used with browserify.

All the extra diff was just from the build process. Where those changes committed to source but not dist?