Sort by distance. Refs #5