Use a preference fragment for the enabled switch.
Removed manual shared preferences work.