Refactor and initial xml domain