WIP more template repo work and more unit tests