Added more useful filtering functionality

Filtering will now accomodate our immediate use-cases for fresco (can still definitely be expanded upon though). Fixed bug in filtering that was already present before my modifications.

Fixes #24 #25 #26.