Added equals and hashCode methods where necessary for correct pools comparison