Equality tests now test hashcodes too.
Better construction of rules.