Tidy up git outputted data

- Refactor template to just output and moving the logic out