Cleanup old code a bit + add $f shorthand for $field, prepare for cross-filter where conditions