Frame blending seems to be working now. I should probably improve all this smaller-than/greater-than nonsense when I'm more awake.