Fix bugs

Previous version failed xml2rfc rendering. Fixed some closing tags and
reference targets.