Replace the `then` functions with wait functions
Merge pull request #24 from guywithnose/removeThen

Replace the `then` functions with wait functions