Made the slider size and file loading dynamic, based on the number of
files to be loaded