Removed directives and set document reference in first line.

``sectnum`` directive was causing strange numbering in github HTML version.
``contents`` directive not needed in most cases, removed from template.

Added references are useful as links to documents in tools such as Sphinx.