Cleaned up the HTTP lib a bit.