Honestly?  No idea.  I took what was there and extended/refactored it enough to let me add a search box, and update results and facets with the the query.