Improving the REST implementation