Add base UnicodeMatcher, modify code accordingly

However, will need to resolve conflicts once stats are reworked!