Added initCarousel() function