HttpHandler refactoring