made several small changes, tried to implement filtering again but failed again
Merge pull request #38 from antonow/more-bug-fixes

made several small changes, tried to implement filtering again but faile...