Added support for exclude_headers, collapse and transformation