Updated pyclient for new protocol.