Added ex_doc
Refactored response handling to use struct