made sending of headers optional and non-default
small cleanups