Switch more code to use Promises