Thanks. I got upstream to accept the changes I mentioned so this can be cleaned up a bit. I'll submit a new PR shortly.