Added an initWithLength method to the Slider class