WIP: cleanup/refactor
WIP: xml validation