Added comments to most of the changes