Switch from callbacks to promises.