Moved code from different matchers into a single class