Made some changes for latest version of Rust