Remove unused directives in solution