I see why you want to factor this out into a trait to abstract over horizontal and vertical solving. Makes sense to me. Might want to add a TODO or file an issue—you don't have to do that in this patch.