Updated the scripts to run with the revised API