Replacing Matrix with DenseLattice.