Add all the proper files to the browser version, and fix a bug which caused breakage when uglified.