Initial effort to extract collision detection