Added ability to count matched words into the for loop
Changed the way output to match with nested hashmap implementation
Merge branch 'refractor'