Added support for request headers and created a standard APIResponse class to hold all information.