Renaming scriptapi to index