I also refactored the Promise noise in this function a bit.  I know it's not the point of the patch, but I couldn't help myself.