Generalized method of expressing filters in use

This is a precursor to exposing filter stacking in the UI.