some cleanups in http chapter