remove socket interaction from directives