Mostly adding comments to all the functions