Fixes database deletion functions and updates tests to use static variables vs static database