Adding concept of wait time (as well as some other small tweaks). Fixes #26