Removed code duplication in matchers