Fix sorting bug and include no ties and negative score functionality