Simplify equals method.