Added adaptor for the Promises API, dropping core dep on jQuery