Clean up lattice serialization.