Prior to another major change in infrastructure
Fixed some bugs, optimized the code to run the matching faster.
In short, using Python enumerate rather than two for loops.
Merge remote-tracking branch 'origin/master'