The changed implementations of `loadDependencies` and `loadRules` return promises that resolve to an array of dependency objects and an array of rules respectively.  `$.when` takes any number of promises as arguments and returns a new promise that resolves when all of the input promises resolve.