Rest Controller refactor