repos templates refactor