tidied up httpserver