refactoring, some template changes

\chebert
\mmtondreau
\mitchellwrosen