Minor JS cleanups