Init for SharedPreferences.