Move facets to separate model for JavaScript