Refactor Directives

refactor custom directives to follow same implementation pattern - there will be more