clean code Slide.js