some changes to product_orthogonal

dKdiag_dX is now implemented, some of the cod eis a little tidier