A little of cleaning up in the rest client