tidy up of directives