Added conditional guard around use of existing REST client
Removed unused field