Created a comparator for the location. Should be expanded to a better
sort algorithm. But will work for now.