Forgot this wasn't in-tree yet...  Still a work-in-progress, Perry wrote this
before he quit(?), but it needs some more work to be usable...