Major update of compare.py.