Added comments and refactored the JSON response.