Removing unnecessary directives