Title: Refactoring to Rust