Renamed kl_to_tensor to kl_to_ctensor, plus some related cleanup
some work on mmse for spde stuff