Fix incorrect XML element optionality and fix minor typos