Fixed lattice initialization bug.
Added option whether to terminate data recording upon clicking stop button.
Removed testing code.
Removed testfile.