Added changes for chat.js related stuffs.