Added more tests, fixed bug in isEqual method.