Delete unused variable
Improve error responses and change variable name
Change API URLs for key actions