Moved xml methods to external file