Minor JS code cleanup.