fixed slideshow indexing out of bounds bug. Cleaned up slideshow js