Making the slider code its own OO Class