removes unused templates