> I made a few hacks that seemed to make it go but I expect there are more > places to change:
That should be about it, and I did indeed forget about these places. For the place where we hceck for multiple op types it would be nice to use switch statements, though.