Implement the base of search indexing, untested
Fix html escaping
Refactor and fix gc-analysis