Add more tests. Fix bugs in '==' operator.