implemented multiple directives on a line and more elegant handling of headings with directives.