Added index, search page loops