Added test suite for pattern matching
Minor changes