refactor of carousel js and background css