1. Introduce a comparator function and use it everywhere.
2. InsertBy() implemented.