Added support for custom HTTP headers per curl handle. Misc. reformatting.