Improvements to REST layer.