Uncommented code which was commented for debugging.
Fixed main search results.

Publishing of related documents did not really work correctly and was
not cleaning up documents when subscription was stopped.