Reshaped the RunScript API