Added support for auto-formatted headings, initial file footer support