Bit more work on collision detection.