Worked through most of the changes in the script