Some progress on database stuff (may need option to stash file blob, for Android)