Moved all the template related stuff to a submodule