Generate headers for md files.
Refactor templates to remove too much inheritance.