Fixed entity/struct priorities

Prioritizes entity when tag has struct and entity entries.
Empty entityHighlight is removed correctly
Certainty buttons populate markup options

Also fixed duplicate attributes in exported XML