Add doctype views to v2 API.
Add doctype to all XML responses.
Small v2 bug fixes.