move templates into header