fix first xdat is zero, write results of compare, added scannerbars
fix errors due to bad data, streamline runs