Location sorting, distance calculation working.