Renaming the function API names and adding some comments