Refactored both buttons and sliders to be more readable