Added lattice generation logic, and moved tests to their own folder