Update JS to better support nested carousels

Errors when multiple nested