Refactoring for other datamodels