Changed filtering to support nested and/or comparisons