Clear out unneeded templates.