Refactor fixup.rs

More idiomatic Rust code.