Refactor internal Matcher stuff