Changed lattice to a list of edges instead of a bunch of arrays.