Cleanups, make a little db schema, refactors.