Some refactoring of the toggle + slider