Is this promise needed?  It looks like all of this code could just be moved up to where it is resolved above, which would take out a layer of indirection.