Chat editing

Refactored chat/angular code