Revert "replaced scripts with copies from new API package"

This reverts commit a6ca4ffbe4812180f1b83b091e69955a93176d41.