Clean out unneeded directives.