moved stuff around to ensure db stays good state

I was running into UI errors because of test date staying in the database. This commit should fix the problem.