Fix D=1 case.
Fix bug with hamiltonian as function for uniform case.
Fix uniform case CG.