Put lattice code into a separate Lattice class
Documented Lattice