document js improvements