Updating JS to match the new return values.