Refactor directives specs