Refactored Code For Rust Version 0.13.0