Refactor creation of the response object
Merge pull request #22 from rfletcher/response-refactoring

Refactor creation of the response object