fixed #750 by separating out socket.js
Merge pull request #816 from waterbearlang/750_separate_socket

fixed #750 by separating out socket.js