Reworded parts of filtering section, particularly diagonal removal and filtering for pre-specified regions.