more js improvements