Separate template stuff into modules