try moving all carousel code out to the view