Refactored DebugActivity to use the built in preferences