Collision detection code in place. Need to refine.