Thanks to all who helped out with this question. I have a version that's working reasonably well for me right now, and will post code if I manage a more generalizable version. Best, Ari