Added some comments to function definitions.