refactor Slider to use require.js packages