Added comments to functions.