Add some comments to functions I wrote long ago.
Improve comments