Refactor to enable it to be a library service.
Create package to wrapper calls to the facet counts service.
Move functionality out of script and into wrapper package.
Fix library path.
Move functionality into package.