Change the pipe API so that it will return a Promise rather than a Deferred.