upgrade to socket.io 1.0, mini refactoring server script