Updated to fit with the rest refactor.
More integration with new rest refactor.