minor js improvements