Added chatserver.js to repo. Some cleaning up also