js improvements