Improved collisionhandling, not finished.