refactor chat.js chat_room.html chat_server.rb