Updated scripts with new database connection