I have commented on the code in the scripts.

added comments to code in the cripts