Update JavaScript to match human API changes