Added comments to functions

Added comments describing the elements of the definition of the function