Break into multiple files.
Use an HttpServer struct.
Cleanup.