A bunch of DB cleanup.