http module refactorings