Add some comments to sorting and change the prompt messages