Added final comments to the code