renamed isEquivalent to equals, added hashCode, and some refactoring.
closing branch