Simplify equals(..) code.