Moved status code from the headers to the response
Added method to set the response status code