Made looping script the master script