Template builds and refactoring