Refactor code for clean-up
Convert push conref to use DOM instead of String for intermediate XML