Extension-ify Joe's awesome script.