Turning scripts into plugins