Adding instructive comments to explain different functions