Document and test the DB changes

Also some other minor cleanup.

(Can you really not just pull from my repo?)