Not sure how to make it better though, we're just going to write a few zeroes out in any case, so may as well do this as wrap it all in an Option and unwrap into zeroes on the other side of the function.