Added support to change/retrieve onInit and onSwitchChange through methods