Finished the collision detection.