Merge "Use write_modes_b_wrapper throughout." into nextgenv2