Made improvements to the waitForView methods in Waiter.java