improved filtering methods

Added a helper function to deal with the definition of the filter
properties. This (hopefully) makes it easier to deal with filter inputs