clean up and HTTP debug