Added a Matcher class to handle the matching process
Minor changes