Convert to promises (while keeping full backwards compatibility).