lots of changes, integrating socket.io :)