Refactored `utility.when()` to return a `Deferred`