Various code cleanups
Upgrade to latest Rust