Moved the carousel logic into functions.php where it belongs