Moved getScript to api