Added comments to the functions.

Added comments to the functions.