Compartmentalized the bg switcher