Made progress on the pattern matcher.