Refactor matcher implementations.