Convert node-style callback-based functions into promise-based equivalents for easier composition