Universal database stuff.
Add some tests.