Made AddToDbActivity slightly less terrible :)

I hope I didn't break it in the process.