WIP: Postgres support

This is really turning the project into a data model that can be backed either by Postgres or some in-memory DB read from a file.