Added filter-vals

Thanks for the performance tip-off. I also prefer it stylistically.

I've squashed the commits into one.