remove unused directives