Improved the way in which filter elements are added and removed from the validator.