Refactored XML print engine into it's own module.