More database / init stuff -- still a lot of WIP