After hacking away at this for a couple hours, I think I've gotten it (somewhat) working. I've made a pull request to your GitHub repo. If you'd like me to explain the changes to you, I'm happy to do so off-list. -- Istvan Chung