Refactured filter functionality
Merge remote-tracking branch 'upstream/master'