Simplified some pattern matching
Merge pull request #1 from akashchopra/master

Minor tidy up of pattern matching