Refactored WebUtil class