changed WebServer to have its dependencies injected