Refactoring of JS + removing invalid search code from index (index does not allow to search tickets anymore)