Refactoring to carousel