Started writing socket.io server functionality