Performed some re-factoring to the facets infrastructure to make the code more testable.