Fixed lattice id and debugged some. Simulation works but doesn't generate the correct physical model.