Refactor WaitCondition

Signed-off-by: mkrizmanic <mario.krizmanic@gmail.com>