Introduce custom matcher (should internationalize) and refactor tests to use it
Refactor PatternMatcher internals