refactored (created a separate file for the directives)