Address ui review comments
Modify the tests for correct promise pattern