Cleaned the script up to remove a blank last row.
Made some changes.