Clean up some of the javascript file, and compile them through
 the closure compiler. This detected a number of minor errors.