Filter optimizations. #165.
Merge.