Added information on what the script does and clarified code