Add object.compare() and tests