Minor work on the API, plus addition of onUpdate