Introducing proper resource transformation and refactoring the model layer