Please measure the time of slider calls. Also check if calling slider.setSpeed before slider.move.
Besides that, I dont See any obvious problems with your Code. Tbh it is Not clean at all and had a Hard time to understand. To imrpove the readability, I suggest you to variable Definition on the top of the function and then usage bottom.