Cleaned up logs
One query for caps + local sort. Local friend sort.

Based on euclidean preference distance: good only if all the caps are
rated.