REST layer refactorings