Js changes to accomodate new api method changes