Directive refactoring