Help me debug my Box2D port

Hi, I'm working on a Monkey port of Box2D (I'm not Xaron and I think he abandoned his Box2D efforts). I used some regex hacking to mostly convert the Flash port to Monkey syntax and then manually patched the rest until it ran.

Unfortunately something has gone awry and the port appears to have very flaky collisions. I'm digging around trying to find the problem but I'm wondering if any Box2D experts might be able to suggest where to look based on the behaviour. You can find a flash build here. What you should see is that objects sometimes seem to collide fine but other times pass through each other and other times appear to be slowed down before they collide.

If anyone has any suggestions as to where to focus my efforts I'll be glad to hear them.
I managed to track a chunk of the collision issues to a mistranslated section of UpdatePairs in the dynamictree broadphase. I'm still hunting the cause of the slowdown that can be seen as the circle drops toward the ramp in the stacks demo or in the CCD demo. I'm also still happy to hear any suggestions about likely areas for the bug to be in.
Well, I've gone public with the port at: http://code.google.com/p/monkeybox2d/.

I believe it's fully functioning, with the only doubt remaining being about the CCD code as the CCD demo does occasionally miss a collision. However, it's difficult to create a reproducible test case and I'll go cross-eyed if I spend more time poring over code trying to spot errors.

You can see it running built to Flash and to HTML5.
nice work muddy!

Original thread: https://box2d.org/forum/viewtopic.php?t=7084