Minor JS improvements.