Turn common callbacks into promises