Move to a promise-driven API