Added some comments to sortdict