Adding support for q and promise.