Implement the filter.

Closes #6.