Added sorting of results.