Chunked filtering.
Some cleanup.