Updated data models and test, running on postgresql