Simplify.
Clean up global declarations.
Always save the new display pref when toggling.
typo