Refactoring : use constants, abstract xml manipulations in utility class.