Another big update towards getting database encryption working. The app no longer crashes on startup!