Refactored SQueryHtmlElement and SQueryWait