Move MatchPattern to its own header and the base namespace.