Refactor of filter sample to move DOM manipulation to Directives from Controller