Moved the initial creation of mainCarousel