cleaning in templates