- Only prettify xml response in DEBUG mode
- return xml as root
- added docstring
- only prettify html response in DEBUG mode
- added proper html tag (html, body and doctype)