restructure: define directives module