Factor out sliders code