Fixed scripts to use new API now