Some more changes. Mostly data model. We need to come up with functions to manage the entities.