Refactoring out the nested callbacks.

Currently preferring the custom simple Deferred, may switch to a promise
for chainability.