Rewrote code to use database, but slice deletion is still not completed nor is the hard reset on exit