fix Carousel bug, minor refactoring