Refactor pending waiters