Tweak the findObstacle() signature and add a ton of comments.