Basic lattice construction and tests.