Refactor matcher.