Minor change to variable name

Also some fixes to return types and replaces a few instances of PATCH
with PUT.