Rewrote entire filter framework