Added comments to clarify some of the changes.