Refactoring to Improve Modularity and Error Handling - The Rust Programming Language