Initial filtering support
Finish filtering rework, convert demo to use it
Merge branch 'filtering'