Almost done with the match finding algorithm.  One last bug, but I don't have time to fix it now.