Created a new class to manage formatting of content for search results. Turned out to be quite a complex task. This only does the preview text so far, not titles or tags. Not yet tested.