Fix namespace filters and add more tests