Refactoring slider