Why does this use promises?  It looks like they're all resolved synchronously.