refactored some Directive Factory classes.