Minor JS tweaks