Added option to trim headers.