added a ``removeWhenEmpty`` field to the filters which allows a lot of special case code to be removed.
Merge branch 'performance-tuning' into performance-tuning-plus-job-classification