Added loop beginning to index, home, and page files