Refactor product_filtering a bit