Fix script and simplify slideshow