Add filters and fix some bugs in Subdomains model.