HTTPServer rewritten and simplyfied