* Added a write_response utility to automatically format responses based on the device that made the request