Refactor App Preferences and implement loading from App Config.