Updated scripts so they can be run repeatedly