Close #11. Close #6.

This is a hack-job on both accounts.  The DB-base class stuff isn't ideal, there's definitely a cleaner way to handle it, so we might want to revisit. Similarly, I'm not psyched about the DB cleanup stuff. Maybe we should detect crashes better and only run the cleanup in the case of a detected crash?
forgot these two