Refactor matcher parsing