Renames main function to slider and helper functions to slide+type