Cleaned code.
Returns data frame sorted by outcome and then by alphabetical order in the case of ties.