Collision detection is finally working pretty smoothly.