Some prefix support

Doesn't actually work yet, since not every call to the database is
updated.