Moved all Chat logic and code into spa.chat.js