Refactored the WebAssert class to reduce the complexity