Adding PatternEvaluator class.