Refactor carousel