Updating with more detailed comments on the functions' usage