Refactoring and Update for Switcher Plugin