refactored logic for settings. TODO - remove unnecessary elements since Preferences app does the work now