Add comparison methods to fix issue #24.