Removed irrelevant testing code and minor re-naming of some variables/functions relating to data0/data1 and low/high.