Rebuild templates