many improvements to collision detection
more fixes.