Fixes #4. Matching code redone.
Fixes #4. More output comparing fixing.
Merge pull request #5 from denis-mentey/master

#4 fix