Update to latest Rust and improve API somewhat