Optimized the index and search pages for reduced DB calls.