sharedprefs refactoring