reordered function in renderer

moved the overrides into their own region
simplified footnote handling
refactored template usage a bit, removed from scratch