Working on the new database schema and case classes. Not finished, so the code is broken.