Some script modifications