Replacing Ajax polling for Websockets