Converted slider.js into library for other app uses