cleanup facets logic + testcases