Revert "Revert "XML structure reorganization""

This reverts commit dfccda4c23da86718debf8ebc92c8522c383bd89.
Revert "Revert "Revert "XML structure reorganization"""

This reverts commit 3ec691d0d214cf6798b53e34b9f9628f0fb7f430.
Revert 87c499b..9e60fca

This rolls back to commit 87c499b6c20880ccd9a585c1950582b663b79188.