Added clear  and is applied functionality to facet view models.
Moved some of the facet building and query building functionality into a separate class.