More changes to port CollateX Python to Python 3.