delete database class and fix repo persistence with savedInstanceState