First working version of facets.

Draft version...