Refactored the way resource transformations work