Fix failing tests
Change database deletion method