Moved carousel functionality to new file