Oops, I ported parts of this changeset from the Node.js SDK...