first pass at recursive template loading and file type control