Fixed collision detection prototype.  Added test switches.