Implemented proper Rust idioms.