some minor refactoring to the data model