Some wait/when refactors