Implementing faceted filtering

Still very rough, with lots of debugging and need for refactoring - but
multi-dimensional filtering is now working