Improved filter generation and AttributeRange method