Making sorting work, and putting in better sort options