Refactored facet code.

Improved naming convention.