Minor js improvements