Added comments to functions and datatypes.