Remove unnecessary directives and filters