Clean up http.py a bit more