Fixing a bunch of compiler warnings.
Most were introduced with the new jscompiler.