Improved search and made small change to indexing script