Refactor, added methods for switch and stepper