Cleanup: use docType.id in registerDocType rather than param value.
Indentation.
Code convention fix CONST_CASE->camelCase.