Improve the equality implementation a little.