JavaScript optimization. Seeing unofficial improvements of ~40% for the selectSlide method.