removing autogenerated header content in document template, and adjusting xref rendering