Added utils class and some checks on sharedPreferences