move dynamic stuff into real templates; still needs more refactoring, but is there, for the most part