More refactoring for support of WebRequest