Change loop iteration variable to i in demo scripts