Change all rest client references to object scope