Replace arraylist by hashset in filter, which should improve better
Merge pull request #316 from manolo/master

Replace arraylist by hashset in filter, which should improve performance