Pattern search new version. Pair generation fixes are necessary
Pattern search updated. Pair generation fixed. Waiting for tests