Add support for specifying response headers

Fixed up some formatting as well.