Added SharedPreferences, network checking, misc