Update for Rust changes, and improve client