moved chat logic to isolate scope in directives/chatDisplay.js