added socket.js module, updated comments