Add result sorting.