refactor model.js
update
refactor socket.io