Minor promise refactoring