Commenting and cleaning up code.
Added socket.io and a small test page