Added comments to code