Cleaned up some shared prefs stuff and fixed Advanced functions check