Totally rewrote collision detection algorithm. It didn't handle containment right at all.