Cleaning up the code: response