Adding some code comments to document functions