Added template deletion