Refactored readPreferences, added tags