REST PUT
Tidy up code