Refactor the entities to differentiate data and entity logic