Equivalency function added. Added more tests.