Started adding comments to all the functions