Improved DocumentFilter template.