define headings and further cleanup