Refactor for usage with latest WebServer version