implemented headings + code cleanup
Merge branch 'iss18'