Merge pull request #1 from RealGrep/master

Bug fixes and tweaks
Merge remote-tracking branch 'upstream/master'