Added equals and hash code.
Sorting results with Comparator