logger and shared pref refactorings