Fighting with the borrow checker for better syntax