Major refactoring, to improve filter-chaining and further perf enh.
Further simplification and performance improvements