Refactor waitUntil' and waitWhile'
Merge pull request #23 from plancalculus/master

Refactor waitUntil' and waitWhile'