Modified PatternMatcherApp and SingletonPatternMatcher #3