tiny cleanup. use pattern matching more cleverly
Merge pull request #1 from edofic/master

Code cleanup (whitespace, more pattern matching)