Further extended promise API. See #7.