Finished refactor to promises.